/* ==========================================================================
   FOOTBALL QUIZ MASTER — PREMIUM HOME THEME
   Dark Football UI | Inspired by UEFA Champions League & ESPN FC
   ========================================================================== */

/* --- CUSTOM PROPERTIES --- */
:root {
  --bg: #0A192F;
  --bg-2: #0D1F38;
  --surface: #112240;
  --surface-2: #1A2F4A;
  --surface-3: #233554;
  --green: #00E676;
  --green-dark: #00C853;
  --green-glow: rgba(0, 230, 118, 0.18);
  --gold: #FFD700;
  --gold-glow: rgba(255, 215, 0, 0.2);
  --text: #FFFFFF;
  --muted: #A8B2D1;
  --muted-2: #627090;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --red: #FF4C60;
  --font: 'Montserrat', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --trans: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- BASE RESET --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body,
body.theme-purple {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Subtle animated mesh gradient background */
body.theme-purple::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(0, 230, 118, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 100, 200, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(17, 34, 64, 0.8) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   APP WRAPPER
   ========================================================================== */
.app-wrapper-container {
  max-width: 430px !important;
  margin: 0 auto !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.hq-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10, 25, 47, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hq-header-logo {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hq-header-logo .logo-ball {
  font-size: 20px;
}

.hq-header-logo .logo-highlight {
  color: var(--green);
}

.hq-coin-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 50px;
  padding: 5px 12px 5px 8px;
  cursor: pointer;
  transition: var(--trans);
}

.hq-coin-pill:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.hq-coin-pill img {
  width: 22px;
  height: 22px;
}

.hq-coin-pill span {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hq-hero {
  position: relative;
  padding: 32px 20px 28px;
  text-align: center;
  overflow: hidden;
}

/* Stadium field glow effect */
.hq-hero::before {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(0, 230, 118, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hq-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  animation: fadeInUp 0.6s ease forwards;
}

.hq-hero-badge::before {
  content: '⚽';
  font-size: 13px;
}

.hq-hero-title {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  animation: fadeInUp 0.7s ease forwards;
}

.hq-hero-title .title-highlight {
  background: linear-gradient(135deg, var(--green) 0%, #64FFDA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hq-hero-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
  animation: fadeInUp 0.8s ease forwards;
}

.hq-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #000;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 13px 30px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  animation: fadeInUp 0.9s ease forwards, pulseGreen 2.5s 1.5s infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.4);
}

.hq-hero-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.5);
}

.hq-hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 22px;
  animation: fadeInUp 1s ease forwards;
}

.hq-stat-item {
  text-align: center;
}

.hq-stat-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  display: block;
}

.hq-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
  display: block;
  margin-top: 2px;
}

/* ==========================================================================
   AD CONTAINERS
   ========================================================================== */
.hq-ad-container {
  margin: 0 16px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  overflow: hidden;
}

/* Override existing ad-header-container */
.ad-header-container {
  background: transparent !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  min-height: 260px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 16px 20px !important;
  max-width: calc(100% - 32px) !important;
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.hq-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 14px;
}

.hq-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}

.hq-section-title span {
  color: var(--green);
}

.hq-section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.hq-section-link:hover {
  color: var(--green);
}

/* ==========================================================================
   CATEGORY GRID (Quiz Cards)
   ========================================================================== */
.hq-categories {
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.hq-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Shimmer sweep */
.hq-cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.04), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.hq-cat-card:hover::before {
  left: 200%;
}

.hq-cat-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px var(--green-glow), 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
  background: var(--surface-2);
}

.hq-cat-icon {
  font-size: 32px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s;
}

.hq-cat-card:hover .hq-cat-icon {
  transform: scale(1.15) rotate(-5deg);
}

.hq-cat-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.hq-cat-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 20px;
}

.hq-cat-card.featured {
  grid-column: span 2;
  flex-direction: row;
  text-align: left;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: rgba(0, 230, 118, 0.2);
}

.hq-cat-card.featured .hq-cat-icon {
  font-size: 44px;
  flex-shrink: 0;
}

.hq-cat-card.featured .hq-cat-name {
  font-size: 15px;
}

.hq-cat-card.featured:hover {
  border-color: var(--green);
}

/* ==========================================================================
   QUIZ LIST CARDS (home.html existing cards redesign)
   ========================================================================== */
.hq-quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}

.hq-quiz-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 16px var(--green-glow), 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateX(4px);
}

.hq-quiz-card-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.hq-quiz-card-body {
  flex: 1;
  min-width: 0;
}

.hq-quiz-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hq-quiz-card-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.hq-quiz-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hq-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 76, 96, 0.15);
  border: 1px solid rgba(255, 76, 96, 0.3);
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hq-live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1s infinite;
}

/* ==========================================================================
   EARN COINS SECTION
   ========================================================================== */
.hq-earn-section {
  margin: 0 16px 24px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-3) 100%);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hq-earn-left {
  flex: 1;
}

.hq-earn-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.hq-earn-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.hq-earn-balance img {
  width: 28px;
}

.hq-earn-balance .balance-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.hq-earn-sub {
  font-size: 11px;
  color: var(--muted);
}

.hq-earn-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: #000;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3);
  transition: var(--trans);
}

.hq-earn-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

/* ==========================================================================
   TAB NAVIGATION
   ========================================================================== */
.hq-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  padding: 0 16px;
  gap: 0;
}

.hq-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--trans);
  position: relative;
}

.hq-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.hq-tab:hover:not(.active) {
  color: var(--text);
}

/* ==========================================================================
   BOTTOM NAV (Mobile)
   ========================================================================== */
.hq-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(10, 25, 47, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 400;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}

.hq-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
  transition: var(--trans);
}

.hq-nav-icon {
  font-size: 20px;
  transition: transform 0.2s;
}

.hq-nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.hq-nav-item.active .hq-nav-icon {
  filter: drop-shadow(0 0 6px var(--green));
}

.hq-nav-item.active .hq-nav-label {
  color: var(--green);
}

.hq-nav-item:hover .hq-nav-icon {
  transform: translateY(-2px);
}

/* ==========================================================================
   OPTION CARDS (Quiz question options) — index.html
   ========================================================================== */
.option-card {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-2) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  margin-bottom: 10px !important;
  padding: 14px 18px !important;
  transition: var(--trans) !important;
  box-shadow: none !important;
}

.option-card:hover {
  border-color: var(--green) !important;
  background: var(--surface-2) !important;
  box-shadow: 0 0 14px var(--green-glow) !important;
  transform: translateX(4px) !important;
}

.option-card.selected {
  background: rgba(0, 230, 118, 0.08) !important;
  border-color: var(--green) !important;
  box-shadow: 0 0 16px var(--green-glow) !important;
}

.option-card.correct {
  background: rgba(0, 230, 118, 0.12) !important;
  border-color: var(--green) !important;
  box-shadow: 0 0 16px var(--green-glow) !important;
}

.option-card.incorrect {
  background: rgba(255, 76, 96, 0.1) !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 12px rgba(255, 76, 96, 0.2) !important;
}

.option-label {
  color: var(--text) !important;
  font-weight: 700 !important;
  font-family: var(--font) !important;
  font-size: 15px !important;
}

.option-indicator {
  border-color: var(--border-2) !important;
}

.option-card.selected .option-indicator {
  border-color: var(--green) !important;
}

.option-card.selected .option-indicator::after {
  background: var(--green) !important;
  box-shadow: 0 0 8px var(--green) !important;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress-bar-track {
  background: rgba(255, 255, 255, 0.06) !important;
  border: none !important;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--green), #64FFDA) !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4) !important;
}

.progress-bar-label {
  color: var(--muted) !important;
  text-shadow: none !important;
  font-family: var(--font) !important;
}

/* ==========================================================================
   MODAL OVERLAYS
   ========================================================================== */
.custom-modal-overlay {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.glass-modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 230, 118, 0.05) !important;
}

/* Success modal — green tint */
#successCoinsModal .glass-modal-content {
  border-color: rgba(0, 230, 118, 0.3) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 118, 0.1) !important;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
#sidebarMenu {
  background: var(--bg-2) !important;
  border-right: 1px solid var(--border) !important;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   QUIZ WHITE CARDS (home quiz list) — Dark Restyle
   ========================================================================== */
/* Override white quiz cards from quziko.css */
[style*="background: white"],
[style*="background:#ffffff"],
[style*="background: #ffffff"] {
  background: var(--surface) !important;
}

/* ==========================================================================
   WELL PLAYED / SCORE PAGE
   ========================================================================== */
.victory-badge {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.06) 0%, rgba(0, 0, 0, 0) 100%) !important;
  border-bottom: 2px solid rgba(0, 230, 118, 0.1) !important;
}

/* ==========================================================================
   FLOATING FOOTBALL PARTICLE (decorative)
   ========================================================================== */
.hq-float-ball {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  font-size: 80px;
  animation: floatBall 8s ease-in-out infinite;
  user-select: none;
}

.hq-float-ball.ball-1 {
  top: 5%;
  right: -10px;
  animation-delay: 0s;
}

.hq-float-ball.ball-2 {
  top: 40%;
  left: -15px;
  animation-delay: 3s;
  font-size: 50px;
}

.hq-float-ball.ball-3 {
  bottom: 10%;
  right: -5px;
  animation-delay: 5s;
  font-size: 60px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGreen {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.4);
  }

  50% {
    box-shadow: 0 4px 30px rgba(0, 230, 118, 0.7), 0 0 50px rgba(0, 230, 118, 0.2);
  }
}

@keyframes floatBall {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(-20px) rotate(120deg);
  }

  66% {
    transform: translateY(10px) rotate(240deg);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  60% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

@keyframes spinCoin {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.6);
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.hq-section {
  padding: 0 0 24px;
}

.hq-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px 24px;
}

.hq-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 380px) {
  .hq-hero-title {
    font-size: 22px;
  }

  .hq-categories {
    gap: 10px;
  }

  .hq-cat-card {
    padding: 14px 10px;
  }

  .hq-cat-icon {
    font-size: 26px;
  }

  .hq-cat-name {
    font-size: 11px;
  }
}

/* Ad Container Styling */
.ad-header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  width: 100%;
  max-width: 320px;
  min-height: 250px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

/* Keep AdSense display units full-size like the reference quiz layout. */
.google-ad-placeholder {
  display: block !important;
  width: 100% !important;
  max-width: 430px !important;
  height: 350px !important;
  min-height: 350px !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  text-align: center !important;
  overflow: hidden !important;
  background: transparent !important;
  border: none !important;
}

.google-ad-placeholder > div {
  width: 100% !important;
  height: 350px !important;
}

.google-ad-placeholder .adsbygoogle {
  display: block !important;
  width: 100% !important;
  height: 350px !important;
}
