/* ============================================================
   LoveSnap – Complete Design System (Dark Theme)
   Couple Social & Relationship Hub
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary: #FF2D78;
  --primary-dark: #D91A60;
  --primary-light: #FF5A9E;
  --primary-pale: rgba(255, 45, 120, 0.12);
  --secondary: #E91E8C;
  --accent: #FF8C69;
  --accent-warm: #F59E0B;

  --gradient-main: linear-gradient(135deg, #FF2D78 0%, #D91A60 100%);
  --gradient-warm: linear-gradient(135deg, #FF8C69 0%, #E0456E 100%);
  --gradient-fire: linear-gradient(135deg, #FF2D78 0%, #E91E8C 50%, #9C1B6B 100%);
  --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-green: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  --gradient-purple: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
  --gradient-battle: linear-gradient(135deg, #FF2D78 0%, #FF3366 50%, #CC0044 100%);

  --bg-app: #000000;
  --bg-body: #000000;
  --bg-card: #0e0e16;
  --bg-card-hover: #141420;
  --bg-glass: rgba(10, 10, 15, 0.92);

  --text-dark: #f1f1f5;
  --text-body: #b0b0c8;
  --text-muted: #6b6b8a;
  --text-white: #FFFFFF;

  --border-light: rgba(255, 45, 120, 0.12);
  --border-card: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 4px 20px rgba(0, 0, 0, 0.3);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script: 'Dancing Script', cursive;

  --nav-height: 85px;
  --topbar-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  position: relative;
}

/* ── Ambient Pink Blur Animated Background ─────────────────── */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(85px);
  will-change: transform, opacity;
}

/* Primary Vibrant Pink Glow Blob (Top Right) */
body::before {
  top: -80px;
  right: -60px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 45, 120, 0.45) 0%, rgba(233, 30, 140, 0.22) 50%, rgba(0, 0, 0, 0) 80%);
  animation: pinkBlurPulse 7s ease-in-out infinite alternate;
}

/* Secondary Warm Soft Pink Glow Blob (Bottom Left) */
body::after {
  bottom: 8%;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 90, 158, 0.38) 0%, rgba(168, 85, 247, 0.18) 55%, rgba(0, 0, 0, 0) 80%);
  animation: pinkBlurPulseAlt 10s ease-in-out infinite alternate-reverse;
}

@keyframes pinkBlurPulse {
  0% {
    opacity: 0.3;
    transform: scale(0.85) translate(0, 0);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.3) translate(-35px, 45px);
  }
  100% {
    opacity: 0.45;
    transform: scale(1.05) translate(-15px, 20px);
  }
}

@keyframes pinkBlurPulseAlt {
  0% {
    opacity: 0.25;
    transform: scale(0.9) translate(0, 0);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.35) translate(45px, -35px);
  }
  100% {
    opacity: 0.35;
    transform: scale(1.1) translate(20px, -15px);
  }
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-main); }

.d-none { display: none !important; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }

/* ── Top Bar ───────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-height);
  background: rgba(10, 10, 20, 0.35);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}

.topbar-left {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-body); text-decoration: none;
  font-size: 0.82rem; font-weight: 600;
  transition: color 0.2s;
}
.topbar-left:hover { color: var(--primary); }
.topbar-left svg { width: 18px; height: 18px; fill: currentColor; }

.topbar-brand {
  font-family: var(--font-main);
  font-size: 1.25rem; font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}

.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 0.9rem;
}

.topbar-actions {
  display: flex; align-items: center; gap: 10px;
}

.lp-display {
  display: flex; align-items: center; gap: 4px;
  background: var(--primary-pale);
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 700; color: var(--primary);
}
.lp-icon { font-size: 0.9rem; }
.lp-label { font-size: 0.65rem; font-weight: 600; opacity: 0.7; }

.topbar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-body); background: transparent;
  position: relative; transition: all 0.2s;
  border: none;
}
.topbar-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.72rem;
  text-decoration: none; transition: transform 0.2s;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.topbar-avatar:hover { transform: scale(1.08); }

.notif-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--primary); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--bg-app);
}

/* ── Page Layout ───────────────────────────────────────────── */
.page-wrapper {
  padding: calc(var(--topbar-height) + 16px) 16px calc(var(--nav-height) + var(--safe-bottom) + 16px);
  max-width: 520px; margin: 0 auto;
  min-height: 100vh;
}

.page-enter {
  animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Bottom Navigation (Apple Liquid Glass) ────────────────── */
.bottom-nav {
  position: fixed; 
  bottom: 10px; 
  left: 12px; 
  right: 12px;
  z-index: 100;
  background: rgba(12, 12, 22, 0.65);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; justify-content: space-around;
  padding: 6px 4px calc(6px + var(--safe-bottom));
  height: auto;
}

/* Glass shine overlay */
.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: rgba(255,255,255,0.35); text-decoration: none;
  padding: 6px 12px; border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  min-width: 50px;
}

.nav-icon-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
}

.nav-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,45,120,0.2) 0%, transparent 70%);
  animation: navPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes navPulse {
  0%,100% { opacity:0.6;transform:scale(0.9); }
  50% { opacity:1;transform:scale(1.1); }
}

.nav-item .nav-label {
  font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s;
}

.nav-item.active { 
  color: var(--primary);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2.5px;
  background: var(--primary);
  border-radius: 4px;
}
.nav-item.active .nav-label { color: var(--primary); font-weight: 700; }

.nav-item:hover {
  color: rgba(255,255,255,0.75);
}

.nav-item:active { transform: scale(0.88); }

.nav-profile-pic {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover; border: 2px solid transparent;
  transition: all 0.3s;
}

.nav-item.active .nav-profile-pic {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255,45,120,0.4);
}

.nav-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  border-radius: 10px;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid rgba(12,12,22,0.8);
  box-shadow: 0 2px 6px rgba(255,45,120,0.4);
}

/* ── Cards ─────────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.glass-card:hover { box-shadow: var(--shadow-md); }

.glass-card-flat {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.2s ease;
}

.gradient-card {
  background: linear-gradient(135deg, #1a0a1a 0%, #14141f 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,45,120,0.15);
  box-shadow: 0 8px 32px rgba(255, 45, 120, 0.1);
}

.couple-hero-card {
  background: linear-gradient(135deg, #1a0520 0%, #120818 50%, #14141f 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,45,120,0.15);
  box-shadow: 0 8px 32px rgba(255, 45, 120, 0.12);
}

.bg-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 50% 40%, rgba(255,45,120,0.15) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(255,45,120,0.05) 0%, transparent 60%);
}

/* ── Couple Avatars ────────────────────────────────────────── */
.couple-avatars {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 14px; gap: 0;
}

.avatar-circle {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.9rem;
  border: 3px solid rgba(255,255,255,0.4);
}
.avatar-circle.large { width: 56px; height: 56px; font-size: 1rem; }

.avatar-heart {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.25); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  margin: 0 -6px; z-index: 2;
  animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ── Love Meter ────────────────────────────────────────────── */
.love-meter-bar {
  height: 6px; border-radius: 999px;
  overflow: hidden; position: relative;
}
.love-meter-fill {
  height: 100%; border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.9));
}

/* ── Streak Display ────────────────────────────────────────── */
.streak-display {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.2); padding: 6px 16px;
  border-radius: var(--radius-full); color: #fff;
  font-size: 0.82rem; font-weight: 700;
  backdrop-filter: blur(8px);
}

.streak-warning {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.15); padding: 8px 16px;
  border-radius: var(--radius-md); color: #92400E;
  font-size: 0.8rem; font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Stat Chips ────────────────────────────────────────────── */
.stat-chips {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.stat-chip {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 16px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.stat-chip:hover { border-color: rgba(255,255,255,0.12); }

.stat-chip-icon { font-size: 1.4rem; flex-shrink: 0; }
.stat-chip-value { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); }
.stat-chip-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ── XP / LP Progress Bar ─────────────────────────────────── */
.xp-bar-wrap, .lp-bar-wrap {
  height: 8px; background: var(--primary-pale);
  border-radius: var(--radius-full); overflow: hidden;
}
.xp-bar-fill, .lp-bar-fill {
  height: 100%; background: var(--gradient-main);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 700; color: #fff;
}
.section-link {
  font-size: 0.78rem; font-weight: 600; color: var(--primary);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-love {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 24px;
  background: var(--gradient-main);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  border: none; border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
  transition: all 0.3s ease; cursor: pointer;
  font-family: var(--font-main);
}
.btn-love:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255, 107, 157, 0.4); }
.btn-love:active { transform: scale(0.97); }
.btn-love:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-love-outline {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 24px;
  background: transparent; color: var(--primary);
  font-weight: 700; font-size: 0.9rem;
  border: 2px solid var(--primary); border-radius: var(--radius-full);
  transition: all 0.3s ease; cursor: pointer;
  font-family: var(--font-main); text-decoration: none;
}
.btn-love-outline:hover { background: var(--primary-pale); }

.btn-sm {
  padding: 8px 16px; font-size: 0.8rem;
  width: auto; display: inline-flex;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: transparent;
  color: var(--text-muted); font-weight: 600; font-size: 0.82rem;
  border: none; border-radius: var(--radius-full);
  transition: all 0.2s; cursor: pointer;
  font-family: var(--font-main);
}
.btn-ghost:hover { background: var(--primary-pale); color: var(--primary); }

/* ── Inputs ────────────────────────────────────────────────── */
.input-group-love {
  margin-bottom: 16px; position: relative;
}

.form-label-love {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-dark); margin-bottom: 6px;
}

.input-love {
  width: 100%; padding: 13px 16px 13px 44px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.9rem; font-family: var(--font-main);
  color: var(--text-dark); transition: all 0.25s;
  outline: none;
}
.input-love:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255, 45, 120, 0.15); }
.input-love.no-icon { padding-left: 16px; }

.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  pointer-events: none;
}

select.input-love {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239A9ABF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-love {
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  animation: slideDown 0.3s ease;
}
.alert-love-success { background: rgba(34, 197, 94, 0.1); color: #15803D; border: 1px solid rgba(34, 197, 94, 0.2); }
.alert-love-error   { background: rgba(239, 68, 68, 0.1); color: #DC2626; border: 1px solid rgba(239, 68, 68, 0.2); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Auth Divider ──────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; margin: 20px 0;
  color: var(--text-muted); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border-light);
}
.auth-divider span { padding: 0 14px; font-weight: 500; }

/* ── Quiz Category Cards ───────────────────────────────────── */
.quiz-category-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}

.quiz-category-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 18px 16px; border-radius: var(--radius-lg);
  color: #fff; text-decoration: none;
  position: relative; overflow: hidden;
  transition: all 0.3s ease;
  min-height: 90px;
}
.quiz-category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quiz-category-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.12) 0%, transparent 70%);
}

.cat-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; position: relative; z-index: 1;
}

.cat-name {
  font-size: 0.85rem; font-weight: 700; position: relative; z-index: 1;
}
.cat-count {
  font-size: 0.7rem; opacity: 0.8; display: block;
  margin-top: 2px; position: relative; z-index: 1;
}

/* ── Question Card ─────────────────────────────────────────── */
.question-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.question-num {
  font-size: 0.72rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}

.question-text {
  font-size: 1.1rem; font-weight: 700; color: var(--text-dark);
  line-height: 1.5;
}

/* ── Quiz Options ──────────────────────────────────────────── */
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-card); border: 2px solid var(--border-light);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all 0.25s ease; font-weight: 600;
  font-size: 0.9rem; color: var(--text-dark);
}
.quiz-option:hover { border-color: var(--primary); background: var(--primary-pale); }
.quiz-option.selected { border-color: var(--primary); background: rgba(255, 107, 157, 0.12); color: var(--primary-dark); }
.quiz-option.correct  { border-color: #22C55E; background: rgba(34, 197, 94, 0.1); color: #15803D; }
.quiz-option.wrong    { border-color: #EF4444; background: rgba(239, 68, 68, 0.1); color: #DC2626; }

.quiz-option-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-pale); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem; flex-shrink: 0;
  transition: all 0.25s;
}
.quiz-option.selected .quiz-option-letter { background: var(--primary); color: #fff; }

/* ── Quiz Progress ─────────────────────────────────────────── */
.quiz-progress-bar {
  height: 6px; background: var(--primary-pale);
  border-radius: var(--radius-full); overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; background: var(--gradient-main);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Profile ───────────────────────────────────────────────── */
.profile-hero {
  text-align: center; padding: 24px 0 0;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem; font-weight: 800;
  margin: 0 auto 12px;
  border: 4px solid rgba(255,255,255,0.5);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}
.profile-name { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); }
.profile-level { font-size: 0.82rem; color: var(--text-muted); margin: 2px 0 10px; }

.level-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700;
  background: var(--gradient-main); color: #fff;
}

/* ── Badges Grid ───────────────────────────────────────────── */
.badges-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.badge-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border-card);
  text-align: center; transition: all 0.2s;
}
.badge-item.locked { opacity: 0.45; filter: grayscale(0.5); }
.badge-item.earned { border-color: rgba(255, 215, 0, 0.3); }
.badge-item:hover { transform: translateY(-2px); }

.badge-icon { margin-bottom: 6px; }
.badge-name { font-size: 0.7rem; font-weight: 600; color: var(--text-dark); }
.badge-tier { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── Challenge Cards ───────────────────────────────────────── */
.challenge-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; margin-bottom: 12px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}
.challenge-card:hover { box-shadow: var(--shadow-sm); }

.challenge-icon-wrap {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.challenge-info { flex: 1; min-width: 0; }
.challenge-title { font-weight: 700; font-size: 0.88rem; color: var(--text-dark); }
.challenge-desc { font-size: 0.78rem; color: var(--text-muted); margin: 4px 0 8px; line-height: 1.4; }
.challenge-rewards { display: flex; gap: 6px; flex-wrap: wrap; }
.reward-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-pale); color: var(--primary-dark);
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: 0.68rem; font-weight: 700;
}

/* ── Activity Items ────────────────────────────────────────── */
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
}
.activity-text { flex: 1; font-size: 0.82rem; color: var(--text-body); }
.activity-time { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }

/* ── Countdown ─────────────────────────────────────────────── */
.countdown-grid {
  display: flex; justify-content: center; gap: 12px;
  padding: 8px 0;
}
.countdown-unit { text-align: center; }
.countdown-value {
  display: block; font-size: 1.6rem; font-weight: 800;
  color: var(--primary); line-height: 1;
}
.countdown-label {
  display: block; font-size: 0.65rem; font-weight: 600;
  color: var(--text-muted); margin-top: 4px; text-transform: uppercase;
}

/* ── Leaderboard ───────────────────────────────────────────── */
.hearts-display {
  display: flex; align-items: center; gap: 4px;
}
.hearts-display svg { width: 16px; height: 16px; }
.hearts-count { font-weight: 700; font-size: 0.82rem; color: var(--primary-dark); }

/* ── Filter Tabs ───────────────────────────────────────────── */
.filter-tab {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--radius-full);
  border: 2px solid var(--border-light); background: transparent;
  color: var(--text-muted); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  font-family: var(--font-main);
}
.filter-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Spinner ───────────────────────────────────────────────── */
.spinner-love {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,107,157,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   CHAT STYLES
   ═══════════════════════════════════════════════════════════ */
.chat-wrapper {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--topbar-height) - var(--nav-height) - var(--safe-bottom));
  padding-top: calc(var(--topbar-height) + 8px);
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
  max-width: 520px; margin: 0 auto;
  position: relative;
}
.chat-wrapper.no-nav {
  height: calc(100vh - var(--topbar-height));
  padding-top: calc(var(--topbar-height) + 4px);
  padding-bottom: calc(76px + var(--safe-bottom));
}

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(12, 12, 20, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky; top: var(--topbar-height); z-index: 10;
}

.chat-partner-name { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); }
.chat-partner-status { font-size: 0.72rem; color: var(--text-muted); }
.chat-online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E; display: inline-block; margin-right: 4px;
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 78%; padding: 10px 14px;
  border-radius: 18px; position: relative;
  font-size: 0.88rem; line-height: 1.45;
  word-wrap: break-word; animation: bubbleIn 0.3s ease;
}
.chat-bubble.sent {
  align-self: flex-end;
  background: var(--gradient-main); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg-card); color: var(--text-dark);
  border: 1px solid var(--border-card);
  border-bottom-left-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.62rem; opacity: 0.7;
  margin-top: 4px; text-align: right;
}

.chat-bubble-reactions {
  display: flex; gap: 2px; margin-top: 4px;
  flex-wrap: wrap;
}

.chat-reaction {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border-radius: var(--radius-full);
  background: rgba(0,0,0,0.06); font-size: 0.72rem;
  cursor: pointer; transition: all 0.2s;
}
.chat-reaction:hover { background: rgba(255, 45, 120, 0.15); }

.chat-love-note {
  background: linear-gradient(135deg, rgba(255,45,120,0.08), rgba(255,45,120,0.04)) !important;
  border: 2px solid rgba(255, 45, 120, 0.2) !important;
  color: var(--text-dark) !important;
  border-radius: 18px !important;
  position: relative;
}
.chat-love-note::before {
  content: '💌 Love Note';
  display: block; font-size: 0.68rem; font-weight: 700;
  color: var(--primary); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.chat-photo { border-radius: 14px; max-width: 220px; cursor: pointer; }
.chat-voice-note {
  display: flex; align-items: center; gap: 10px;
  min-width: 180px;
}

.chat-pinned-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.62rem; color: var(--primary);
  font-weight: 600; margin-bottom: 4px;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-date-separator {
  text-align: center; padding: 8px 0;
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
}
.chat-date-separator span {
  background: var(--bg-card); padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card);
  position: fixed; bottom: var(--nav-height);
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  z-index: 50;
}
.chat-wrapper.no-nav .chat-input-bar {
  bottom: 0;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.chat-input {
  flex: 1; padding: 10px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.88rem; font-family: var(--font-main);
  color: var(--text-dark); outline: none;
  resize: none; max-height: 100px;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gradient-main);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 2px 12px rgba(255, 107, 157, 0.3);
}
.chat-send-btn:hover { transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.95); }

.chat-action-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-pale);
  border: none; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: all 0.2s;
}
.chat-action-btn:hover { background: rgba(255, 107, 157, 0.2); }

/* ═══════════════════════════════════════════════════════════
   LIVE BATTLE STYLES
   ═══════════════════════════════════════════════════════════ */
.battle-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}

.battle-invite-popup {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  max-width: 340px; width: 90%;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.battle-split-screen {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; width: 100%; max-width: 400px;
}

.battle-player-side {
  padding: 20px; text-align: center;
  border-radius: var(--radius-lg);
  min-height: 160px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.battle-player-side.left { background: rgba(255, 107, 157, 0.1); }
.battle-player-side.right { background: rgba(162, 89, 255, 0.1); }

.battle-player-name {
  font-weight: 800; font-size: 0.95rem;
  color: var(--text-dark); margin-bottom: 8px;
}

.battle-player-answer {
  font-size: 1.1rem; font-weight: 700;
  padding: 10px 20px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 2px solid var(--border-light);
  min-width: 100px;
}

.battle-match-result {
  text-align: center; padding: 16px;
  font-size: 1.4rem; font-weight: 800;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.battle-countdown {
  font-size: 5rem; font-weight: 900;
  color: var(--primary);
  animation: countPop 1s ease-in-out;
  text-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}

@keyframes countPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.battle-waiting {
  text-align: center;
}
.battle-waiting-dots {
  display: inline-flex; gap: 4px;
}
.battle-waiting-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  animation: waitingDot 1.4s ease-in-out infinite;
}
.battle-waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.battle-waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes waitingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Battle Reactions */
.battle-reactions {
  display: flex; gap: 8px; justify-content: center;
  padding: 12px;
}
.battle-reaction-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer;
  transition: all 0.2s;
}
.battle-reaction-btn:hover { transform: scale(1.15); background: rgba(255,255,255,0.2); }

.floating-reaction {
  position: fixed; z-index: 300;
  font-size: 2rem;
  animation: floatUp 2s ease-out forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-200px) scale(1.5); }
}

/* Battle Presence */
.presence-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-full);
}
.presence-indicator.online { color: #22C55E; background: rgba(34, 197, 94, 0.1); }
.presence-indicator.offline { color: #EF4444; background: rgba(239, 68, 68, 0.1); }

/* ═══════════════════════════════════════════════════════════
   HOT SEAT STYLES
   ═══════════════════════════════════════════════════════════ */
.hot-seat-screen {
  text-align: center; padding: 24px 16px;
}

.hot-seat-turn {
  background: var(--gradient-main);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  color: #fff; text-align: center;
  margin-bottom: 20px;
}

.hot-seat-pass-screen {
  background: var(--text-dark);
  color: #fff;
  position: fixed; inset: 0; z-index: 150;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 24px;
}

.hot-seat-reveal {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 20px 0;
}

.hot-seat-answer-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 20px; text-align: center;
  border: 2px solid var(--border-light);
  animation: revealSlide 0.5s ease-out;
}

@keyframes revealSlide {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   MOOD SYNC STYLES
   ═══════════════════════════════════════════════════════════ */
.mood-picker {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; padding: 16px 0;
}

.mood-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card); border: 2px solid var(--border-light);
  cursor: pointer; transition: all 0.25s;
  min-width: 70px;
}
.mood-option:hover { border-color: var(--primary); transform: translateY(-2px); }
.mood-option.selected { border-color: var(--primary); background: var(--primary-pale); box-shadow: var(--shadow-sm); }
.mood-option .mood-emoji { font-size: 1.8rem; }
.mood-option .mood-label { font-size: 0.72rem; font-weight: 600; color: var(--text-dark); }

.mood-partner-card {
  background: var(--bg-card); border: 2px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 20px;
  text-align: center; margin: 16px 0;
}

.mood-suggestion {
  background: rgba(255, 45, 120, 0.08);
  border: 1px solid rgba(255, 45, 120, 0.15);
  border-radius: var(--radius-lg); padding: 16px;
  font-size: 0.85rem; color: var(--text-body);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   TIME CAPSULE STYLES
   ═══════════════════════════════════════════════════════════ */
.capsule-card {
  background: var(--bg-card); border: 2px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 20px;
  margin-bottom: 14px; position: relative;
  overflow: hidden; transition: all 0.3s;
}
.capsule-card.locked {
  background: linear-gradient(135deg, #F8F8FC, #F0F0FA);
  border-style: dashed;
}
.capsule-card.opened {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.03);
}

.capsule-icon {
  font-size: 2.5rem; margin-bottom: 8px;
}
.capsule-unlock-date {
  font-size: 0.78rem; font-weight: 600;
  color: var(--primary); background: var(--primary-pale);
  padding: 4px 12px; border-radius: var(--radius-full);
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   WISHLIST STYLES
   ═══════════════════════════════════════════════════════════ */
.wishlist-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 12px; display: flex; gap: 14px;
  align-items: flex-start; transition: all 0.2s;
}
.wishlist-card:hover { box-shadow: var(--shadow-sm); }
.wishlist-card.hidden-item { opacity: 0.5; filter: blur(2px); }
.wishlist-card.fulfilled { border-color: rgba(34, 197, 94, 0.3); }

.wishlist-priority {
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
}
.wishlist-priority.high { background: rgba(239, 68, 68, 0.1); color: #DC2626; }
.wishlist-priority.medium { background: rgba(245, 158, 11, 0.1); color: #D97706; }
.wishlist-priority.low { background: rgba(34, 197, 94, 0.1); color: #16A34A; }

/* ═══════════════════════════════════════════════════════════
   FLAG GAME STYLES
   ═══════════════════════════════════════════════════════════ */
.flag-scenario-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 20px; text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.flag-scenario-text {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-dark); line-height: 1.5;
  margin-bottom: 24px;
}

.flag-vote-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

.flag-vote-btn {
  padding: 16px; border-radius: var(--radius-lg);
  border: 3px solid transparent;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  font-family: var(--font-main);
}
.flag-vote-btn.green {
  background: rgba(34, 197, 94, 0.08);
  color: #16A34A; border-color: rgba(34, 197, 94, 0.2);
}
.flag-vote-btn.green:hover, .flag-vote-btn.green.selected {
  background: rgba(34, 197, 94, 0.15); border-color: #22C55E;
}
.flag-vote-btn.red {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626; border-color: rgba(239, 68, 68, 0.2);
}
.flag-vote-btn.red:hover, .flag-vote-btn.red.selected {
  background: rgba(239, 68, 68, 0.15); border-color: #EF4444;
}

.flag-emoji { font-size: 2rem; }

/* ═══════════════════════════════════════════════════════════
   MYSTERY BOX STYLES
   ═══════════════════════════════════════════════════════════ */
.mystery-box {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px; text-align: center;
  margin-bottom: 16px;
  transition: all 0.3s;
  cursor: pointer;
}
.mystery-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mystery-box.bronze { border-color: rgba(205, 127, 50, 0.3); }
.mystery-box.silver { border-color: rgba(192, 192, 192, 0.4); }
.mystery-box.gold { border-color: rgba(255, 215, 0, 0.4); }

.mystery-box-icon {
  font-size: 3rem; margin-bottom: 12px;
  animation: boxFloat 3s ease-in-out infinite;
}
@keyframes boxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mystery-box-opening {
  animation: boxOpen 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes boxOpen {
  0% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.1) rotate(-5deg); }
  50% { transform: scale(1.2) rotate(5deg); }
  75% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ═══════════════════════════════════════════════════════════
   LOVE BANK STYLES
   ═══════════════════════════════════════════════════════════ */
.love-gift-animation {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(26, 26, 46, 0.9);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}

.love-gift-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 32px; text-align: center;
  max-width: 320px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.love-gift-hearts {
  font-size: 3rem;
  animation: heartBounce 0.8s ease-in-out infinite;
}
@keyframes heartBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════
   REPUTATION STYLES
   ═══════════════════════════════════════════════════════════ */
.rating-star-row {
  display: flex; gap: 4px;
}
.rating-star {
  font-size: 1.6rem; cursor: pointer;
  transition: transform 0.2s; filter: grayscale(1);
}
.rating-star:hover { transform: scale(1.2); }
.rating-star.active { filter: grayscale(0); }

.reputation-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
}
.reputation-label {
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-dark); min-width: 80px;
}
.reputation-fill-wrap {
  flex: 1; height: 8px; background: var(--primary-pale);
  border-radius: var(--radius-full); overflow: hidden;
}
.reputation-fill {
  height: 100%; background: var(--gradient-main);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ═══════════════════════════════════════════════════════════
   CELEBRATION ANIMATION
   ═══════════════════════════════════════════════════════════ */
.celebration-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.celebration-overlay.hidden { display: none; }

.celebration-heart {
  font-size: 5rem;
  animation: celebrationPulse 1s ease-in-out infinite;
}
@keyframes celebrationPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.celebration-text {
  font-family: var(--font-script);
  font-size: 2rem; color: #fff;
  margin-top: 20px;
  animation: fadeSlideUp 0.8s ease-out 0.5s both;
}

.celebration-subtext {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  margin-top: 12px;
  animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   SCREEN REVEAL ANIMATION
   ═══════════════════════════════════════════════════════════ */
.reveal-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 16px 0;
}

.reveal-player {
  padding: 20px; text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.reveal-player:last-child { border-bottom: none; }

.reveal-player-name {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 6px;
}

.reveal-player-answer {
  font-size: 1.2rem; font-weight: 800;
  color: var(--text-dark);
  animation: revealFade 0.5s ease-out;
}

@keyframes revealFade {
  from { opacity: 0; filter: blur(10px); }
  to   { opacity: 1; filter: blur(0); }
}

.reveal-match-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius-full);
  font-weight: 800; font-size: 1rem;
  margin-top: 12px;
}
.reveal-match-badge.matched {
  background: rgba(34, 197, 94, 0.1); color: #16A34A;
}
.reveal-match-badge.not-matched {
  background: rgba(239, 68, 68, 0.1); color: #DC2626;
}

/* ═══════════════════════════════════════════════════════════
   HAPPINESS METER
   ═══════════════════════════════════════════════════════════ */
.happiness-meter {
  text-align: center; padding: 16px;
}

.happiness-circle {
  width: 100px; height: 100px; margin: 0 auto 12px;
  position: relative;
}
.happiness-circle svg {
  transform: rotate(-90deg);
}
.happiness-value {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: var(--text-dark);
}

/* ═══════════════════════════════════════════════════════════
   FLOATING HEARTS & CONFETTI
   ═══════════════════════════════════════════════════════════ */
.floating-hearts-container {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 400;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  animation: floatHeart 3s ease-out forwards;
  fill: var(--primary);
  opacity: 0.7;
}

@keyframes floatHeart {
  0% { transform: translateY(0) rotate(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-100vh) rotate(720deg) scale(0.3); opacity: 0; }
}

.confetti-piece {
  position: fixed; top: -10px; z-index: 400;
  animation: confettiFall 3s ease-in forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   GENERIC ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  0%  { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ═══════════════════════════════════════════════════════════
   QUICK ACCESS GRID (Dashboard)
   ═══════════════════════════════════════════════════════════ */
.quick-access-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}

.quick-access-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 16px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text-dark);
  transition: all 0.25s;
}
.quick-access-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.12);
}

.quick-access-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

.quick-access-label {
  font-size: 0.72rem; font-weight: 600;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .stat-chips { grid-template-columns: repeat(2, 1fr); }
  .quiz-category-grid { grid-template-columns: 1fr; }
  .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .page-wrapper { max-width: 560px; }
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES (Login/Register)
   ═══════════════════════════════════════════════════════════ */
.auth-container {
  min-height: 100vh; display: flex;
  flex-direction: column; align-items: center;
  justify-content: center; padding: 24px;
  background: var(--bg-app);
}

.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  font-family: var(--font-main);
  font-size: 2.2rem; font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-align: center; margin-bottom: 8px;
}

.auth-subtitle {
  text-align: center; font-size: 0.88rem;
  color: var(--text-muted); margin-bottom: 28px;
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 45, 120, 0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 45, 120, 0.4); }

/* ═══════════════════════════════════════════════════════════
   DAILY REWARD CARD
   ═══════════════════════════════════════════════════════════ */
.daily-reward-card {
  background: linear-gradient(135deg, rgba(255,45,120,0.12), rgba(217,26,96,0.06));
  border-color: rgba(255,45,120,0.2);
}

/* ═══════════════════════════════════════════════════════════
   TAB SYSTEM
   ═══════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-full);
  padding: 4px; margin-bottom: 20px;
}
.tab-item {
  flex: 1; text-align: center;
  padding: 10px 16px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 700;
  text-decoration: none; transition: all 0.2s;
  color: var(--text-muted);
}
.tab-item.active {
  background: var(--gradient-main); color: #fff;
  box-shadow: 0 4px 12px rgba(255,45,120,0.3);
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; color: var(--text-dark); }
.empty-state-desc { font-size: 0.85rem; }

/* ═══════════════════════════════════════════════════════════
   VIDEO CALL (PiP) LAYOUT
   ═══════════════════════════════════════════════════════════ */
#remote-video {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

#local-video {
  position: absolute;
  bottom: 120px; right: 20px;
  width: 100px; height: 140px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 5;
  transition: transform 0.3s;
}

#local-video.hidden {
  display: none !important;
}

#call-active-ui {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

#call-active.video-mode #call-active-ui {
  background: rgba(0,0,0,0.5);
  padding: 20px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-top: auto;
  margin-bottom: 30px;
}

/* ── Hot Seat Invite Popup Animations ────────────────────── */
@keyframes hsFadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes hsSlideUp { from { transform:translateY(40px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* ── Premium Dashboard Cards ─────────────────────────────── */
.premium-tool-card:hover {
  transform: translateY(-4px) scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}

.premium-tool-card:active {
  transform: scale(0.97);
}

.premium-glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.25) !important;
}

/* ── Premium Animated Skeleton Loading System ──────────────── */
@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes skeletonPulseGlow {
  0%, 100% {
    opacity: 0.6;
    border-color: rgba(255, 45, 120, 0.1);
  }
  50% {
    opacity: 1;
    border-color: rgba(255, 45, 120, 0.3);
  }
}

.skeleton-pulse {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 45, 120, 0.16) 35%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 45, 120, 0.16) 65%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 300% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite, skeletonPulseGlow 2.5s ease-in-out infinite;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.skeleton-avatar {
  border-radius: 50% !important;
}

.skeleton-screen {
  position: relative;
}

.skeleton-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; min-height: 100%;
  z-index: 90;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0 30px 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease, visibility 0.4s ease;
  will-change: opacity, transform;
}

.skeleton-overlay.skeleton-fade-out {
  opacity: 0;
  transform: scale(0.98);
  visibility: hidden;
  pointer-events: none;
}

/* ── Card Shine Sweep Animation ───────────────────────────── */
.shine-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.shine-card img {
  border-radius: 24px;
}

.shine-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: cardShineSweep 3.6s ease-in-out infinite;
  will-change: left;
}

@keyframes cardShineSweep {
  0% {
    left: -70%;
  }
  35%, 100% {
    left: 160%;
  }
}


