/* ============================================================
   QUIZARENA - Dark Neon Gaming UI
   ============================================================ */

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

:root {
  --primary:    #00f5ff;
  --secondary:  #bd00ff;
  --success:    #00ff88;
  --warning:    #ffbb00;
  --error:      #ff2d55;
  --bg:         #080c1e;
  --bg2:        #0e1330;
  --card:       #131938;
  --card2:      #1a2040;
  --border:     rgba(0, 245, 255, 0.2);
  --text:       #e6e6ff;
  --text-muted: #8890b0;
  --glow-cyan:  0 0 20px rgba(0, 245, 255, 0.4);
  --glow-purple: 0 0 20px rgba(189, 0, 255, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Typography -------------------------------------------- */
h1, h2, h3 { font-weight: 700; line-height: 1.2; }

.font-game { font-family: 'Orbitron', monospace; }

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Layout ------------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 20px; }

/* ---- Navigation -------------------------------------------- */
.navbar {
  background: rgba(13, 17, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-family: 'Orbitron', monospace;
  font-size: 1.4em;
  color: var(--primary);
  text-decoration: none;
  text-shadow: var(--glow-cyan);
  letter-spacing: 2px;
}

.navbar-links { display: flex; gap: 8px; align-items: center; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--primary); background: rgba(0, 245, 255, 0.08); }

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover { background: rgba(0, 245, 255, 0.1); }

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #000;
  font-weight: 700;
}

.btn-sm { padding: 8px 16px; font-size: 0.85em; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Cards ------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-cyan);
  transform: translateY(-4px);
}

.card-flat { transition: none; }
.card-flat:hover { transform: none; box-shadow: none; }

/* ---- Quiz Card --------------------------------------------- */
.quiz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.quiz-card:hover {
  border-color: rgba(0, 245, 255, 0.5);
  box-shadow: var(--glow-cyan);
  transform: translateY(-5px);
}

/* ---- Prize Badge ------------------------------------------- */
.prize-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(189,0,255,0.2), rgba(0,245,255,0.2));
  border: 1px solid var(--secondary);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9em;
}

.free-badge {
  background: linear-gradient(90deg, rgba(0,255,136,0.2), rgba(0,245,255,0.1));
  border-color: var(--success);
  color: var(--success);
}

/* ---- Stats Grid -------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.stat-card {
  background: var(--card);
  padding: 24px;
  border-radius: 14px;
  border-left: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -20px;
  width: 80px; height: 180%;
  background: linear-gradient(135deg, rgba(0,245,255,0.05), transparent);
  transform: rotate(15deg);
}

.stat-card h3 { color: var(--text-muted); font-size: 0.85em; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.stat-card p  { font-size: 2.2em; color: var(--primary); font-weight: 800; margin-top: 8px; font-family: 'Orbitron', monospace; }

/* ---- Forms ------------------------------------------------- */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 0.85em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95em;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.25);
  background: rgba(0, 245, 255, 0.04);
}

select option { background: var(--card); }
textarea { resize: vertical; min-height: 80px; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9em;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
}

.checkbox-label a { color: var(--primary); }

/* ---- Table ------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9em;
}

th {
  background: rgba(0, 245, 255, 0.06);
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 1px;
}

tr:hover td { background: rgba(255, 255, 255, 0.02); }

.table-container {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  overflow-x: auto;
}

/* ---- Status Badges ----------------------------------------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending  { background: rgba(255, 187, 0, 0.15); color: var(--warning); }
.badge-verified { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.badge-failed,
.badge-rejected { background: rgba(255, 45, 85, 0.15);  color: var(--error);   }
.badge-paid     { background: rgba(0, 245, 255, 0.15); color: var(--primary); }
.badge-active   { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.badge-draft    { background: rgba(136, 144, 176, 0.15); color: var(--text-muted); }
.badge-closed   { background: rgba(255, 45, 85, 0.15);  color: var(--error);   }

/* ---- Alerts ------------------------------------------------ */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 0.9em;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-error   { background: rgba(255, 45, 85, 0.1);   border: 1px solid rgba(255,45,85,0.3);   color: var(--error);   }
.alert-success { background: rgba(0, 255, 136, 0.1);   border: 1px solid rgba(0,255,136,0.3);   color: var(--success); }
.alert-warning { background: rgba(255, 187, 0, 0.1);   border: 1px solid rgba(255,187,0,0.3);   color: var(--warning); }
.alert-info    { background: rgba(0, 245, 255, 0.08);  border: 1px solid rgba(0,245,255,0.2);   color: var(--primary); }

/* ---- Admin Layout ------------------------------------------ */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}

.admin-content {
  margin-left: 240px;
  flex: 1;
  padding: 30px;
}

.admin-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.1em;
  color: var(--primary);
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  text-shadow: var(--glow-cyan);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  color: var(--primary);
  background: rgba(0, 245, 255, 0.06);
  border-left-color: var(--primary);
}

.admin-nav-section {
  padding: 8px 20px 4px;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 12px;
}

/* ---- Admin Login ------------------------------------------- */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

/* ---- Live dot animation ------------------------------------ */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--error);
  border-radius: 50%;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ---- Timer ------------------------------------------------- */
.quiz-timer {
  font-family: 'Orbitron', monospace;
  font-size: 2em;
  color: var(--primary);
  text-shadow: var(--glow-cyan);
  letter-spacing: 2px;
}

.quiz-timer.warning { color: var(--warning); text-shadow: 0 0 20px rgba(255,187,0,0.5); }
.quiz-timer.danger  { color: var(--error);   text-shadow: 0 0 20px rgba(255,45,85,0.5);  }

/* ---- Quiz Question Card ------------------------------------ */
.question-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin: 16px 0;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  margin: 8px 0;
  transition: all 0.2s;
  font-size: 0.95em;
}

.option-label:hover { border-color: var(--primary); background: rgba(0,245,255,0.05); }
.option-label input[type="radio"] { accent-color: var(--primary); }

/* ---- Trust Badges ----------------------------------------- */
.trust-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0;
}

.trust-badge {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--success);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

/* ---- Grid layouts ----------------------------------------- */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* ---- Footer ------------------------------------------------ */
.footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 80px;
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9em;
}

.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.disclaimer {
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 45, 85, 0.08);
  border-radius: 8px;
  color: var(--error);
  font-size: 0.85em;
}

/* ---- Modals ----------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ---- Loading spinner --------------------------------------- */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid rgba(0,245,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive ------------------------------------------- */
/* ---- Hamburger Menu --------------------------------------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: transparent;
  border: none;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-grid  { grid-template-columns: 1fr; }
  h1 { font-size: 1.6em; }
  .quiz-timer { font-size: 1.4em; }

  /* Mobile Navbar */
  .hamburger { display: flex; }

  .navbar-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 12, 30, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 150;
    padding: 40px 20px;
  }
  .navbar-links.open { display: flex; }

  .navbar-links .nav-link {
    display: block;
    font-size: 1.1em;
    padding: 14px 32px;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    color: var(--text);
  }
  .navbar-links .nav-link:hover {
    background: rgba(0,245,255,0.1);
    color: var(--primary);
  }
  .navbar-links .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 14px 32px;
    font-size: 1em;
  }
  /* Close button in mobile menu */
  .mobile-close {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .trust-badges { flex-direction: column; align-items: center; }
}

/* ---- Utilities --------------------------------------------- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }

/* ---- WhatsApp Fixed Button --------------------------------- */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9em;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  transition: all 0.3s;
  animation: waPopIn 0.5s ease;
}
.wa-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37,211,102,0.7);
  color: #fff;
}
.wa-float .wa-icon { font-size: 1.4em; }
.wa-float .wa-text { white-space: nowrap; }

@keyframes waPopIn {
  0%   { transform: scale(0); opacity: 0; }
  80%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .wa-float .wa-text { display: none; }
  .wa-float { padding: 14px; border-radius: 50%; }
}

/* ---- Timer Warning Animation ------------------------------ */
@keyframes timerShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.timer-shake { animation: timerShake 0.5s ease; }

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}
.quiz-timer.danger { animation: timerPulse 0.8s ease infinite; }
