/* ===== Local fonts ===== */
@font-face { font-family: 'Fredoka One'; src: url('../fonts/fredoka-v17-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-v32-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-v32-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-v32-latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/nunito-v32-latin-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

/* =============================================
   LOGIN page styles (extracted)
============================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: #0f0e2e;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.stars { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.star { position: absolute; background: #fff; border-radius: 50%; animation: twinkle 3s infinite alternate; }
@keyframes twinkle { 0% { opacity: 0.2; transform: scale(1); } 100% { opacity: 1; transform: scale(1.4); } }

.floating-math { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.math-symbol { position: absolute; font-family: 'Fredoka One', cursive; font-size: 2rem; opacity: 0.07; color: #fff; animation: floatUp 8s infinite linear; }
@keyframes floatUp { 0% { transform: translateY(100vh) rotate(0deg); opacity: 0.07; } 100% { transform: translateY(-150px) rotate(360deg); opacity: 0; } }

.page-wrapper { position: relative; z-index: 10; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.15); border-radius: 28px; padding: 2.5rem; width: 100%; max-width: 440px; backdrop-filter: blur(12px); box-shadow: 0 0 60px rgba(130,80,255,0.25); }
.logo-area { text-align: center; margin-bottom: 1.8rem; }
.logo-badge { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; background: linear-gradient(135deg, #7C3AED, #A855F7); border-radius: 22px; font-size: 2.2rem; margin-bottom: 0.8rem; box-shadow: 0 8px 30px rgba(124,58,237,0.5); animation: bounce 2s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.logo-title { font-family: 'Fredoka One', cursive; font-size: 2.2rem; color: #fff; letter-spacing: 1px; }
.logo-title span { color: #A78BFA; }
.logo-sub { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 0.2rem; }
.xp-bar-wrapper { background: rgba(255,255,255,0.08); border-radius: 50px; height: 8px; margin: 1.2rem 0; overflow: hidden; }
.xp-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #7C3AED, #EC4899, #F59E0B); border-radius: 50px; transition: width 1.5s cubic-bezier(.17,.67,.34,1.2); }
.xp-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 0.3rem; }
.form-label-custom { color: rgba(255,255,255,0.7); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.4rem; display: block; }
.form-control-custom { background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.12); border-radius: 14px; color: #fff; font-family: 'Nunito', sans-serif; font-size: 1rem; padding: 0.75rem 1rem; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
.form-control-custom::placeholder { color: rgba(255,255,255,0.3); }
.form-control-custom:focus { border-color: #A78BFA; box-shadow: 0 0 0 3px rgba(167,139,250,0.2); background: rgba(255,255,255,0.1); }
.btn-play { width: 100%; background: linear-gradient(135deg, #7C3AED, #A855F7); color: #fff; font-family: 'Fredoka One', cursive; font-size: 1.3rem; letter-spacing: 1px; border: none; border-radius: 16px; padding: 0.85rem; cursor: pointer; margin-top: 1.2rem; transition: transform 0.15s, box-shadow 0.2s; box-shadow: 0 6px 24px rgba(124,58,237,0.45); }
.btn-play:hover  { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(124,58,237,0.6); }
.btn-play:active { transform: scale(0.97); }
.divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0; }
.divider hr   { flex: 1; border-color: rgba(255,255,255,0.12); }
.divider span { color: rgba(255,255,255,0.35); font-size: 0.8rem; }
.btn-google { width: 100%; background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.15); border-radius: 14px; color: rgba(255,255,255,0.8); font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700; padding: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.6rem; transition: background 0.2s, border-color 0.2s; }
.btn-google:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.footer-links { text-align: center; margin-top: 1.2rem; font-size: 0.83rem; color: rgba(255,255,255,0.4); }
.footer-links a { color: #A78BFA; text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.badge-row { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.badge-item { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 0.3rem 0.75rem; font-size: 0.72rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 0.3rem; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; }

/* =============================================
   HOME page styles (extracted)
============================================= */
body { color: #fff; }
.navbar-custom { background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0.9rem 2rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.nav-logo { font-family: 'Fredoka One', cursive; font-size: 1.6rem; color: #fff; }
.nav-logo span { color: #A78BFA; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #7C3AED, #EC4899); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; cursor: pointer; border: 2px solid rgba(255,255,255,0.2); }
.level-badge { background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.4); border-radius: 50px; padding: 0.3rem 0.8rem; font-size: 0.8rem; color: #A78BFA; font-weight: 700; }
.streak-badge { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); border-radius: 50px; padding: 0.3rem 0.8rem; font-size: 0.8rem; color: #F59E0B; font-weight: 700; }
.main-content { padding: 2rem; max-width: 1100px; margin: 0 auto; }
.section-title { font-family: 'Fredoka One', cursive; font-size: 1.35rem; margin-bottom: 1rem; color: rgba(255,255,255,0.9); }
.hero-section { background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(168,85,247,0.15)); border: 1.5px solid rgba(124,58,237,0.3); border-radius: 24px; padding: 2rem 2.5rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; position: relative; overflow: hidden; }
.hero-section::before { content: '🧮'; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 6rem; opacity: 0.15; }
.hero-title { font-family: 'Fredoka One', cursive; font-size: 2rem; margin-bottom: 0.4rem; }
.hero-sub { color: rgba(255,255,255,0.6); font-size: 0.95rem; margin-bottom: 1rem; }
.btn-hero { background: linear-gradient(135deg, #7C3AED, #A855F7); color: #fff; font-family: 'Fredoka One', cursive; font-size: 1.05rem; border: none; border-radius: 14px; padding: 0.65rem 1.5rem; cursor: pointer; box-shadow: 0 4px 18px rgba(124,58,237,0.4); transition: transform 0.15s, box-shadow 0.2s; }
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.55); }
.xp-progress-wrap { background: rgba(255,255,255,0.06); border-radius: 50px; height: 10px; width: 220px; overflow: hidden; margin-top: 0.8rem; }
.xp-progress { height: 100%; width: 62%; background: linear-gradient(90deg, #7C3AED, #EC4899, #F59E0B); border-radius: 50px; }
.xp-info { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-top: 0.3rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: 18px; padding: 1.1rem 1rem; text-align: center; transition: transform 0.2s, border-color 0.2s; cursor: default; }
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); }
.stat-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.stat-num { font-family: 'Fredoka One', cursive; font-size: 1.8rem; line-height: 1; }
.stat-label { font-size: 0.73rem; color: rgba(255,255,255,0.4); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.8px; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.cat-card { border-radius: 20px; padding: 1.4rem 1.2rem; cursor: pointer; position: relative; overflow: hidden; border: 1.5px solid rgba(255,255,255,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.cat-card::after { content: attr(data-emoji); position: absolute; right: 0.8rem; bottom: 0.5rem; font-size: 3.5rem; opacity: 0.18; }
.cat-name { font-family: 'Fredoka One', cursive; font-size: 1.15rem; margin-bottom: 0.2rem; }
.cat-desc { font-size: 0.78rem; opacity: 0.6; margin-bottom: 0.9rem; }
.cat-bar-wrap { background: rgba(0,0,0,0.2); border-radius: 50px; height: 6px; margin-bottom: 0.4rem; }
.cat-bar { height: 100%; border-radius: 50px; }
.cat-progress-label { font-size: 0.7rem; opacity: 0.55; }
.difficulty-dots { display: flex; gap: 4px; margin-top: 0.6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.dot.on { background: rgba(255,255,255,0.8); }
.missions-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.mission-item { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1rem 1.2rem; display: flex; align-items: center; gap: 1rem; transition: background 0.2s; cursor: pointer; }
.mission-item:hover { background: rgba(255,255,255,0.08); }
.mission-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.mission-info { flex: 1; }
.mission-name { font-weight: 700; font-size: 0.95rem; }
.mission-desc { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.mission-xp { font-family: 'Fredoka One', cursive; font-size: 0.9rem; color: #F59E0B; white-space: nowrap; }
.mission-prog-wrap { background: rgba(255,255,255,0.08); border-radius: 50px; height: 5px; margin-top: 0.4rem; }
.mission-prog { height: 100%; border-radius: 50px; }
.leaderboard { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 1.2rem; }
.lb-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.5rem; border-radius: 12px; transition: background 0.2s; }
.lb-item:hover { background: rgba(255,255,255,0.05); }
.lb-rank { font-family: 'Fredoka One', cursive; font-size: 1rem; width: 24px; text-align: center; color: rgba(255,255,255,0.4); }
.lb-rank.gold { color: #F59E0B; }
.lb-rank.silver { color: #C0C0C0; }
.lb-rank.bronze { color: #CD7F32; }
.lb-av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800; }
.lb-name { flex: 1; font-size: 0.9rem; font-weight: 700; }
.lb-xp { font-size: 0.8rem; color: #A78BFA; font-weight: 700; }
.bottom-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .categories-grid { grid-template-columns: repeat(2, 1fr); } .bottom-grid { grid-template-columns: 1fr; } .hero-title { font-size: 1.4rem; } }
@media (max-width: 540px) { .navbar-custom { padding: 0.9rem 1rem; } .main-content { padding: 1rem; } .stats-grid { grid-template-columns: repeat(2, 1fr); } .categories-grid { grid-template-columns: 1fr; } }
