/* ===== Zingot — Modern Dark Gaming Theme ===== */

/* ===== Theme Variables ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-strong: rgba(255, 255, 255, 0.10);

  --text-primary: #f0f0ff;
  --text-secondary: rgba(240, 240, 255, 0.7);
  --text-muted: rgba(240, 240, 255, 0.4);

  --accent-1: #7c5cfc;
  --accent-2: #a78bfa;
  --accent-glow: rgba(124, 92, 252, 0.35);
  --gradient-accent: linear-gradient(135deg, #7c5cfc, #a78bfa);
  --gradient-bg: linear-gradient(180deg, #0a0a1a 0%, #12122a 50%, #0d0d24 100%);

  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.12);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.12);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.12);

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(124, 92, 252, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

::selection { background: var(--accent-1); color: #fff; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

input[type="range"] { padding: 0 !important; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-glass-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-1); }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Custom Select Component ===== */
.zs-select {
  position: relative;
  display: inline-block;
  min-width: 160px;
  max-width: 100%;
  font-size: 0.85rem;
}

.zs-select select.zs-enhanced {
  opacity: 0;
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  border: none;
  padding: 0;
  margin: 0;
}

.zs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  min-height: 38px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.zs-trigger:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.14);
}

.zs-trigger:focus,
.zs-trigger:focus-visible {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.zs-trigger.zs-open {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.zs-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zs-chevron {
  flex-shrink: 0;
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
  color: var(--accent-2);
}

.zs-trigger.zs-open .zs-chevron {
  transform: rotate(180deg);
}

.zs-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  box-shadow: var(--shadow-card);
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem;
  animation: slideDown 0.15s ease;
}

.zs-option {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zs-option:hover {
  background: var(--bg-glass-strong);
}

.zs-option.zs-selected {
  background: var(--accent-glow);
  color: #fff;
}

.zs-option.zs-option-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Side Navigation ===== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.sidenav.open { transform: translateX(0); }
p {
  margin-bottom: 1rem;
  line-height: 1.5;
}
.sidenav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidenav-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidenav-header .brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.sidenav .closebtn {
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.sidenav .closebtn:hover { background: var(--bg-glass-strong); color: var(--text-primary); }

.sidenav-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-y: auto;
}
.sidenav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 1rem 0.85rem 0.4rem;
}
.sidenav a.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.15s ease;
}
.sidenav a.nav-link:hover {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
}
.sidenav a.nav-link.active {
  background: var(--accent-glow);
  color: var(--text-primary);
  font-weight: 600;
}
.sidenav a.nav-link .nav-icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }

.sidenav-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hamburger */
.menu-btn {
  font-size: 1.4rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}
.menu-btn:hover { background: var(--bg-glass-strong); }

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ===== Header ===== */
header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 26, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.header-logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
}
@media (max-width: 400px) {
  .header-logo { width: 20px; height: 20px; }
  .logo { font-size: 1.1rem; gap: 0.35rem; }
}

/* ===== Hero Section ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  animation: fadeInUp 0.6s ease;
}
.hero-badge {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  animation: slideDown 0.5s ease;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Feature Strip ===== */
.features-strip {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.feature-icon { font-size: 1.2rem; }

/* ===== Buttons ===== */
.cta {
  background: var(--gradient-accent);
  color: #fff;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.cta-secondary {
  background: var(--bg-glass-strong);
  box-shadow: none;
  border: 1px solid var(--border);
}
.cta-secondary:hover {
  background: var(--bg-card-hover);
  box-shadow: none;
}

.btn {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.15); }
.btn-primary {
  background: var(--gradient-accent);
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.1); }

/* ===== Cards / Containers ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}
.container {
  flex: 1;
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  animation: fadeInUp 0.4s ease;
}
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ===== Code Input (play) ===== */
.code-input {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.code-input input {
  width: 3.5rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.code-input input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-glow); }
.code-input input::-webkit-outer-spin-button,
.code-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== Sets Grid ===== */
.sets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.set-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: scaleIn 0.3s ease;
}
.set-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 252, 0.3);
  box-shadow: var(--shadow-glow);
}
.set-card h3 { margin-bottom: 0.4rem; font-weight: 600; }
.set-card p { color: var(--text-secondary); font-size: 0.85rem; }
.mastery-mini { margin-top: 0.5rem; font-size: 0.8rem; }
.set-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.set-card-header h3 { margin-bottom: 0.4rem; flex: 1; }

.delete-btn {
  background: var(--bg-glass-strong);
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.delete-btn:hover {
  background: var(--red-bg);
  color: var(--red);
  transform: scale(1.1);
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ===== Account Page ===== */
.account-card {
  max-width: 450px;
}
.account-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-accent);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.account-stats {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.stat-box {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  min-width: 90px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.7rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

/* ===== Set Detail Layout ===== */
.set-detail-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
.questions-panel, .play-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.play-panel {
  display: flex;
  flex-direction: column;
  align-self: start;
}
@media (max-width: 768px) {
  .set-detail-layout { flex-direction: column; }
  .play-panel { position: static; }
}

/* ===== Set Detail Page ===== */
.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}
.back-link:hover { color: #fff; }

.set-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.set-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tag-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ===== Question Cards ===== */
.question-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-glass-strong);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  align-items: flex-start;
}
.question-num {
  background: var(--gradient-accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.question-text { font-weight: 600; margin-bottom: 0.25rem; }
.question-image { margin: 0.5rem 0; }
.question-image img { max-width: 100%; max-height: 200px; border-radius: 8px; object-fit: contain; background: rgba(0,0,0,0.15); }
.answer-text { color: var(--green); font-size: 0.85rem; }
.wrong-text { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.2rem; }
.question-meta {
  display: flex;
  gap: 0.4rem;
  margin: 0.3rem 0 0.4rem;
  flex-wrap: wrap;
}
.q-type-badge, .q-review-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
}
.q-review-badge { opacity: 0.7; }
.ai-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  vertical-align: middle;
  margin-left: 0.3rem;
  white-space: nowrap;
}

/* ===== Game ===== */
.game-question {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.4;
}
.game-choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.game-choice {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: left;
  transition: all 0.15s ease;
}
.game-choice:hover {
  border-color: var(--accent-2);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.game-choice.correct {
  background: var(--green-bg);
  border-color: var(--green);
}
.game-choice.incorrect {
  background: var(--red-bg);
  border-color: var(--red);
}
.game-choice.disabled { cursor: default; opacity: 0.6; }
.game-type-input {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  outline: none;
  margin-bottom: 1rem;
}
.game-type-input:focus { border-color: var(--accent-1); }
.game-progress {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.game-result {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0;
}
.analysis-card {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}
.analysis-card ul { padding-left: 0; list-style: none; }
.analysis-card li { margin-bottom: 0.3rem; }
.flashcard:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

/* ===== Timer ===== */
#timer-bar-container {
  position: relative;
  height: 6px;
  margin-bottom: 1.5rem;
  border-radius: 3px;
  background: var(--bg-glass-strong);
  overflow: hidden;
}
.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--gradient-accent);
  border-radius: 3px;
  transition: width 0.1s linear, background 0.3s ease;
}
.timer-bar.warning { background: var(--amber); }
.timer-bar.danger { background: var(--red); }
.timer-text {
  position: absolute;
  top: 10px;
  right: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== Points Popup ===== */
.points-popup {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  margin-top: 0.5rem;
  animation: pointsFade 1.5s ease forwards;
}
@keyframes pointsFade {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1.2); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

/* ===== Leaderboard ===== */
.leaderboard { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.leaderboard-list, .final-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-glass-strong);
}
.leaderboard-row.leaderboard-you {
  background: var(--accent-glow);
  border: 1px solid rgba(124, 92, 252, 0.3);
}
.lb-rank { font-weight: 700; width: 2rem; text-align: center; color: var(--text-muted); }
.lb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.lb-name { flex: 1; font-size: 0.9rem; text-overflow: ellipsis; }
.lb-score { font-weight: 700; color: var(--accent-2); }

/* ===== Game Waiting / Results States ===== */
.game-waiting { text-align: center; padding: 2rem 1rem; }
.waiting-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg-glass-strong);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== AI Loading ===== */
.ai-spinner {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border: 4px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent-1);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 20px rgba(108,92,231,0.3);
}
.ai-loading-text {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  animation: fadeInUp 0.4s ease;
  transition: opacity 0.3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Player Result Overlay ===== */
.player-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 28, 0.95);
  backdrop-filter: blur(8px);
  animation: overlayIn 0.4s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.player-result-card {
  text-align: center;
  padding: 2rem 3rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: 20px;
  animation: cardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cardPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.player-result-place {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(108,92,231,0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(108,92,231,0.9)); }
}
.player-result-sub {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}
.player-result-hint {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-top: 1rem;
  font-style: italic;
}

/* ===== Host Podium Reveal ===== */
.podium-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 28, 0.96);
  backdrop-filter: blur(10px);
  animation: overlayIn 0.5s ease;
}
.podium-card {
  text-align: center;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
}
.podium-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f7d774, #f4a261, #e76f51);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  animation: glowPulse 2s ease-in-out infinite;
}
.podium-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  margin: 0.5rem auto;
  max-width: 420px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
  transform: translateX(-100px);
  opacity: 0;
  animation: slideInRow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.podium-row:nth-child(3) { animation-delay: 0.3s; }
.podium-row:nth-child(4) { animation-delay: 0.6s; }
.podium-row:nth-child(5) { animation-delay: 0.9s; }
.podium-row:nth-child(6) { animation-delay: 1.2s; }
@keyframes slideInRow {
  0% { transform: translateX(-100px) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
.podium-rank {
  font-size: 1.8rem;
  font-weight: 800;
  min-width: 55px;
}
.podium-rank-1 { color: #f7d774; text-shadow: 0 0 15px rgba(247,215,116,0.6); }
.podium-rank-2 { color: #c0c0c0; text-shadow: 0 0 15px rgba(192,192,192,0.5); }
.podium-rank-3 { color: #cd7f32; text-shadow: 0 0 15px rgba(205,127,50,0.5); }
.podium-name { flex: 1; font-size: 1.1rem; font-weight: 600; text-align: left; }
.podium-score { font-size: 1.1rem; font-weight: 700; color: var(--accent-2); }

.host-players-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}
.mini-player {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.question-result {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
}
.result-correct {
  background: var(--green-bg);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--green);
}
.result-incorrect {
  background: var(--red-bg);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
}
.points-earned {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 1rem;
}

/* ===== Question Builder ===== */
.question-builder-block {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.qb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.qb-number {
  background: var(--gradient-accent);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Creator Page ===== */
.creator-mode-toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.creator-section {
  position: relative;
  margin-bottom: 1.5rem;
}
.creator-step-badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: var(--gradient-accent);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-glow);
}
.btn-add-question {
  width: 100%;
  border: 2px dashed var(--border);
  background: transparent;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-add-question:hover {
  background: var(--bg-glass-strong);
  border-color: var(--accent-2);
  color: var(--text-primary);
}

/* ===== Notes Upload ===== */
.notes-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}
.notes-dropzone.dragover {
  border-color: var(--accent-1);
  background: var(--accent-glow);
}
.dropzone-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.notes-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.note-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
}
.note-preview img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.note-preview .note-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  font-size: 0.9rem;
}
.note-name {
  display: block;
  font-size: 0.65rem;
  padding: 0.25rem;
  text-align: center;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
}
.notes-status.info { background: var(--blue-bg); border: 1px solid rgba(96, 165, 250, 0.3); }
.notes-status.success { background: var(--green-bg); border: 1px solid rgba(52, 211, 153, 0.3); }
.notes-status.error { background: var(--red-bg); border: 1px solid rgba(248, 113, 113, 0.3); }

/* ===== Search Bar & Tabs ===== */
.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.search-bar input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}
.search-bar input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-glow); }
.sets-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 380px;
  backdrop-filter: blur(16px);
}
.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--blue); }
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(50px); }
}

/* ===== Skeleton Loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-glass-strong) 25%, var(--bg-card-hover) 50%, var(--bg-glass-strong) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; width: 80%; }
.skeleton-title { height: 1.5rem; margin-bottom: 0.75rem; width: 60%; }
.skeleton-card { height: 120px; margin-bottom: 0.75rem; }

/* ===== Responsive Improvements ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .container { padding: 1rem; }
  .sets-grid { grid-template-columns: 1fr; }
  .big-code { font-size: 1.8rem; letter-spacing: 0.3rem; }
  .toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { max-width: 100%; }
  .hero { padding: 2rem 1rem; }
  .hero-badge { font-size: 0.7rem; padding: 0.3rem 0.75rem; }
  .cta { padding: 0.6rem 1.25rem; font-size: 0.85rem; }
}
@media (max-width: 480px) {
  header { padding: 0.5rem 0.5rem; }
  .header-left { gap: 0.4rem; }
  .logo { font-size: 1rem; gap: 0.25rem; }
  .header-logo { width: 18px; height: 18px; }
  .menu-btn { font-size: 1.1rem; padding: 0.2rem 0.35rem; }
  .hero { padding: 1rem 0.5rem; }
  .hero h1 { font-size: 1.3rem; }
  .hero-badge { font-size: 0.6rem; margin-bottom: 0.5rem; padding: 0.2rem 0.5rem; }
  .hero-subtitle { font-size: 0.8rem; margin-bottom: 1rem; }
  .hero-actions { gap: 0.4rem; flex-direction: column; align-items: stretch; }
  .hero-actions .cta { text-align: center; justify-content: center; font-size: 0.8rem; padding: 0.5rem 1rem; }
  .features-strip { gap: 0.5rem; padding: 0.5rem; }
  .feature-item { font-size: 0.65rem; }
  .page-title { font-size: 1.1rem; }
}

@media (max-width: 360px) {
  header { padding: 0.4rem 0.4rem; }
  .header-left { gap: 0.25rem; }
  .logo { font-size: 0.85rem; gap: 0.2rem; }
  .header-logo { width: 16px; height: 16px; }
  .menu-btn { font-size: 1rem; padding: 0.15rem 0.25rem; }
  .hero { padding: 0.75rem 0.4rem; }
  .hero h1 { font-size: 1.1rem; }
  .hero-badge { font-size: 0.55rem; margin-bottom: 0.4rem; padding: 0.15rem 0.4rem; }
  .hero-subtitle { font-size: 0.75rem; margin-bottom: 0.75rem; }
  .hero-actions .cta { font-size: 0.75rem; padding: 0.4rem 0.75rem; }
  .container { padding: 0.5rem; }
  .card { padding: 0.75rem; }
  .sets-grid { gap: 0.5rem; }
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.6;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-text { font-size: 1rem; margin-bottom: 0.5rem; }
.empty-state-hint { font-size: 0.85rem; }

/* ===== Quick Study Badge ===== */
.quick-study-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-weight: 600;
}

/* ===== Streak Flame ===== */
.streak-flame {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
}
.streak-flame svg { width: 1.1em; height: 1.1em; }
select {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f0f0ff' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}
select:hover { border-color: var(--accent-2); }
select:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ===== Players Grid ===== */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease;
}
.player-card:hover { transform: translateY(-2px); }
.player-icon { font-size: 2.5rem; margin-bottom: 0.4rem; }
.player-name { font-weight: 600; }

/* ===== Mode Creator ===== */
.mode-creator-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.mode-creator-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.form-section {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ===== Toggle Switch ===== */
.toggle-group { margin-bottom: 1rem; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.toggle-label { font-weight: 600; }
.toggle-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-glass-strong);
  border-radius: 26px;
  transition: background 0.3s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient-accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

/* ===== Ad Container ===== */
.ad-container {
  display: none;
  justify-content: center;
  margin: 1rem 0;
  min-height: 90px;
  min-width: 300px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ad-container.ads-disabled {
  display: none !important;
}

/* ===== Mastery Display ===== */
.mastery-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-1) var(--pct), var(--bg-glass-strong) 0%);
  position: relative;
}
.mastery-ring-inner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ===== Utility ===== */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* ===== Form Actions ===== */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    border-radius: 10px;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
color: var(--text-primary);
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-outline:hover {
  background: var(--bg-glass-strong);
  border-color: var(--accent-2);
}

/* ===== Mode Result ===== */
#mode-result {
    margin-top: 1rem;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
#mode-result p {
    padding: 0;
}

/* ===== Responsive set detail ===== */
@media (max-width: 768px) {
    .play-panel { position: static; }
    button {padding: 8px !important; min-width:0 !important;font-size:0.8rem !important;}
    .btn{padding: 8px !important; min-width:0 !important;font-size:0.8rem !important;}
}
@media (max-width: 380px) {
    button {padding: 6px !important; min-width:0 !important;font-size:0.7rem !important;}
    .btn {padding: 6px !important; min-width:0 !important;font-size:0.7rem !important;}
    .card { padding: 6px !important; }
}
@media (max-width: 420px) {
    .lb-avatar {
        display:none !important;
    }
}

/* ===== Hero Enhancements ===== */
.hero-badge {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  animation: slideDown 0.5s ease;
}
.hero-highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-secondary {
  background: var(--bg-glass-strong);
  box-shadow: none;
  border: 1px solid var(--border);
}
.cta-secondary:hover {
  background: var(--bg-card-hover);
  box-shadow: none;
  transform: translateY(-2px);
}

/* ===== Features Strip (landing) ===== */
.features-strip {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    flex-wrap: wrap;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.feature-icon { font-size: 1.2rem; }

/* ===== Header Auth ===== */
#header-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===== Features Grid (features page) ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(124, 92, 252, 0.3);
}
.feature-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.feature-card p {
    opacity: 0.85;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Tech Badge ===== */
.tech-badge {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ===== Account Page ===== */
.account-card {
    max-width: 480px;
}
.account-avatar-large {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}
.account-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.stat-box {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 80px;
}
.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}
.stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.15rem;
}