@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #07070a;
  --bg-secondary: #0c0c10;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --tiktok-cyan: #25F4EE;
  --tiktok-pink: #FE2C55;
  --tiktok-cyan-glow: rgba(37, 244, 238, 0.15);
  --tiktok-pink-glow: rgba(254, 44, 85, 0.15);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.5);
  --text-muted: rgba(255,255,255,0.25);
  
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(255, 255, 255, 0.15);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== MESH BACKGROUND ===== */
.mesh-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  background: 
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(254,44,85,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 85% 70%, rgba(37,244,238,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(168,85,247,0.04) 0%, transparent 50%);
}
.mesh-bg::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.012'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Legacy compat */
.bg-animation { display: none; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 5vw;
  background: rgba(7, 7, 10, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; text-decoration: none; color: var(--text-primary);
}
.logo-icon {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--tiktok-pink), var(--tiktok-cyan));
  border-radius: 10px; font-weight: 900; font-size: 18px; color: #000;
}
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  padding: 8px 18px; border-radius: 10px; font-weight: 600; font-size: 0.9rem;
  transition: all 0.3s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary); background: rgba(255, 255, 255, 0.06);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border: none; border-radius: 12px;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: all 0.3s; text-decoration: none; position: relative;
}
.btn-primary {
  background: #fff; color: #000;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1); transform: translateY(-2px);
}
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 8px; }

/* ===== HERO SECTION ===== */
.hero {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 18vh 5vw 12vh;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem); font-weight: 900; line-height: 1; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary);
  max-width: 550px; margin-bottom: 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; }

/* Glitch kept for hero */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.6;
}
.glitch::before { left: 2px; text-shadow: -2px 0 var(--tiktok-pink); clip: rect(24px, 550px, 90px, 0); animation: glitch-anim 3s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -2px 0 var(--tiktok-cyan); clip: rect(85px, 550px, 140px, 0); animation: glitch-anim 2.5s infinite linear alternate-reverse; }
@keyframes glitch-anim {
  0% { clip: rect(22px, 9999px, 86px, 0); } 20% { clip: rect(65px, 9999px, 12px, 0); }
  40% { clip: rect(32px, 9999px, 49px, 0); } 60% { clip: rect(81px, 9999px, 3px, 0); }
  80% { clip: rect(10px, 9999px, 94px, 0); } 100% { clip: rect(54px, 9999px, 20px, 0); }
}

/* ===== FEATURES ===== */
.features {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; padding: 0 5vw 5vw; max-width: 1200px; margin: 0 auto;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; transition: all 0.4s; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--tiktok-cyan), var(--tiktok-pink));
  opacity: 0; transition: opacity 0.4s;
}
.feature-card:hover { background: var(--bg-card-hover); transform: translateY(-6px); border-color: var(--border-focus); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 28px; margin-bottom: 20px; display: inline-block; padding: 14px; background: rgba(255,255,255,0.04); border-radius: 14px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* ===== SERVER INFO ===== */
.server-info {
  position: relative; z-index: 1; max-width: 500px; margin: 0 auto 40px;
  padding: 36px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.server-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-secondary); }
.server-ip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px; background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: 1.1rem;
  color: var(--text-primary); cursor: pointer; transition: all 0.3s; margin-top: 16px;
}
.server-ip:hover { border-color: var(--tiktok-cyan); box-shadow: 0 0 20px var(--tiktok-cyan-glow); }
.copy-feedback { margin-top: 12px; font-size: 0.85rem; color: var(--success); opacity: 0; transition: opacity 0.3s; font-weight: 600; }
.copy-feedback.show { opacity: 1; }

/* ===== AUTH FORMS ===== */
.auth-container {
  position: relative; z-index: 1; max-width: 440px;
  margin: 0 auto; padding: 20px;
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  flex: 1;
}
.auth-card {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px; box-shadow: var(--shadow); width: 100%;
}
.auth-card h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: 6px; }
.auth-card .subtitle { color: var(--text-secondary); margin-bottom: 28px; font-size: 0.95rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-group input, .form-group select {
  width: 100%; padding: 14px 18px; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 0.95rem;
  transition: all 0.3s; outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--tiktok-cyan); box-shadow: 0 0 0 3px rgba(37,244,238,0.1); }
.form-group input::placeholder { color: var(--text-muted); }
.form-footer { margin-top: 28px; text-align: center; font-size: 0.9rem; color: var(--text-secondary); }
.form-footer a { color: var(--tiktok-cyan); text-decoration: none; font-weight: 700; }
.form-footer a:hover { text-decoration: underline; }

/* ===== DASHBOARD ===== */
.page-header h1 { font-size: 2rem; font-weight: 900; }
.page-wrap { max-width: 1600px !important; width: 95% !important; margin: 0 auto; flex: 1; }
.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; align-items: center; gap: 16px; transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-icon { font-size: 28px; }
.stat-info .stat-value { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.stat-info .stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; font-weight: 600; }

/* ===== TABLES ===== */
.table-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.table-header {
  padding: 20px 28px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 14px 28px; text-align: left; font-size: 0.75rem; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px;
  background: rgba(0,0,0,0.2);
}
td { padding: 16px 28px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.9rem; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; }
.badge-spawn { background: var(--tiktok-pink-glow); color: var(--tiktok-pink); }
.badge-item { background: var(--tiktok-cyan-glow); color: var(--tiktok-cyan); }
.badge-effect { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar { padding: 12px 20px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 12px; font-size: 0.8rem; }
  .hero { padding: 12vh 20px 8vh; }
  .features { padding: 0 20px 40px; }
}
