@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap');

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

:root {
  --purple: #6C3CE1;
  --purple-deep: #4A1FB8;
  --blue: #3B82F6;
  --blue-deep: #2563EB;
  --pink: #D946A8;
  --pink-deep: #B8338A;
  --coral: #E86B5A;
  --bg-dark: #12122a;
  --bg-card: #1A1230;
  --bg-card-hover: #231A40;
  --text: #F0EBF8;
  --text-muted: #A89EC4;
  --radius: 16px;
  --glow-purple: 0 0 30px rgba(108, 60, 225, 0.4);
  --glow-blue: 0 0 30px rgba(59, 130, 246, 0.4);
  --glow-pink: 0 0 30px rgba(217, 70, 168, 0.4);
}

body.light-mode {
  --bg-dark: #e8e4f0;
  --bg-card: #ddd6ee;
  --bg-card-hover: #d0c8e2;
  --text: #2a1f42;
  --text-muted: #5c4f7a;
}

body.light-mode .navbar {
  background: rgba(232, 228, 240, 0.9);
  border-bottom-color: rgba(108, 60, 225, 0.15);
}

body.light-mode .joke-punchline {
  color: var(--pink-deep);
}

body.light-mode .joke-card {
  background: var(--bg-card);
  border-color: rgba(108, 60, 225, 0.15);
}

body.light-mode .joke-card.revealed {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.1);
}

body.light-mode .update-card {
  background: var(--bg-card);
}

body.light-mode .footer {
  border-top-color: rgba(108, 60, 225, 0.15);
}

body.light-mode .quiz-card,
body.light-mode .game-card,
body.light-mode .game-area {
  background: var(--bg-card);
}

body.light-mode .quiz-option {
  background: var(--bg-card);
  color: var(--text);
}

body.light-mode .quiz-option:hover {
  background: rgba(108, 60, 225, 0.08);
}

body.light-mode .love-input {
  background: var(--bg-dark);
  color: var(--text);
  border-color: rgba(108, 60, 225, 0.2);
}

body.light-mode .love-calc-card,
body.light-mode .love-result-card {
  background: var(--bg-card);
}

body.light-mode .love-result-bar {
  background: var(--bg-dark);
}

body.light-mode .filter-btn {
  color: var(--text-muted);
}

body.light-mode .light-mode-btn {
  background: #2a1f42;
  color: #f0ece6;
  border-color: rgba(108, 60, 225, 0.3);
}

/* Light Mode Toggle */
.light-mode-btn {
  position: fixed;
  top: 4.5rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(108, 60, 225, 0.2);
  background: #f0ece6;
  color: #2a1f42;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.light-mode-btn:hover {
  box-shadow: 0 0 12px rgba(108, 60, 225, 0.3);
}

/* Avatar Picker Button */
.avatar-picker-btn {
  position: fixed;
  top: 4.5rem;
  right: 0.75rem;
  z-index: 200;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(108, 60, 225, 0.2);
  background: #f0ece6;
  color: #2a1f42;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.avatar-picker-btn:hover {
  box-shadow: 0 0 12px rgba(108, 60, 225, 0.3);
}

body.light-mode .avatar-picker-btn {
  background: #2a1f42;
  color: #f0ece6;
  border-color: rgba(108, 60, 225, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fredoka', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6,
.nav-logo,
.hero-title,
.section-title,
.quiz-question,
.quiz-result h2,
.game-wrapper h2 {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15, 10, 26, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(108, 60, 225, 0.2);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s, text-shadow 0.3s;
  padding: 0.3rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  text-shadow: 0 0 12px rgba(108, 60, 225, 0.6);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  min-height: 70vh;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 60, 225, 0.3), rgba(217, 70, 168, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple), var(--blue), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-top: 1rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  flex-wrap: wrap;
  justify-content: center;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: white;
  box-shadow: var(--glow-purple);
}

.btn-primary:hover {
  box-shadow: 0 0 40px rgba(108, 60, 225, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: white;
  box-shadow: var(--glow-pink);
}

.btn-secondary:hover {
  box-shadow: 0 0 40px rgba(217, 70, 168, 0.6);
}

.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: white;
  box-shadow: var(--glow-blue);
}

.btn-blue:hover {
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
}

.btn-green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.btn-green:hover {
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.6);
}

.btn-yellow {
  background: linear-gradient(135deg, #EAB308, #CA8A04);
  color: #1a1230;
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.4);
}

.btn-yellow:hover {
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.6);
}

.btn-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-red:hover {
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
}

.btn-rosegold {
  background: linear-gradient(135deg, #c9a0a0, #b07878);
  color: white;
  box-shadow: 0 0 30px rgba(201, 160, 160, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-rosegold:hover {
  box-shadow: 0 0 40px rgba(201, 160, 160, 0.6);
}

.btn-white {
  background: #F0EBF8;
  color: #1a1230;
  box-shadow: 0 0 30px rgba(240, 235, 248, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.btn-white:hover {
  box-shadow: 0 0 40px rgba(240, 235, 248, 0.5);
}

.btn-coral {
  background: linear-gradient(135deg, #E86B5A, #d4533f);
  color: white;
  box-shadow: 0 0 30px rgba(232, 107, 90, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-coral:hover {
  box-shadow: 0 0 40px rgba(232, 107, 90, 0.6);
}

.btn-coral:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(232, 107, 90, 0.3);
}

.btn-darkgreen {
  background: linear-gradient(135deg, #2d6a4f, #1b4332);
  color: white;
  box-shadow: 0 0 30px rgba(45, 106, 79, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-darkgreen:hover {
  box-shadow: 0 0 40px rgba(45, 106, 79, 0.6);
}

.btn-darkgreen:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(45, 106, 79, 0.3);
}

.btn-navygray {
  background: linear-gradient(135deg, #4a5568, #2d3748);
  color: white;
  box-shadow: 0 0 30px rgba(74, 85, 104, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-navygray:hover {
  box-shadow: 0 0 40px rgba(74, 85, 104, 0.6);
}

.btn-navygray:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(74, 85, 104, 0.3);
}

.btn-lavender {
  background: linear-gradient(135deg, #b4a7d6, #9688c4);
  color: #1a1230;
  box-shadow: 0 0 30px rgba(180, 167, 214, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-lavender:hover {
  box-shadow: 0 0 40px rgba(180, 167, 214, 0.6);
}

.btn-maroon {
  background: linear-gradient(135deg, #8b2252, #6b1a3e);
  color: white;
  box-shadow: 0 0 30px rgba(139, 34, 82, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-maroon:hover {
  box-shadow: 0 0 40px rgba(139, 34, 82, 0.6);
}

.btn-maroon:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(139, 34, 82, 0.3);
}

.btn-teal {
  background: linear-gradient(135deg, #81d4c4, #5bb8a6);
  color: #1a1230;
  box-shadow: 0 0 30px rgba(129, 212, 196, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-teal:hover {
  box-shadow: 0 0 40px rgba(129, 212, 196, 0.6);
}

.btn-orange {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: white;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-orange:hover {
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.6);
}

.btn-yellow-orange {
  background: linear-gradient(135deg, #f0a500, #d4910a);
  color: #1a1230;
  box-shadow: 0 0 30px rgba(240, 165, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.btn-yellow-orange:hover {
  box-shadow: 0 0 40px rgba(240, 165, 0, 0.6);
}

.btn-copy {
  background: linear-gradient(135deg, #EAB308, #CA8A04);
  color: #1a1230;
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.4);
  font-size: 0.85rem;
  padding: 0.6rem 1.4rem;
  -webkit-tap-highlight-color: transparent;
}

.btn-copy:hover {
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--purple);
}

.btn-outline:hover {
  background: rgba(108, 60, 225, 0.15);
  box-shadow: var(--glow-purple);
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featured {
  padding: 3rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 60, 225, 0.4);
}

.card-quiz:hover  { box-shadow: var(--glow-purple); }
.card-games:hover { box-shadow: var(--glow-pink); }
.card-trivia:hover { box-shadow: var(--glow-blue); }

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== QUIZ PAGE ===== */
.page-header {
  text-align: center;
  padding: 3rem 2rem 2rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.quiz-filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0 2rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: 2px solid rgba(108, 60, 225, 0.25);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
  border-color: var(--purple);
  color: var(--text);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  border-color: transparent;
  color: white;
  box-shadow: var(--glow-purple);
}

.quiz-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-purple);
  border-color: rgba(108, 60, 225, 0.4);
}

.quiz-card-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.quiz-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.quiz-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

.quiz-card .quiz-tag {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(108, 60, 225, 0.2);
  color: var(--purple);
  width: fit-content;
}

.quiz-tag.personality { background: rgba(217, 70, 168, 0.2); color: var(--pink); }
.quiz-tag.trivia      { background: rgba(59, 130, 246, 0.2); color: var(--blue); }
.quiz-tag.fun         { background: rgba(232, 107, 90, 0.2); color: var(--coral); }
.quiz-tag.study       { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

/* ===== QUIZ PLAYER ===== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-card);
  border-radius: 50px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 50px;
  transition: width 0.4s ease;
}

.quiz-progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.quiz-question {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  background: var(--bg-card);
  border: 2px solid rgba(108, 60, 225, 0.15);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.2s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.quiz-option:hover {
  border-color: var(--purple);
  background: rgba(108, 60, 225, 0.1);
  transform: translateX(4px);
}

.quiz-option.selected {
  border-color: var(--purple);
  background: rgba(108, 60, 225, 0.2);
  box-shadow: var(--glow-purple);
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.quiz-option:disabled {
  cursor: default;
  transform: none;
}

.quiz-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* ===== QUIZ RESULTS ===== */
.quiz-result {
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.quiz-result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.quiz-result h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz-result p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-result .score {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text);
  margin: 1rem 0;
}

.quiz-result-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ===== GAME PAGE ===== */
.game-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-pink);
  border-color: rgba(217, 70, 168, 0.4);
}

.game-card-emoji {
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.game-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.game-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

/* ===== GAME CONTAINERS ===== */
.game-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.game-wrapper h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.game-score {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.game-score span {
  color: var(--text);
  font-weight: 700;
}

.game-area {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}


/* Memory Match Game */
.memory-grid {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.memory-grid.size-4 {
  grid-template-columns: repeat(4, 1fr);
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  border: 2px solid rgba(108, 60, 225, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  user-select: none;
}

.memory-card:hover {
  transform: scale(1.05);
}

.memory-card.flipped {
  background: var(--bg-card-hover);
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
}

.memory-card.matched {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  cursor: default;
}

.memory-card .card-front {
  display: none;
}

.memory-card.flipped .card-front,
.memory-card.matched .card-front {
  display: block;
}

.memory-card .card-back {
  display: block;
  font-size: 1.4rem;
}

.memory-card.flipped .card-back,
.memory-card.matched .card-back {
  display: none;
}

/* Color Match Game */
.color-word {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
}

.color-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.color-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  color: white;
}

.color-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Star Catcher Game */
.star-catcher-area {
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 45% 10%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 75% 25%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 35% 60%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 55% 90%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 80% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 40% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 85%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 95% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 20% 95%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 5%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 65% 35%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 12% 65%, rgba(255,255,255,0.5), transparent),
    linear-gradient(180deg, #0a0a1a 0%, #12122a 100%);
}

.falling-star {
  position: absolute;
  top: -40px;
  cursor: pointer;
  animation: starFall linear forwards;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(234, 179, 8, 0.6));
  transition: transform 0.1s;
  padding: 4px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.falling-star:hover {
  transform: scale(1.3);
}

@keyframes starFall {
  0% {
    top: -40px;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: calc(100% + 10px);
    opacity: 0;
  }
}

/* Cake Clicker Game */
.cake-clicker-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.cake-click-area {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-count {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cake-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.cake-btn {
  font-size: 8rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  filter: drop-shadow(0 0 15px rgba(217, 70, 168, 0.4));
  touch-action: manipulation;
}

.cake-btn:hover {
  transform: scale(1.08);
}

.cake-btn:active,
.cake-btn.cake-pop {
  transform: scale(0.9);
}

.cake-upgrades {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cake-upgrade-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 2px solid rgba(108, 60, 225, 0.15);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
  touch-action: manipulation;
  min-height: 44px;
}

.cake-upgrade-btn:hover:not(:disabled) {
  border-color: var(--purple);
  box-shadow: var(--glow-purple);
}

.cake-upgrade-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.upgrade-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.upgrade-info strong {
  font-size: 0.9rem;
}

.upgrade-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.upgrade-cost {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* Nail Salon Game */
.nail-salon-area {
  text-align: center;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, #f8f0f4 0%, #f2e8ed 60%, #e8dce4 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* Marble counter texture */
.nail-salon-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(200, 180, 195, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(180, 160, 175, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(190, 170, 185, 0.1) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 20%, rgba(175, 155, 170, 0.1) 0%, transparent 35%);
  pointer-events: none;
}

/* Counter edge */
.nail-salon-area::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #d4c0cc, #e0d0d8, #d4c0cc);
}

.nail-salon-area > * {
  position: relative;
  z-index: 1;
}

.nail-request {
  font-size: 1rem;
  font-weight: 600;
  color: #2a1f42;
  margin-bottom: 1.5rem;
}

.nail-request-preview {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nail-request-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.nail-hand {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.nail-finger {
  width: 42px;
  height: 70px;
  border-radius: 8px 8px 14px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
}

.nail-bed {
  width: 32px;
  height: 38px;
  border-radius: 6px 6px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
}

.nail-sparkle {
  animation: sparkPop 0.3s ease-out;
}

@keyframes sparkPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.nail-next-label {
  font-size: 0.85rem;
  color: #5c4f7a;
  margin-bottom: 1rem;
  font-weight: 600;
}

.nail-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.nail-color-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(42,31,66,0.15);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nail-color-btn:hover {
  transform: scale(1.15);
  border-color: rgba(42,31,66,0.4);
}

.nail-color-btn:active {
  transform: scale(0.95);
}

/* Embers Animation */
.embers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  opacity: 0;
  animation: emberFloat linear infinite;
  box-shadow: 0 0 6px currentColor;
}

@keyframes emberFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.5;
    transform: translateY(-45vh) translateX(15px) scale(0.8);
  }
  80% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-100vh) translateX(-10px) scale(0.3);
    opacity: 0;
  }
}

/* Celebrity Birth Month */
.birth-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.birth-month-btn {
  padding: 0.8rem 0.5rem;
  border-radius: 12px;
  border: 2px solid rgba(217, 70, 168, 0.2);
  background: var(--bg-card-hover);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.birth-month-btn:hover {
  transform: scale(1.05);
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
}

.birth-month-result {
  text-align: center;
}

.birth-month-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.birth-month-result h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.celeb-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
  max-width: 350px;
  margin: 0 auto;
}

.celeb-list li {
  background: var(--bg-card-hover);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(217, 70, 168, 0.15);
  font-size: 1rem;
}

/* ===== JOKES PAGE ===== */
.jokes-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

.joke-section {
  margin-bottom: 2.5rem;
}

.joke-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.joke-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.joke-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.joke-card:hover {
  border-color: rgba(234, 179, 8, 0.4);
}

.joke-setup {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.joke-punchline {
  font-size: 1rem;
  color: var(--pink);
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-top: 0.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.joke-card.revealed .joke-punchline {
  max-height: 100px;
  opacity: 1;
  margin-top: 0.6rem;
}

.joke-card.revealed {
  border-color: rgba(234, 179, 8, 0.4);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.15);
}

/* Typing Test Game */
.typing-area {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.typing-sentence {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-family: 'Segoe UI', system-ui, monospace;
  letter-spacing: 0.5px;
}

.typing-correct {
  color: #22c55e;
}

.typing-wrong {
  color: #ef4444;
  text-decoration: underline;
}

.typing-cursor {
  background: rgba(108, 60, 225, 0.3);
  border-radius: 2px;
  padding: 1px 0;
  color: var(--text);
}

.typing-pending {
  color: var(--text-muted);
}

.typing-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 2px solid rgba(108, 60, 225, 0.2);
  background: var(--bg-dark);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
}

.typing-input:focus {
  border-color: var(--purple);
  box-shadow: var(--glow-purple);
}

.typing-input::placeholder {
  color: rgba(168, 158, 196, 0.5);
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--glow-purple);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  box-shadow: 0 0 40px rgba(108, 60, 225, 0.6);
}

/* Laughing Emoji Animation */
.laughing-emojis {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.laugh-emoji {
  position: absolute;
  top: -40px;
  animation: laughFloat linear infinite;
  user-select: none;
}

@keyframes laughFloat {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: var(--laugh-opacity, 0.08);
  }
  90% {
    opacity: var(--laugh-opacity, 0.08);
  }
  100% {
    transform: translateY(110vh) rotate(25deg);
    opacity: 0;
  }
}

/* Emoji Memory Game */
.emoji-display {
  font-size: 5rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.emoji-display.emoji-flash {
  transform: scale(1.2);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.emoji-btn {
  aspect-ratio: 1;
  font-size: 1.8rem;
  background: var(--bg-card-hover);
  border: 2px solid rgba(108, 60, 225, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.emoji-btn:hover {
  transform: scale(1.08);
  border-color: var(--pink);
}

.emoji-btn:active {
  transform: scale(0.95);
  box-shadow: var(--glow-pink);
}


/* Odd One Out Game */
.odd-grid {
  display: grid;
  gap: 0.6rem;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.odd-cell {
  aspect-ratio: 1;
  font-size: 2rem;
  background: var(--bg-card-hover);
  border: 2px solid rgba(108, 60, 225, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.odd-cell:hover {
  transform: scale(1.08);
  border-color: var(--pink);
}

.odd-cell:active {
  transform: scale(0.95);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(108, 60, 225, 0.1);
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--text);
}

/* ===== STARS ===== */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: starFloat linear infinite;
}

@keyframes starFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: var(--star-opacity, 0.5);
  }
  90% {
    opacity: var(--star-opacity, 0.5);
  }
  100% {
    transform: translateY(-80px) translateX(20px);
    opacity: 0;
  }
}

/* ===== LOVE CALCULATOR ===== */
.love-calc-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.love-calc-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  animation: fadeInUp 0.6s ease-out;
  width: 100%;
}

.love-calc-inputs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.love-input-group {
  width: 100%;
}

.love-input-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.love-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 2px solid rgba(108, 60, 225, 0.2);
  background: var(--bg-dark);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
}

.love-input:focus {
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
}

.love-input::placeholder {
  color: rgba(168, 158, 196, 0.5);
}

.love-heart-divider {
  font-size: 2rem;
  padding: 0.25rem 0;
}

.love-calc-btn {
  width: 100%;
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  box-shadow: var(--glow-pink);
  -webkit-tap-highlight-color: transparent;
}

.love-calc-btn:hover {
  box-shadow: 0 0 40px rgba(217, 70, 168, 0.6);
}

.love-result-card {
  background: var(--bg-card);
  border: 1px solid rgba(217, 70, 168, 0.3);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
  width: 100%;
}

.love-result-percentage {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.love-result-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-dark);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.love-result-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 50px;
  transition: width 1.2s ease-out;
}

.love-result-names {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  animation: heartFloat linear infinite;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--heart-opacity, 0.1);
  }
  90% {
    opacity: var(--heart-opacity, 0.1);
  }
  100% {
    transform: translateY(-110vh) translateX(30px) rotate(20deg);
    opacity: 0;
  }
}

.love-result-message {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* ===== CALCULATOR PAGE ===== */
.calc-container {
  max-width: 320px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 1.2rem;
  overflow: hidden;
}

.calc-display {
  background: var(--bg-dark);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  margin-bottom: 1rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  word-break: break-all;
  overflow: hidden;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.calc-btn {
  padding: 1rem;
  border-radius: 10px;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: var(--bg-card-hover);
  color: var(--text);
  transition: transform 0.1s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 52px;
}

.calc-btn:hover {
  background: rgba(108, 60, 225, 0.15);
}

.calc-btn:active {
  transform: scale(0.95);
}

.calc-op {
  background: rgba(108, 60, 225, 0.2);
  color: var(--purple);
}

.calc-op:hover {
  background: rgba(108, 60, 225, 0.3);
}

.calc-clear {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.calc-clear:hover {
  background: rgba(239, 68, 68, 0.3);
}

.calc-equals {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  box-shadow: var(--glow-purple);
}

.calc-equals:hover {
  box-shadow: 0 0 40px rgba(108, 60, 225, 0.6);
}

.calc-zero {
  grid-column: span 2;
}

/* ===== UPDATES PAGE ===== */
.updates-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.update-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.update-card:hover {
  border-color: rgba(34, 197, 94, 0.4);
}

.update-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.update-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

.update-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== VISIT COUNTER ===== */
.visit-counter {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 200;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid rgba(108, 60, 225, 0.2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ===== AVATAR PICKER ===== */
.avatar-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.avatar-preview-area {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-current {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--purple);
  box-shadow: var(--glow-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 3rem;
  color: var(--text-muted);
  transition: background 0.3s, box-shadow 0.3s;
}

.avatar-current-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.avatar-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}

.avatar-option {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid rgba(108, 60, 225, 0.15);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-option:hover {
  transform: scale(1.1);
  border-color: var(--purple);
}

.avatar-option:active {
  transform: scale(0.95);
}

.avatar-option.avatar-selected {
  border-color: var(--pink);
  box-shadow: var(--glow-pink);
}

.avatar-emoji-option {
  background: var(--bg-card);
  font-size: 1.5rem;
}

.avatar-color-option {
  border-radius: 50%;
}

/* ===== ADMIN AVATAR STYLE ===== */
.avatar-admin-border {
  border: 3px solid transparent;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)), linear-gradient(135deg, #3B82F6, #EAB308);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4), 0 0 12px rgba(234, 179, 8, 0.4);
  animation: adminGlow 2s ease-in-out infinite alternate;
}

@keyframes adminGlow {
  0% { box-shadow: 0 0 12px rgba(59, 130, 246, 0.5), 0 0 6px rgba(234, 179, 8, 0.2); }
  100% { box-shadow: 0 0 12px rgba(234, 179, 8, 0.5), 0 0 6px rgba(59, 130, 246, 0.2); }
}

.admin-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #3B82F6, #EAB308);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== VIP BADGE ===== */
.vip-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #8B5CF6, #D946A8);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== PRESET SUGGESTION BUTTONS ===== */
.preset-suggestion-btn {
  padding: 0.6rem 1rem;
  border-radius: 50px;
  border: 2px solid rgba(108, 60, 225, 0.25);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

.preset-suggestion-btn:hover:not(:disabled) {
  border-color: var(--purple);
  background: rgba(108, 60, 225, 0.1);
}

.preset-suggestion-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.preset-suggestion-btn:disabled {
  cursor: default;
}

/* ===== CONFETTI ===== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall ease-out forwards;
}

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

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
  .card-grid,
  .quiz-list,
  .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  .featured {
    padding: 2rem 1.5rem 4rem;
  }

  .quiz-container,
  .game-wrapper {
    padding: 1.5rem;
  }
}

/* Phone */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .nav-logo {
    font-size: 1.15rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-link {
    font-size: 0.95rem;
  }

  .hero {
    padding: 3.5rem 1.25rem 2.5rem;
    min-height: 55vh;
  }

  .hero-glow {
    width: 300px;
    height: 300px;
  }

  .hero-subtitle {
    padding: 0 0.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    padding: 1rem 2rem;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
  }

  .featured {
    padding: 2rem 1rem 3rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .page-header {
    padding: 2rem 1rem 1.5rem;
  }

  .page-header p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .quiz-list,
  .game-grid {
    grid-template-columns: 1fr;
    padding: 0.75rem 1rem 3rem;
    gap: 1rem;
  }

  .quiz-container {
    padding: 1.25rem 1rem;
  }

  .quiz-question {
    font-size: 1.15rem;
  }

  .nail-finger {
    width: 36px;
    height: 60px;
  }

  .nail-bed {
    width: 28px;
    height: 34px;
  }

  .nail-color-btn {
    width: 44px;
    height: 44px;
  }

  .light-mode-btn {
    top: 14.5rem;
    left: 0.75rem;
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
  }

  .avatar-picker-btn {
    top: 14.5rem;
    right: 0.75rem;
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
  }

  .filter-btn {
    min-height: 44px;
    padding: 0.65rem 1.2rem;
    -webkit-tap-highlight-color: transparent;
  }

  .quiz-option {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
  }

  .quiz-option:hover {
    transform: none;
  }

  .quiz-result h2 {
    font-size: 1.6rem;
  }

  .quiz-result p {
    font-size: 1rem;
  }

  .quiz-result .score {
    font-size: 2.5rem;
  }

  .quiz-result-buttons {
    flex-direction: column;
    align-items: center;
  }

  .game-wrapper {
    padding: 1.25rem 1rem;
  }

  .game-wrapper h2 {
    font-size: 1.4rem;
  }

  .game-area {
    padding: 1.25rem;
    min-height: 250px;
  }

  .color-word {
    font-size: 2.2rem;
  }

  .color-btn {
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
  }

  .game-score {
    font-size: 1rem;
  }

  .back-link {
    font-size: 0.9rem;
  }

  .footer {
    padding: 1.5rem 1rem;
  }

  .love-calc-container {
    padding: 0 1rem 3rem;
    min-height: 40vh;
  }

  .love-calc-card,
  .love-result-card {
    padding: 1.5rem 1.25rem;
  }

  .love-input {
    font-size: 1rem;
    padding: 0.85rem 1rem;
    -webkit-appearance: none;
  }

  .love-result-percentage {
    font-size: 2.5rem;
  }

  .love-result-names {
    font-size: 1.1rem;
  }

  .love-result-message {
    font-size: 0.95rem;
  }

  .love-heart-divider {
    font-size: 1.5rem;
  }

  .cake-clicker-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .cake-count {
    font-size: 2.5rem;
  }

  .cake-btn {
    font-size: 6rem;
  }

  .cake-upgrade-btn {
    padding: 0.8rem 1rem;
  }

  .upgrade-info strong {
    font-size: 0.85rem;
  }

  .upgrade-cost {
    font-size: 0.75rem;
  }

  .birth-month-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .birth-month-btn {
    font-size: 0.85rem;
    padding: 0.7rem 0.3rem;
  }

  .celeb-list li {
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
  }

  .avatar-container {
    padding: 0 1rem 3rem;
  }

  .avatar-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
  }

  .avatar-emoji-option {
    font-size: 1.3rem;
  }

  .avatar-current {
    width: 75px;
    height: 75px;
    font-size: 2.5rem;
  }

  .typing-sentence {
    font-size: 1rem;
    padding: 1rem;
  }

  .typing-input {
    font-size: 16px;
    padding: 0.85rem 1rem;
  }

  .calc-container {
    padding: 0 0.75rem 3rem;
  }

  .calc-display {
    font-size: 1.5rem;
    padding: 0.8rem 1rem;
  }

  .calc-btn {
    padding: 0.85rem;
    font-size: 1.1rem;
    min-height: 48px;
  }

  .updates-container {
    padding: 0 1rem 3rem;
  }

  .update-card {
    padding: 1.2rem;
  }

  .jokes-container {
    padding: 0 1rem 3rem;
  }

  .joke-card {
    padding: 1rem 1.1rem;
  }

  .joke-setup {
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .joke-punchline {
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
