/* ==========================================================================
   NeuroCodigos — Premium Immersive UI
   Dark theme, glassmorphism, giant code display, full-screen slides
   ========================================================================== */

/* === 1. CUSTOM PROPERTIES === */
:root {
  --bg: #06060e;
  --bg-card: rgba(16, 16, 28, 0.7);
  --bg-glass: rgba(18, 18, 32, 0.55);
  --bg-elevated: rgba(26, 26, 46, 0.8);
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(124, 92, 252, 0.3);

  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-dark: #6244e0;
  --accent-glow: rgba(124, 92, 252, 0.25);

  --text: #f0f0f5;
  --text-secondary: #9898b0;
  --text-muted: #5e5e78;

  --font-body: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-h: 70px;
}

/* Area color overrides */
.area-saude      { --area-color: #10b981; }
.area-abundancia { --area-color: #f59e0b; }
.area-amor       { --area-color: #f43f5e; }
.area-emocional  { --area-color: #8b5cf6; }
.area-autoestima { --area-color: #fb923c; }
.area-protecao   { --area-color: #3b82f6; }
.area-espiritual { --area-color: #a78bfa; }
.area-corpo      { --area-color: #84cc16; }

/* === 2. RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent-light); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(124, 92, 252, 0.35); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 252, 0.2); border-radius: 99px; }
* { scrollbar-width: thin; scrollbar-color: rgba(124, 92, 252, 0.2) transparent; }

/* === 3. TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { color: var(--text-secondary); line-height: 1.7; }
.gradient-text { background: linear-gradient(135deg, #a78bfa, #f472b6, #fb923c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* === 4. LAYOUT === */
.app-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; position: relative; overflow: hidden; }
.main-content { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.page { padding: 24px; padding-bottom: calc(var(--nav-h) + 32px); max-width: 900px; margin: 0 auto; width: 100%; }

/* === 5. BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 20px rgba(124, 92, 252, 0.3); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(124, 92, 252, 0.4); }
.btn-secondary { background: var(--bg-glass); color: var(--text); border: 1px solid var(--border); backdrop-filter: blur(12px); }
.btn-secondary:hover { border-color: var(--border-accent); }
.btn-danger { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.2); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 16px; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-full { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; border-radius: var(--radius); }
.btn-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 0.9rem; padding: 8px 0; margin-bottom: 16px; transition: color var(--transition); }
.btn-back:hover { color: var(--text); }

/* === 6. FORM INPUTS === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-input { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; transition: border-color var(--transition); outline: none; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-error { color: #f43f5e; font-size: 0.8rem; margin-top: 8px; text-align: center; }

/* === 7. LOGIN PAGE === */
.login-page { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 1000; }
.login-page::before { content: ''; position: absolute; inset: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 30% 40%, rgba(124, 92, 252, 0.06) 0%, transparent 50%), radial-gradient(circle at 70% 60%, rgba(244, 63, 94, 0.04) 0%, transparent 50%); animation: bg-drift 20s ease-in-out infinite alternate; }
@keyframes bg-drift { 0% { transform: translate(0,0); } 100% { transform: translate(-2%,-2%) rotate(2deg); } }

.login-card { position: relative; z-index: 1; width: 90%; max-width: 400px; padding: 48px 32px; background: var(--bg-glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.login-header { margin-bottom: 32px; }
.login-title { font-size: 2.5rem; margin-bottom: 8px; }
.login-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.login-footer { margin-top: 24px; font-size: 0.75rem; color: var(--text-muted); }

/* === 8. SLIDES (Full-screen presentation) === */
.slides-overlay { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; }
.slides-viewport { flex: 1; position: relative; overflow: hidden; }

.slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px; text-align: center; opacity: 0; transform: scale(0.95); transition: opacity 0.6s ease, transform 0.6s ease; pointer-events: none; overflow-y: auto; }
.slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }

.slide-icon { font-size: 3.5rem; margin-bottom: 16px; filter: drop-shadow(0 0 20px rgba(255,255,255,0.15)); }
.slide-title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; margin-bottom: 12px; color: #fff; }
.slide-subtitle { font-size: clamp(1rem, 2.5vw, 1.3rem); color: rgba(255,255,255,0.7); margin-bottom: 24px; font-weight: 400; }
.slide-body { font-size: clamp(0.9rem, 2vw, 1.05rem); color: rgba(255,255,255,0.65); max-width: 640px; line-height: 1.8; margin-bottom: 16px; }
.slide-detail { font-size: 0.9rem; color: rgba(255,255,255,0.5); max-width: 580px; line-height: 1.7; font-style: italic; }

.slide-quote { font-size: clamp(1.3rem, 3.5vw, 2rem); font-family: var(--font-heading); font-weight: 700; color: var(--accent-light); margin-bottom: 24px; max-width: 600px; line-height: 1.3; position: relative; padding: 0 24px; }
.slide-quote::before { content: '\201C'; position: absolute; left: -8px; top: -12px; font-size: 4rem; color: rgba(167, 139, 250, 0.2); }

/* Slide grid (ingredients) */
.slide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; max-width: 700px; width: 100%; margin-top: 16px; }
.slide-grid-item { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; }
.slide-grid-item-icon { font-size: 1.5rem; margin-bottom: 6px; }
.slide-grid-item-name { font-size: 0.85rem; font-weight: 600; color: #fff; margin-bottom: 2px; }
.slide-grid-item-who { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

/* Slide steps */
.slide-steps { display: flex; flex-direction: column; gap: 12px; max-width: 560px; width: 100%; margin-top: 16px; text-align: left; }
.slide-step { display: flex; gap: 16px; align-items: flex-start; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); padding: 16px; }
.slide-step-n { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--accent); min-width: 36px; }
.slide-step-title { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.slide-step-desc { font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.5; }

/* Slide testimonials */
.slide-testimonials { display: flex; flex-direction: column; gap: 12px; max-width: 560px; width: 100%; margin-top: 16px; }
.slide-testimonial { background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); padding: 16px; text-align: left; }
.slide-testimonial-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.slide-testimonial-name { font-weight: 700; color: #fff; font-size: 0.9rem; }
.slide-testimonial-tag { font-size: 0.7rem; color: var(--accent-light); background: rgba(124,92,252,0.12); padding: 3px 10px; border-radius: 99px; }
.slide-testimonial-text { font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.slide-testimonial-days { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-top: 6px; }

/* Warning slide */
.slide-warning-box { background: rgba(244, 63, 94, 0.08); border: 1px solid rgba(244, 63, 94, 0.2); border-radius: var(--radius); padding: 24px; max-width: 560px; margin-bottom: 16px; }
.slide-warning-box .slide-body { color: rgba(255,200,200,0.8); }

/* Slide navigation */
.slides-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: rgba(6, 6, 14, 0.8); backdrop-filter: blur(12px); }
.slides-dots { display: flex; gap: 8px; }
.slides-dot { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.15); transition: all var(--transition); }
.slides-dot.active { width: 28px; background: var(--accent); }
.slides-skip { color: rgba(255,255,255,0.4); font-size: 0.8rem; padding: 8px 16px; border-radius: var(--radius-sm); transition: all var(--transition); }
.slides-skip:hover { color: #fff; background: rgba(255,255,255,0.06); }
.slides-arrows { display: flex; gap: 8px; }
.slides-arrow { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 1.2rem; transition: all var(--transition); }
.slides-arrow:hover { background: rgba(255,255,255,0.12); color: #fff; }
.slides-arrow:disabled { opacity: 0.2; cursor: default; }

/* === 9. BOTTOM NAVIGATION === */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); display: flex; align-items: center; justify-content: space-around; background: rgba(6, 6, 14, 0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--border); z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0); }
.nav-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; color: var(--text-muted); font-size: 0.65rem; font-weight: 500; transition: color var(--transition); position: relative; }
.nav-tab svg { width: 22px; height: 22px; transition: all var(--transition); }
.nav-tab.active { color: var(--accent); }
.nav-tab.active svg { transform: scale(1.1); }
.nav-tab.active::after { content: ''; position: absolute; top: 0; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent-glow); }

/* Practice tab (special) */
.nav-tab-practice { position: relative; }
.nav-tab-practice .nav-practice-ring { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(124,92,252,0.35); margin-top: -20px; transition: all var(--transition); }
.nav-tab-practice .nav-practice-ring svg { color: #fff; }
.nav-tab-practice.active .nav-practice-ring { box-shadow: 0 4px 28px rgba(124,92,252,0.5); transform: scale(1.05); }

/* === 10. HOME PAGE === */
.home-hero { text-align: center; padding: 32px 0 24px; }
.home-hero h1 { margin-bottom: 8px; }
.home-hero p { font-size: 0.95rem; }

.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.stat-card { background: var(--bg-glass); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-icon { font-size: 1.3rem; margin-bottom: 6px; }
.stat-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section { margin-bottom: 32px; }

/* Area grid on Home */
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.area-tile { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all var(--transition); border: 1px solid var(--border); }
.area-tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.1); }
.area-tile-top { padding: 20px 16px 16px; text-align: center; }
.area-tile-icon { font-size: 2rem; margin-bottom: 6px; }
.area-tile-name { font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600; color: #fff; }
.area-tile-count { font-size: 0.65rem; color: rgba(255,255,255,0.5); margin-top: 4px; }
.area-tile-bar { height: 3px; }

/* Daily code card */
.daily-code-card { background: var(--bg-glass); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; position: relative; overflow: hidden; }
.daily-code-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #f472b6); }
.daily-code-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-light); margin-bottom: 12px; }
.daily-code-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; letter-spacing: 0.1em; margin-bottom: 4px; }
.daily-code-name { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

/* Education CTA on Home */
.edu-cta { display: flex; align-items: center; gap: 16px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: all var(--transition); }
.edu-cta:hover { border-color: var(--border-accent); }
.edu-cta-icon { font-size: 2rem; }
.edu-cta-text h3 { font-size: 0.95rem; margin-bottom: 2px; }
.edu-cta-text p { font-size: 0.8rem; color: var(--text-muted); }
.edu-cta-arrow { margin-left: auto; color: var(--text-muted); font-size: 1.2rem; }

/* === 11. AREA DETAIL PAGE === */
.area-hero { border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; margin-bottom: 24px; }
.area-hero-icon { font-size: 3rem; margin-bottom: 8px; }
.area-hero-name { font-size: 1.5rem; color: #fff; margin-bottom: 4px; }
.area-hero-meta { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.science-note { background: rgba(124,92,252,0.06); border: 1px solid rgba(124,92,252,0.12); border-radius: var(--radius); padding: 16px; }
.science-note h4 { font-size: 0.85rem; color: var(--accent-light); margin-bottom: 8px; }
.science-note p { font-size: 0.85rem; color: var(--text-secondary); }

/* Code list */
.code-list { display: flex; flex-direction: column; gap: 8px; }
.code-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; cursor: pointer; transition: all var(--transition); }
.code-item:hover { border-color: var(--border-accent); transform: translateX(4px); }
.code-item-left { display: flex; flex-direction: column; gap: 2px; }
.code-item-number { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.08em; }
.code-item-name { font-size: 0.8rem; color: var(--text-secondary); }
.code-item-btn { padding: 8px 16px; font-size: 0.8rem; font-weight: 600; border-radius: var(--radius-sm); transition: all var(--transition); }

/* === 12. PRACTICE SCREEN (THE HERO FEATURE) === */
.practice-screen { position: fixed; inset: 0; z-index: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.practice-bg { position: absolute; inset: 0; }
.practice-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(var(--glow-r, 124), var(--glow-g, 92), var(--glow-b, 252), 0.08) 0%, transparent 60%); }

.practice-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; max-width: 800px; padding: 24px; }

/* Back button in practice */
.practice-back { position: absolute; top: 24px; left: 24px; z-index: 10; color: rgba(255,255,255,0.4); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; transition: color var(--transition); }
.practice-back:hover { color: #fff; }

/* Phase indicator */
.practice-phase { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.35); margin-bottom: 8px; }

/* Area badge */
.practice-area { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.08); margin-bottom: 16px; }
.practice-area-icon { font-size: 1.1rem; }

/* THE GIANT CODE */
.giant-code { font-family: var(--font-heading); font-size: clamp(4rem, 14vw, 11rem); font-weight: 800; letter-spacing: 0.08em; color: #fff; text-align: center; line-height: 1; text-shadow: 0 0 60px var(--code-glow, rgba(124, 92, 252, 0.3)), 0 0 120px var(--code-glow, rgba(124, 92, 252, 0.15)); animation: code-pulse 4s ease-in-out infinite; user-select: none; padding: 0 16px; word-break: break-all; }
@keyframes code-pulse { 0%, 100% { text-shadow: 0 0 60px var(--code-glow, rgba(124,92,252,0.3)), 0 0 120px var(--code-glow, rgba(124,92,252,0.15)); } 50% { text-shadow: 0 0 80px var(--code-glow, rgba(124,92,252,0.5)), 0 0 160px var(--code-glow, rgba(124,92,252,0.25)); } }

.giant-code-name { font-size: clamp(0.9rem, 2vw, 1.2rem); color: rgba(255,255,255,0.5); margin-top: 8px; font-weight: 400; letter-spacing: 0.05em; }

/* Breathing ring */
.breathing-ring { width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; margin: 16px 0; position: relative; }
.breathing-ring-inner { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); opacity: 0.6; transition: all 4s ease-in-out; }
.breathing-ring-inner.inhale { width: 50px; height: 50px; opacity: 1; box-shadow: 0 0 30px var(--accent-glow); }
.breathing-ring-text { position: absolute; bottom: -24px; font-size: 0.75rem; color: rgba(255,255,255,0.35); white-space: nowrap; }

/* Chronometer */
.chronometer { font-family: var(--font-mono); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 600; color: rgba(255,255,255,0.8); letter-spacing: 0.1em; margin: 8px 0; }
.chronometer-label { font-size: 0.7rem; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 0.1em; }

/* Practice guidance */
.practice-guidance { font-size: 0.85rem; color: rgba(255,255,255,0.4); max-width: 400px; text-align: center; line-height: 1.6; margin: 8px 0; }

/* Practice controls */
.practice-controls { display: flex; gap: 12px; margin-top: 24px; }
.practice-controls .btn { min-width: 120px; }

/* Practice setup (pre-meditation) */
.practice-setup { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 48px 24px; max-width: 480px; width: 100%; }
.practice-setup h2 { text-align: center; }
.duration-options { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.duration-btn { padding: 10px 20px; border-radius: var(--radius-sm); background: var(--bg-glass); border: 1px solid var(--border); color: var(--text-secondary); font-weight: 600; transition: all var(--transition); }
.duration-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.duration-btn:hover:not(.active) { border-color: var(--border-accent); }

/* Mood selection */
.mood-section { text-align: center; width: 100%; }
.mood-section h3 { font-size: 1rem; margin-bottom: 12px; }
.mood-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mood-btn { width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 0.85rem; transition: all var(--transition); border: 2px solid transparent; }
.mood-btn.selected { transform: scale(1.15); }

/* Practice complete */
.practice-complete { text-align: center; max-width: 480px; }
.practice-complete h2 { font-size: 1.5rem; margin-bottom: 8px; }
.practice-complete-stats { display: flex; gap: 24px; justify-content: center; margin: 24px 0; }
.practice-complete-stat { text-align: center; }
.practice-complete-stat-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; }
.practice-complete-stat-label { font-size: 0.7rem; color: var(--text-muted); }
.practice-note { width: 100%; }
.practice-note textarea { width: 100%; min-height: 80px; padding: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.9rem; resize: vertical; outline: none; }
.practice-note textarea:focus { border-color: var(--accent); }

/* Achievement popup */
.achievement-popup { position: fixed; top: 24px; right: 24px; z-index: 999; background: var(--bg-elevated); border: 1px solid rgba(250, 204, 21, 0.2); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: achievement-in 0.5s ease; }
@keyframes achievement-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.achievement-popup-icon { font-size: 2rem; }
.achievement-popup-text h4 { font-size: 0.85rem; color: #facc15; }
.achievement-popup-text p { font-size: 0.75rem; color: var(--text-secondary); }

/* === 13. STATS PAGE === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stats-card { background: var(--bg-glass); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stats-card h3 { font-size: 0.9rem; margin-bottom: 12px; color: var(--text-secondary); }
.chart-empty { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 24px; }

/* SVG Charts */
.weekly-chart svg text { font-family: var(--font-body); }
.donut-legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-secondary); }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mood-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; font-size: 0.75rem; }

/* Achievement grid */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.achievement-badge { text-align: center; padding: 12px 8px; border-radius: var(--radius-sm); background: var(--bg-glass); border: 1px solid var(--border); transition: all var(--transition); }
.achievement-badge.unlocked { border-color: rgba(250, 204, 21, 0.2); }
.achievement-badge.locked { opacity: 0.3; }
.achievement-icon { font-size: 1.5rem; margin-bottom: 4px; }
.achievement-name { font-size: 0.6rem; color: var(--text-secondary); }

/* Streak display */
.streak-display { display: flex; align-items: center; gap: 16px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.streak-flame { font-size: 2rem; }
.streak-info { }
.streak-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: #facc15; line-height: 1; }
.streak-label { font-size: 0.75rem; color: var(--text-muted); }
.streak-best { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* === 14. JOURNAL PAGE === */
.journal-new { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.journal-new h3 { margin-bottom: 4px; }
.journal-prompt { font-size: 0.85rem; color: var(--accent-light); font-style: italic; margin-bottom: 12px; cursor: pointer; }
.journal-entries { display: flex; flex-direction: column; gap: 12px; }
.journal-entry { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.journal-entry-date { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; }
.journal-entry-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.journal-entry-sync { font-size: 0.8rem; color: var(--accent-light); margin-top: 8px; font-style: italic; }

/* === 15. TOAST === */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 999; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; animation: toast-in 0.3s ease; cursor: pointer; }
@keyframes toast-in { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.toast-success { background: rgba(16, 185, 129, 0.9); color: #fff; }
.toast-info { background: rgba(124, 92, 252, 0.9); color: #fff; }

/* === 16. RESPONSIVE === */
@media (min-width: 768px) {
  .page { padding: 32px 48px; padding-bottom: calc(var(--nav-h) + 48px); }
  .areas-grid { grid-template-columns: repeat(4, 1fr); }
  .home-stats { grid-template-columns: repeat(3, 1fr); }
  .slide { padding: 64px 48px; }
  .slide-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
  .page { max-width: 1100px; }
  .areas-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .giant-code { font-size: 10rem; }
}

/* === 17. ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 20px var(--accent-glow); } 50% { box-shadow: 0 0 40px var(--accent-glow); } }
