:root {
  --bg-dark: #07090e;
  --card-bg: rgba(18, 24, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-green: #00e676;
  --accent-purple: #7928ca;
  --discord-blurple: #5865F2;
  --roblox-red: #E60000;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Ambient Glow & Mesh */
.background-glow {
  position: fixed;
  top: -20%;
  left: -10%;
  width: 120vw;
  height: 120vh;
  background: 
    radial-gradient(circle at 20% 20%, rgba(88, 101, 242, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(230, 0, 0, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0, 242, 254, 0.08) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.mesh-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  z-index: 0;
  pointer-events: none;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--discord-blurple), var(--accent-cyan));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.4);
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-text h1 span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-item:hover { color: var(--accent-cyan); }

/* Header Credit & Profile Badge */
.header-user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Dashboard Tabs Navigation */
.dashboard-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(88, 101, 242, 0.15));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
}

.tab-btn.admin-only-tab {
  background: rgba(121, 40, 202, 0.15);
  border-color: rgba(121, 40, 202, 0.4);
  color: #d8b4fe;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.tab-content.active {
  display: flex;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 60px 20px 40px 20px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--discord-blurple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Auth Buttons */
.auth-buttons-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.auth-icon { width: 22px; height: 22px; }

.btn-discord {
  background: var(--discord-blurple);
  color: #fff;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(88, 101, 242, 0.6); }

.btn-roblox {
  background: linear-gradient(135deg, #E60000, #990000);
  color: #fff;
  box-shadow: 0 6px 20px rgba(230, 0, 0, 0.35);
}

.btn-roblox:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(230, 0, 0, 0.55); }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-icon { font-size: 32px; }
.feature-card h3 { font-size: 18px; font-weight: 700; }
.feature-card p { font-size: 14px; color: var(--text-muted); }

/* Glass Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.glass-card.margin-top { margin-top: 24px; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

/* Status Banner */
.status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 14px;
  font-size: 13px;
  color: var(--accent-green);
}

.banner-left { display: flex; align-items: center; gap: 10px; }
.banner-right { font-family: var(--font-mono); font-weight: 600; }

/* Groups Grid */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.group-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.group-card.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.group-header { display: flex; align-items: center; gap: 14px; }
.group-emblem { width: 48px; height: 48px; border-radius: 12px; background: rgba(0, 242, 254, 0.15); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.group-title h3 { font-size: 16px; font-weight: 700; }
.group-id { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.group-stats { display: flex; justify-content: space-between; padding: 10px 14px; background: rgba(0, 0, 0, 0.3); border-radius: 10px; font-size: 13px; }
.stat-item span { color: var(--text-dim); display: block; font-size: 11px; }
.stat-item strong { color: var(--accent-green); }

/* Setup Wizard Steps */
.wizard-steps-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-step-card {
  display: flex;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 16px;
}

.wizard-step-card.active { border-color: rgba(0, 242, 254, 0.4); }

.step-badge {
  padding: 6px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  font-weight: 800;
  font-size: 12px;
  height: fit-content;
}

.step-details { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.step-details h3 { font-size: 16px; font-weight: 700; }
.step-details p { font-size: 14px; color: var(--text-muted); }
.step-action { margin-top: 8px; }

/* Anti-Abuse Form & Tags */
.abuse-form { display: flex; flex-direction: column; gap: 16px; }
.toggle-row { display: flex; align-items: center; gap: 14px; }
.toggle-title { font-weight: 700; font-size: 15px; }

.protected-ranks-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.rank-tag {
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(230, 0, 0, 0.15);
  border: 1px solid rgba(230, 0, 0, 0.3);
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 600;
}

/* Account Link/Unlink Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.account-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-header { display: flex; align-items: center; gap: 14px; }

.account-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-icon svg { width: 22px; height: 22px; }
.account-icon.discord { background: rgba(88, 101, 242, 0.15); color: var(--discord-blurple); }
.account-icon.roblox { background: rgba(230, 0, 0, 0.15); color: var(--roblox-red); }

/* Admin Control Panel */
.badge-admin {
  background: rgba(121, 40, 202, 0.2);
  border: 1px solid rgba(121, 40, 202, 0.4);
  color: #d8b4fe;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
}

.admin-section { display: flex; flex-direction: column; gap: 12px; }
.admin-section.margin-top { margin-top: 24px; }
.admin-upload-form { display: flex; gap: 12px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}

.admin-table th, .admin-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th { color: var(--text-dim); font-size: 12px; font-weight: 600; text-transform: uppercase; }

/* Rank Form */
.rank-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.form-control { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--card-border); padding: 10px 14px; border-radius: 10px; color: var(--text-main); font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--accent-cyan); }
.result-message { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent-green); }

/* Buttons & Switch Toggle */
.btn { padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s ease; font-family: var(--font-sans); }
.btn-primary { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); color: #000; box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-main); border: 1px solid rgba(255, 255, 255, 0.1); }
.btn-danger { background: rgba(255, 75, 75, 0.15); color: #ff6b6b; border: 1px solid rgba(255, 75, 75, 0.3); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.15); transition: .3s; }
.slider.round { border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-cyan); }
input:checked + .slider:before { transform: translateX(20px); }

/* Log Console */
.log-console { background: rgba(4, 7, 13, 0.9); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); padding: 16px; height: 240px; overflow-y: auto; font-family: var(--font-mono); font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.log-entry { padding: 8px 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.02); border-left: 3px solid var(--accent-blue); }
.log-entry.cron { border-left-color: var(--accent-cyan); }
.log-entry.success { border-left-color: var(--accent-green); }
.log-entry.abuse { border-left-color: #ff6b6b; }
.log-entry.admin { border-left-color: var(--accent-purple); }

.log-header { display: flex; justify-content: space-between; align-items: center; }
.log-time { color: var(--text-dim); font-size: 11px; }
.log-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.log-message { color: var(--text-main); margin-top: 2px; }
.log-empty { color: var(--text-dim); text-align: center; margin: auto; }

/* Legal Pages Card */
.legal-card { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; line-height: 1.7; }
.legal-card h2 { font-size: 24px; color: var(--text-main); }
.legal-card h3 { font-size: 18px; color: var(--accent-cyan); margin-top: 12px; }
.legal-card ul { padding-left: 20px; }

/* Footer */
.footer { text-align: center; padding: 32px 0 16px 0; color: var(--text-dim); font-size: 13px; margin-top: auto; }
.footer-links { display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-cyan); }

.dot.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); display: inline-block; animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite; }
@keyframes pulse-ring { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); } }

@media (max-width: 768px) {
  .hero-title { font-size: 36px; }
  .navbar { flex-direction: column; gap: 16px; align-items: flex-start; }
  .auth-buttons-group { flex-direction: column; width: 100%; }
  .btn-auth { width: 100%; justify-content: center; }
  .rank-form { grid-template-columns: 1fr; }
  .wizard-step-card { flex-direction: column; }
}
