/* CSS Variables & Reset */
:root {
    /* Default Theme - Green for Login */
    --bg-animate: linear-gradient(-45deg, #0b8457 0%, #1baa6e 50%, #56d798 100%);
    --accent-color: #00b894;
    --accent-gradient: linear-gradient(45deg, #00b894, #55efc4);

    --card-bg: rgba(255, 255, 255, 0.7);
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius-xl: 24px;
    --radius-md: 12px;
    --error-text: #c53030;
    --error-bg: #fff5f5;
    --success-text: #2d6a4f;
    --success-bg: #e6fffa;
}

/* --- Game-Specific Themes (Beautiful Animations) --- */
body[data-theme='MONDAY'] {
    --bg-animate: linear-gradient(-45deg, #1e3c72 0%, #2a5298 50%, #6dd5ed 100%);
    --accent-color: #2ea3f2;
    --accent-gradient: linear-gradient(45deg, #1e3c72, #6dd5ed);
}

body[data-theme='TUESDAY'] {
    --bg-animate: linear-gradient(-45deg, #6a11cb 0%, #2575fc 50%, #a29bfe 100%);
    --accent-color: #6c5ce7;
    --accent-gradient: linear-gradient(45deg, #6a11cb, #2575fc);
}

body[data-theme='WEDNESDAY'] {
    --bg-animate: linear-gradient(-45deg, #f2994a 0%, #f2c94c 50%, #e0a43c 100%);
    --accent-color: #e0a43c;
    --accent-gradient: linear-gradient(45deg, #f2994a, #f2c94c);
}

body[data-theme='THURSDAY'] {
    --bg-animate: linear-gradient(-45deg, #13547a 0%, #80d0c7 50%, #4facfe 100%);
    --accent-color: #17c0eb;
    --accent-gradient: linear-gradient(45deg, #13547a, #80d0c7);
}

body[data-theme='FRIDAY'] {
    --bg-animate: linear-gradient(-45deg, #240b36 0%, #6a3093 50%, #c31432 100%);
    --accent-color: #ff4d4d;
    --accent-gradient: linear-gradient(45deg, #c31432, #6a3093);
}

body[data-theme='SATURDAY'] {
    --bg-animate: linear-gradient(-45deg, #11998e 0%, #38ef7d 50%, #00b894 100%);
    --accent-color: #00b894;
    --accent-gradient: linear-gradient(45deg, #11998e, #38efc0);
}

body[data-theme='LOGIN'] {
    --bg-animate: linear-gradient(-45deg, #454b54 0%, #515862 50%, #4a5059 100%);
    --accent-color: #00e5a0;
    --accent-gradient: linear-gradient(135deg, #00e5a0, #00b4d8, #7c3aed);
    --card-bg: rgba(30, 34, 42, 0.8);
    --text-primary: #e8ecf1;
    --text-secondary: #9aa3b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.3);
    --error-text: #ff6b6b;
    --error-bg: rgba(255, 50, 50, 0.1);
    --success-text: #00e5a0;
    --success-bg: rgba(0, 229, 160, 0.1);
}


body[data-theme='SUNDAY'] {
    --bg-animate: linear-gradient(-45deg, #bdc3c7 0%, #2c3e50 50%, #7f8c8d 100%);
    --accent-color: #34495e;
    --accent-gradient: linear-gradient(45deg, #bdc3c7, #2c3e50);
}

body[data-theme='BONUS'] {
    --bg-animate: linear-gradient(-45deg, #0f0c29 0%, #302b63 40%, #24243e 70%, #1a1a2e 100%);
    --accent-color: #a29bfe;
    --accent-gradient: linear-gradient(45deg, #6c5ce7, #a29bfe);
}

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

body {
    background: var(--bg-animate);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    /* Faster for dynamic feel */
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
    transition: background 1.5s ease;
    /* Smooth transition between themes */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Decoration Layer */
.bg-effects-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

/* --- Type 1: Floating Bubbles (Sea/Air Themes) --- */
.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rise var(--duration) infinite ease-in;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    80% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-110vh) scale(1.5);
        opacity: 0;
    }
}

/* --- Type 2: Drifting Clouds (Sunset/Nature Themes) --- */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
    filter: blur(30px);
    border-radius: 50%;
    animation: drift var(--duration) infinite linear;
}

@keyframes drift {
    0% {
        transform: translateX(-200px);
    }

    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* --- Type 3: Twinkling Stars (Night/Wisdom Themes) --- */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) infinite alternate;
    box-shadow: 0 0 10px white;
}

@keyframes twinkle {
    0% {
        transform: scale(0.5);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* --- Type 4: Floating Leaves (Garden Themes) --- */
.leaf {
    position: absolute;
    top: -100px;
    font-size: 1.5rem;
    animation: fall var(--duration) infinite linear;
    opacity: 0.6;
}

.field-error {
    display: block;
    color: red;
    font-size: 0.78rem;
    margin-top: 4px;
    min-height: 1rem;
}

.field-error.hidden {
    display: none;
}

.input-group input.invalid {
    border-color: red;
    outline-color: red;
}

.input-group input.valid {
    border-color: green;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
    }

    100% {
        transform: translateY(110vh) rotate(360deg) translateX(100px);
    }
}

/* Maintain basic float for legacy if needed */
.legacy-circle {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: overlay;
    filter: blur(60px);
    opacity: 0.4;
    animation: floatAround 20s infinite alternate ease-in-out;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(100px, 100px);
    }
}

/* --- Type 5: Flying Birds/Butterflies (Focus Themes) --- */
.bird {
    position: absolute;
    font-size: 1.5rem;
    animation: fly var(--duration) infinite linear;
    z-index: -1;
}

@keyframes fly {
    0% {
        transform: translate(-100px, 0) scaleX(1);
    }

    49% {
        transform: translate(50vw, -50px) scaleX(1);
    }

    50% {
        transform: translate(50vw, -50px) scaleX(-1);
    }

    100% {
        transform: translate(calc(100vw + 100px), 0) scaleX(-1);
    }
}

/* --- Type 6: Floating Hearts (Emotion Themes) --- */
.heart {
    position: absolute;
    color: rgba(255, 107, 129, 0.4);
    font-size: 1.5rem;
    animation: floatingHeart var(--duration) infinite ease-out;
}

@keyframes floatingHeart {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) scale(1.5) rotate(45deg);
        opacity: 0;
    }
}

/* --- Type 7: Fireflies (Night/Wisdom Themes) --- */
.firefly {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #f1c40f;
    border-radius: 50%;
    box-shadow: 0 0 15px #f1c40f, 0 0 30px #f1c40f;
    animation: flit var(--duration) infinite ease-in-out;
}

/* --- Type 13: Mystery Boxes (Gratitude Match / Saturday) --- */
.mystery-box {
    position: absolute;
    background: linear-gradient(135deg, #ff4757, #e84118);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4), 0 0 20px rgba(255, 71, 87, 0.2);
    font-weight: 800;
    animation: mysteryFloat var(--duration) infinite ease-in-out;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes mysteryFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.2;
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg) scale(1.1);
        opacity: 0.5;
    }

    66% {
        transform: translate(-30px, -100px) rotate(-10deg) scale(0.9);
        opacity: 0.4;
    }
}

@keyframes flit {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }

    50% {
        transform: translate(50px, -50px) scale(1.5);
        opacity: 1;
    }
}

/* --- Type 8: Falling Rain (Nature/Calm Themes) --- */
.rain {
    position: absolute;
    width: 2px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    animation: rainfall var(--duration) infinite linear;
}

@keyframes rainfall {
    0% {
        transform: translateY(-10vh) skewX(-15deg);
    }

    100% {
        transform: translateY(110vh) skewX(-15deg);
    }
}

/* --- Type 9: Floating Balloons (Fun/Celebration) --- */
.balloon {
    position: absolute;
    font-size: 2.5rem;
    animation: floatBalloon var(--duration) infinite ease-in-out;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

@keyframes floatBalloon {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-30px) rotate(-5deg);
    }
}

/* --- Type 10: Light Rays (God Rays) --- */
.light-ray {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.05) 15deg,
            transparent 30deg,
            rgba(255, 255, 255, 0.05) 45deg,
            transparent 60deg);
    animation: rotateRay var(--duration) infinite linear;
    pointer-events: none;
    z-index: -2;
}

@keyframes rotateRay {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- Type 11: Bokeh Orbs (Premium Depth) --- */
.bokeh {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    mix-blend-mode: screen;
    opacity: 0.3;
    animation: moveBokeh var(--duration) infinite alternate ease-in-out;
}

@keyframes moveBokeh {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, -100px) scale(1.3);
    }
}

/* --- Type 12: Floating Magic Orbs --- */
.magic-orb {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(5px);
    animation: magicFloat var(--duration) infinite ease-in-out;
}

@keyframes magicFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }

    50% {
        transform: translate(30px, -40px) scale(1.5);
        opacity: 0.6;
    }
}

/* --- Type 13: Breath Rings (Pattern Breath / Thursday Theme) --- */
.breath-ring {
    position: absolute;
    border: 2px solid rgba(128, 208, 199, 0.4);
    border-radius: 50%;
    animation: breathExpand var(--duration) infinite ease-in-out;
    pointer-events: none;
}

@keyframes breathExpand {
    0% {
        transform: scale(0.2);
        opacity: 0.8;
        border-width: 4px;
    }

    50% {
        opacity: 0.4;
        border-width: 2px;
    }

    100% {
        transform: scale(4);
        opacity: 0;
        border-width: 1px;
    }
}

/* --- Type 14: Breath Waves (Gentle pulse orbs for Thursday) --- */
.breath-wave {
    position: absolute;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.25) 0%, rgba(128, 208, 199, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    animation: breathPulse var(--duration) infinite ease-in-out;
    pointer-events: none;
}

@keyframes breathPulse {

    0%,
    100% {
        transform: scale(0.8) translate(0, 0);
        opacity: 0.15;
    }

    25% {
        transform: scale(1.4) translate(10px, -15px);
        opacity: 0.35;
    }

    50% {
        transform: scale(1.8) translate(-5px, 10px);
        opacity: 0.2;
    }

    75% {
        transform: scale(1.2) translate(15px, 5px);
        opacity: 0.3;
    }
}

/* --- Type 15: Neuron Sparks (Memory Match / Bonus Theme) --- */
.neuron-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #a29bfe;
    border-radius: 50%;
    box-shadow: 0 0 8px #a29bfe, 0 0 20px rgba(162, 155, 254, 0.5);
    animation: neuronTravel var(--duration) infinite ease-in-out;
    pointer-events: none;
}

@keyframes neuronTravel {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translate(30px, -20px) scale(1);
    }

    40% {
        transform: translate(80px, 10px) scale(1.2);
        opacity: 0.8;
    }

    65% {
        transform: translate(40px, -40px) scale(0.8);
        opacity: 1;
    }

    85% {
        transform: translate(100px, -10px) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(120px, 20px) scale(0.3);
        opacity: 0;
    }
}

/* --- Type 16: Synapse Lines (connecting energy lines for Memory) --- */
.synapse-line {
    position: absolute;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.6), rgba(162, 155, 254, 0.8), rgba(108, 92, 231, 0.6), transparent);
    animation: synapseFire var(--duration) infinite ease-in-out;
    border-radius: 2px;
    pointer-events: none;
}

@keyframes synapseFire {
    0% {
        transform: scaleX(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }

    20% {
        transform: scaleX(1.5) rotate(var(--rotation, 0deg));
        opacity: 0.8;
        box-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
    }

    50% {
        transform: scaleX(2) rotate(var(--rotation, 0deg));
        opacity: 0.4;
    }

    80% {
        transform: scaleX(0.5) rotate(var(--rotation, 0deg));
        opacity: 0.6;
    }

    100% {
        transform: scaleX(0) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
}

/* --- Type 17: Memory Glow (ambient brain glow for Memory Match) --- */
.memory-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.3) 0%, rgba(162, 155, 254, 0.1) 40%, transparent 70%);
    filter: blur(20px);
    animation: memoryPulse var(--duration) infinite ease-in-out;
    pointer-events: none;
}

@keyframes memoryPulse {

    0%,
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.2;
    }

    30% {
        transform: scale(1.5) translate(20px, -30px);
        opacity: 0.5;
    }

    60% {
        transform: scale(0.8) translate(-15px, 20px);
        opacity: 0.3;
    }

    90% {
        transform: scale(1.3) translate(10px, -10px);
        opacity: 0.45;
    }
}

/* App Logo Frame */
.app-logo-frame {
    position: fixed;
    top: 25px;
    left: 25px;
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 4-side shadow with colorful glow */
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(108, 92, 231, 0.15),
        inset 0 0 10px rgba(255, 255, 255, 1);
    z-index: 1000;
    border: 3px solid rgba(255, 255, 255, 0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: logoEnter 1.2s ease-out;
}

@keyframes logoEnter {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.1) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.app-logo-frame:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.12),
        0 0 50px rgba(108, 92, 231, 0.3);
}

.app-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 900px) {
    .app-logo-frame {
        width: 50px;
        height: 50px;
        top: 15px;
        left: 15px;
        padding: 6px;
    }
}

/* --- Global Navigation (Inspired by Sample) --- */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
    /* Initially hidden for student portal flow */
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.global-nav.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo img {
    height: 60px;
    width: 60px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.music-controller {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 20px;
    margin-left: 5px;
}

.music-btn {
    background: var(--accent-gradient);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.music-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.music-btn.playing {
    background: #636e72;
    /* Subtle dark color when playing */
    background: linear-gradient(45deg, #2d3436, #636e72);
}

.music-status {
    letter-spacing: 1px;
}

.nav-item {
    text-decoration: none;
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-item:hover {
    color: #1b4d3e;
    background: rgba(27, 77, 62, 0.05);
}

.nav-item.active {
    color: #1b4d3e;
}

.nav-item.theme-pill {
    background: #1b4d3e;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
}

.nav-item.theme-pill:hover {
    background: #143d31;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(27, 77, 62, 0.2);
}

/* View Management */
.view-section {
    width: 100%;
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding-bottom: 120px;
    /* Space to prevent footer overlap */
}

.view-section.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px);
}

/* Header Actions & Back Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-back-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-back-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(-3px);
}

.nav-back-btn i {
    font-size: 0.8rem;
}

/* Dashboard Styles */
.dashboard-header {
    text-align: left;
    margin-bottom: 2.5rem;
    animation: slideInDown 0.8s ease;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    color: #ffffff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.student-name {
    color: #ffeaa7;
}

.quick-stats {
    display: flex;
    gap: 20px;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.stat-card i {
    font-size: 1.5rem;
    color: #ffeaa7;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 2rem;
}

.action-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.action-card.main-action {
    background: linear-gradient(135deg, rgba(27, 77, 62, 0.5) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-left: 5px solid #1b4d3e;
}

.card-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.action-card h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.8rem;
}

.action-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.launch-btn {
    padding: 12px 35px;
    border-radius: 50px;
    border: none;
    background: white;
    color: #1b4d3e;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.launch-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-container {
    width: 95%;
    max-width: 1100px;
    margin: 100px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeInUp 0.8s ease-out;
    z-index: 10;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.icon {
    font-size: 2.5rem;
    /* Increased */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: #fff;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin: 0;
    letter-spacing: -1px;
}

.main-instruction {
    font-size: 1.4rem;
    color: #fff;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    line-height: 1.4;
}

.highlight {
    font-style: italic;
    color: #fff;
    opacity: 0.9;
}

.date-display {
    display: inline-block;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.6);
    /* Increased opacity for black text */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);

    font-size: 1rem;
    color: #000000;
    /* Black Text */
    font-weight: 900;
    /* Maximum Boldness */
    margin-top: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.1),
        inset 0 0 15px rgba(255, 255, 255, 0.05);

    /* 3D Visual Effect */
    transform: perspective(1000px) rotateX(5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.date-display:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: perspective(1000px) rotateX(0deg) translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Control Wrapper (Day Select) */
.control-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
}

.top-instruction {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.demo-controls {
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.demo-controls label {
    color: #fff;
    font-size: 0.95rem;
    margin-right: 8px;
}

.demo-controls select {
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Difficulty Chips (Inside Card) */
.difficulty-group {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    padding: 6px;
    border-radius: 50px;
    align-self: flex-start;
}

.diff-chip {
    border: none;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 3D and Glow */
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.05),
        0 8px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    top: 0;
}

.diff-chip:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.05),
        0 12px 20px rgba(0, 0, 0, 0.08);
}

.diff-chip[data-level="easy"] {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.diff-chip[data-level="medium"] {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.diff-chip[data-level="hard"] {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.diff-chip.active {
    color: white !important;
    top: 2px;
}

/* Specific Difficulty Colors - ALWAYS VIBRANT */
.diff-chip[data-level="easy"].active {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 0 #1e8449, 0 10px 20px rgba(46, 204, 113, 0.4);
    border: none;
}

.diff-chip[data-level="medium"].active {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    box-shadow: 0 4px 0 #b7950b, 0 10px 20px rgba(241, 196, 15, 0.4);
    border: none;
}

.diff-chip[data-level="hard"].active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 0 #922b21, 0 10px 20px rgba(231, 76, 60, 0.4);
    border: none;
}

/* Glassmorphism Card */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    /* Increased padding */
    position: relative;
    overflow: hidden;
}

/* Puzzle Header */
.puzzle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Changed to start for multi-line support */
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.06);
}

.puzzle-title-group {
    flex: 1;
    margin-right: 20px;
}

.puzzle-title-group h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    /* Increased */
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.micro-story-therapedia-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.micro-story-therapedia-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.instr-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.puzzle-instruction {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.puzzle-tag {
    background: var(--accent-gradient);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    white-space: nowrap;
}

/* Puzzle Content */
.puzzle-content {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.scrambled-text {
    font-size: 1.8rem;
    /* Increased */
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    padding: 1.8rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border-left: 6px solid #ff9f43;
    line-height: 1.4;
    transition: transform 0.3s ease;
}

.scrambled-text:hover {
    transform: scale(1.02);
}

.puzzle-input {
    width: 100%;
    padding: 18px 24px;
    /* Increased */
    border: 2px solid #ecf0f1;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    /* Increased */
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.puzzle-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

.puzzle-input.shake {
    border-color: var(--error-text);
    animation: shake 0.4s ease-in-out;
}

.puzzle-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-self: center;
    margin-top: 1rem;
    /* 3D Depth */
    box-shadow: 0 6px 0 rgba(72, 52, 212, 1);
    position: relative;
    top: 0;
}

.puzzle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(72, 52, 212, 1);
}

.puzzle-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(72, 52, 212, 1);
}

.puzzle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    top: 4px;
    box-shadow: none;
}

/* Feedback Area */
.feedback-area {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: var(--radius-md);
    text-align: center;
    background: var(--success-bg);
    color: var(--success-text);
    font-weight: 500;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(12, 133, 153, 0.2);
}

.feedback-area.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: rgba(192, 57, 43, 0.2);
}

/* Therapedia */
.therapedia-integration {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 2px dashed rgba(0, 0, 0, 0.05);
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

.therapedia-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-left: 6px solid #fdcb6e;
    transition: transform 0.3s ease;
}

.therapedia-card:hover {
    transform: translateY(-3px);
}

.therapedia-icon {
    font-size: 1.8rem;
    padding: 10px;
    background: #fffbf0;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(253, 203, 110, 0.2);
}

/* --- Calendar Styles --- */
.control-wrapper {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.calendar-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
    min-width: 150px;
    text-align: center;
}

.calendar-day.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
    background: transparent;
}

/* --- Game Selector Styles --- */
.game-selector-wrapper {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.section-title {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: #ffffff;
    /* White Color */
    margin-bottom: 1.5rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-selector-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.game-chip {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 12px 20px;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.game-chip:hover {
    background: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.game-chip.active {
    background: var(--accent-gradient);
    border-color: #fff;
    color: white;
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.3);
}

.game-chip-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.game-chip-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 2px;
}



.cal-nav-btn {
    background: white;
    border: 1px solid var(--glass-border);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cal-nav-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekday {
    font-size: 0.75rem;
    font-weight: 800;
    /* Slightly bolder */
    color: #000000;
    /* Pure Black */
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 5px;
    opacity: 1;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.3);
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    color: var(--accent-color);
}

.calendar-day.active {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.calendar-day.today {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

/* --- 3D Instruction Box --- */
.instruction-row {
    margin-bottom: 3rem;
}

.instruction-3d-box {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: var(--radius-xl);
    position: relative;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.05),
        15px 15px 35px rgba(31, 38, 135, 0.05),
        inset 0 0 10px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-left: 2px solid rgba(255, 255, 255, 0.8);
    animation: slideInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.instruction-3d-box:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 30px 60px rgba(108, 92, 231, 0.12),
        0 0 30px rgba(255, 255, 255, 0.6);
}

.instr-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.instr-icon {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instr-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.instr-body {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.instr-section h4 {
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 900;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.instr-section p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.1), transparent);
    margin: 0.5rem 0;
}

.instr-tag {
    position: absolute;
    top: -14px;
    left: 40px;
    background: var(--accent-gradient);
    color: white;
    padding: 6px 22px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    box-shadow:
        0 8px 20px rgba(108, 92, 231, 0.3),
        0 0 10px rgba(108, 92, 231, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    overflow: hidden;
    animation: tagPulse 3s infinite ease-in-out;
}

.instr-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes tagPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 12px 25px rgba(108, 92, 231, 0.5);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px) rotateX(10deg);
        opacity: 0;
    }

    to {
        transform: translateY(0) rotateX(2deg);
        opacity: 1;
    }
}

.therapedia-text h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.therapedia-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.therapedia-btn {
    background: transparent;
    color: #f39c12;
    border: 2px solid #f39c12;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.therapedia-btn:hover {
    background: #f39c12;
    color: white;
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 2rem;
    color: #000000;
    /* Black Color */
    font-size: 1.2rem;
    /* Larger Size */
    font-family: var(--font-heading);
    font-weight: 800;
    /* Extra Bold */
    font-style: italic;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Mind Weave Puzzle */
.weave-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 1rem;
}

.weave-tile {
    background: linear-gradient(135deg, #ffffff 0%, #f1f2f6 100%);
    border: none;
    border-radius: 50px;
    /* Pill Shape */
    padding: 1.2rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    /* Colorful 3D with 4-side Shadow */
    box-shadow:
        0 5px 0 #d1d8e0,
        0 10px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    top: 0;
}

.weave-tile:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow:
        0 8px 0 #d1d8e0,
        0 0 20px rgba(0, 0, 0, 0.05),
        0 15px 30px rgba(0, 0, 0, 0.1);
}

.weave-tile.selected {
    background: var(--accent-gradient);
    color: white;
    box-shadow:
        0 5px 0 rgba(72, 52, 212, 0.6),
        0 0 25px rgba(108, 92, 231, 0.3),
        0 15px 30px rgba(108, 92, 231, 0.3);
    transform: translateY(3px);
}

.weave-tile:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(200, 200, 200, 0.5);
}

.weave-tile.correct {
    background: #00b894;
    /* Success Green */
    border-color: #00b894;
    color: white;
    animation: pulse 0.5s ease;
}

.weave-tile.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    background: linear-gradient(135deg, #ff4757, #ee5253) !important;
    border-color: #ff6b6b !important;
    color: white !important;
    box-shadow: 0 4px 0 #cc0000;
}

/* Word Definition Tooltip */
.word-definition-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px 32px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.3);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.word-definition-tooltip.visible {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.word-def-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.word-def-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.word-def-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.word-def-word {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.word-def-phonetic {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 4px;
}

.word-def-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.word-def-close:hover {
    background: #f0f0f0;
    color: #333;
}

.word-def-audio-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.word-def-audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.word-def-meanings {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.word-def-pos {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin-top: 14px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.word-def-text {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 3px solid rgba(0, 0, 0, 0.06);
}

.word-def-example {
    font-size: 0.82rem;
    color: #888;
    font-style: italic;
    padding-left: 12px;
    margin-bottom: 8px;
}

.word-def-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.word-def-loading .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Emotion Palette Puzzle */
.emotion-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.emotion-card {
    background: #fff;
    padding: 2rem 3rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.emotion-card.correct-flash {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-text);
    transform: scale(1.05);
}

.emotion-card.wrong-flash {
    background: linear-gradient(135deg, #ff4757, #ee5253);
    border-color: #ff6b6b;
    color: white;
    animation: shake 0.4s ease;
}

.bucket-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.bucket-btn {
    flex: 1;
    min-width: 120px;
    padding: 1.2rem;
    border: none;
    border-radius: 50px;
    /* Pill Shape */
    font-size: 1rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Heavy 3D + Surround Shadow */
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.15),
        0 12px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
}

.bucket-btn:hover {
    transform: translateY(-5px);
    box-shadow:
        0 11px 0 rgba(0, 0, 0, 0.15),
        0 0 30px rgba(0, 0, 0, 0.08),
        0 20px 35px rgba(0, 0, 0, 0.12);
}

.bucket-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}



.bucket-btn.energizing {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.bucket-btn.neutral {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.bucket-btn.soothing {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.progress-indicator {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Pattern Breath (Thursday) */
.breath-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

.breath-circle-outer {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.breath-circle-inner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.5);
}

.breath-label {
    position: absolute;
    bottom: -40px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Micro Story (Friday) */
.story-area {
    padding: 1rem;
    text-align: center;
}

.story-text {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-style: italic;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.choice-btn {
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    /* 3D and 4-side Shadow */
    box-shadow:
        0 6px 0 #e0e0e0,
        0 10px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    top: 0;
}

.choice-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow:
        0 9px 0 #e0e0e0,
        0 0 25px rgba(0, 0, 0, 0.08),
        0 15px 30px rgba(0, 0, 0, 0.08);
}

.choice-btn:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #e0e0e0;
}

.choice-btn.correct {
    background: linear-gradient(135deg, #00b894, #55efc4) !important;
    color: white !important;
    box-shadow: 0 6px 0 #008f72, 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.choice-btn.wrong {
    background: linear-gradient(135deg, #ff4757, #ee5253) !important;
    color: white !important;
    box-shadow: 0 6px 0 #cc0000, 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    animation: shake 0.4s ease-in-out;
}

/* Gratitude Match (Saturday) */
.match-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 1rem;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-item {
    padding: 1.2rem;
    background: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    /* 3D and 4-side Shadow */
    box-shadow:
        0 6px 0 #f1f2f6,
        0 10px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    top: 0;
}

.match-item:hover {
    transform: translateY(-3px);
    box-shadow:
        0 9px 0 #f1f2f6,
        0 0 20px rgba(0, 0, 0, 0.05),
        0 15px 30px rgba(0, 0, 0, 0.08);
}

.match-item.selected {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(3px);
    box-shadow:
        0 3px 0 rgba(72, 52, 212, 0.4),
        0 15px 30px rgba(108, 92, 231, 0.2);
}

.match-item.matched {
    background: #00b894;
    color: white;
    box-shadow: none;
    top: 6px;
    cursor: default;
    opacity: 0.8;
}

.match-item.shake {
    background: linear-gradient(135deg, #ff4757, #e84118) !important;
    color: white !important;
    animation: shake 0.4s ease-in-out;
    box-shadow: 0 4px 0 #cc0000 !important;
}

/* ===== Puzzle Modal (Popup) ===== */
.puzzle-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 20px 20px;
    overflow-y: auto;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.puzzle-modal {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    max-width: 750px;
    width: 100%;
    padding: 2.5rem;
    position: relative;
    animation: slideUpModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #2d3436;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg);
}

/* --- Daily Mission Section (Top of Modal) --- */
.modal-mission-section {
    margin-bottom: 0;
}

/* --- Play Now Divider --- */
.play-now-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 2rem 0;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.12), transparent);
}

.play-now-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-color, #1b4d3e);
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 8px 20px;
    background: rgba(27, 77, 62, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(27, 77, 62, 0.1);
}

/* --- Game Section (Bottom of Modal) --- */
.modal-game-section {
    padding-top: 0;
}

.hidden {
    display: none !important;
}

/* --- Login Specific Styles --- */
.login-card {
    max-width: 450px;
    margin: 40px auto;
    padding: 3rem !important;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(27, 77, 62, 0.2));
}

.login-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.login-form {
    text-align: left;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    background: white;
    border-color: #1b4d3e;
    box-shadow: 0 0 0 4px rgba(27, 77, 62, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: #1b4d3e;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 8px 15px rgba(27, 77, 62, 0.2);
}

.login-btn:hover {
    background: #143d31;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(27, 77, 62, 0.3);
}

.login-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-footer a {
    color: #1b4d3e;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.login-footer span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== DARK GAMING LOGIN THEME ===== */

/* Gaming pattern background overlay */
body[data-theme='LOGIN']::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://res.cloudinary.com/dkdup4bqd/image/upload/v1774956046/gaming_pattern_ztvgr0.png') repeat center center;
    background-size: 500px 500px;
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
    animation: patternDrift 60s linear infinite;
}

@keyframes patternDrift {
    0% { background-position: 0 0; }
    100% { background-position: 500px 500px; }
}

/* Dark vignette overlay for depth */
body[data-theme='LOGIN']::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Dark login card — glass morphism on dark */
body[data-theme='LOGIN'] .login-card {
    background: rgba(22, 26, 34, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 229, 160, 0.12);
    box-shadow:
        0 0 60px rgba(0, 229, 160, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Subtle top accent line on card */
body[data-theme='LOGIN'] .login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00e5a0, #00b4d8, #7c3aed, transparent);
    border-radius: 2px;
}

body[data-theme='LOGIN'] .login-logo {
    filter: drop-shadow(0 0 20px rgba(0, 229, 160, 0.35)) brightness(1.1);
}

body[data-theme='LOGIN'] .login-header h2 {
    color: #f0f4f8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body[data-theme='LOGIN'] .login-header p {
    color: #8b95a5;
}

/* Dark input fields */
body[data-theme='LOGIN'] .input-group label {
    color: #a0aab8;
    letter-spacing: 1.5px;
    font-size: 0.78rem;
}

body[data-theme='LOGIN'] .input-group input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8ecf1;
    font-size: 1rem;
}

body[data-theme='LOGIN'] .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

body[data-theme='LOGIN'] .input-group input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: #00e5a0;
    box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.15), 0 0 20px rgba(0, 229, 160, 0.08);
}

body[data-theme='LOGIN'] .input-group input.valid {
    border-color: #00e5a0;
}

body[data-theme='LOGIN'] .input-group input.invalid {
    border-color: #ff6b6b;
}

/* Neon accent sign-in button */
body[data-theme='LOGIN'] .login-btn {
    background: linear-gradient(135deg, #00e5a0, #00b4d8);
    color: #0a0e13;
    font-weight: 800;
    box-shadow:
        0 4px 20px rgba(0, 229, 160, 0.3),
        0 0 40px rgba(0, 229, 160, 0.1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

body[data-theme='LOGIN'] .login-btn:hover {
    background: linear-gradient(135deg, #00ffb3, #00c8e8);
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        0 8px 30px rgba(0, 229, 160, 0.4),
        0 0 60px rgba(0, 229, 160, 0.15);
}

body[data-theme='LOGIN'] .login-btn:active {
    transform: translateY(0) scale(0.99);
}

/* Dark footer links */
body[data-theme='LOGIN'] .login-footer a {
    color: #00e5a0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

body[data-theme='LOGIN'] .login-footer a:hover {
    color: #00ffb3;
    text-shadow: 0 0 12px rgba(0, 229, 160, 0.4);
}

body[data-theme='LOGIN'] .login-footer span {
    color: #6b7785;
}

/* Login type toggle — dark version */
body[data-theme='LOGIN'] .login-type-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme='LOGIN'] .type-btn {
    color: #6b7785;
}

body[data-theme='LOGIN'] .type-btn.active {
    background: rgba(0, 229, 160, 0.12);
    color: #00e5a0;
    box-shadow: 0 2px 10px rgba(0, 229, 160, 0.1);
}

/* Field errors on dark */
body[data-theme='LOGIN'] .field-error {
    color: #ff6b6b;
}

/* Feedback area on dark */
body[data-theme='LOGIN'] .feedback-area {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    color: #a0aab8;
}

/* Signup step indicators on dark */
body[data-theme='LOGIN'] .step-num {
    border-color: rgba(255, 255, 255, 0.15);
    color: #6b7785;
}

body[data-theme='LOGIN'] .step.active .step-num {
    background: #00e5a0;
    border-color: #00e5a0;
    color: #0a0e13;
}

body[data-theme='LOGIN'] .step-label {
    color: #6b7785;
}

body[data-theme='LOGIN'] .step.active .step-label {
    color: #00e5a0;
}

body[data-theme='LOGIN'] .step-line {
    background: rgba(255, 255, 255, 0.1);
}

/* OTP feedback on dark */
body[data-theme='LOGIN'] .otp-feedback {
    color: #a0aab8;
}

/* ===== Multi-Step Signup OTP Styles ===== */
.signup-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.8rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.step.active .step-num {
    background: var(--accent-color, #1b4d3e);
    color: white;
    box-shadow: 0 4px 12px rgba(27, 77, 62, 0.35);
}

.step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--accent-color, #1b4d3e);
}

.step-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 8px;
    margin-bottom: 18px;
    min-width: 40px;
    transition: all 0.3s ease;
}

/* OTP email row: input + button side by side */
.otp-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.otp-input-row input {
    flex: 1;
}

.otp-send-btn {
    padding: 12px 16px;
    background: var(--accent-color, #1b4d3e);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(27, 77, 62, 0.25);
}

.otp-send-btn:hover {
    background: #143d31;
    transform: translateY(-1px);
}

.otp-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.otp-send-btn.sent {
    background: #00b894;
}

/* OTP sent info box */
.otp-sent-info {
    text-align: center;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 1.5rem;
}

.otp-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.otp-sent-info p {
    margin: 0;
    color: #166534;
    font-size: 0.95rem;
    line-height: 1.6;
}

.otp-sent-info strong {
    color: #14532d;
}

/* OTP feedback messages */
.otp-feedback {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
    text-align: center;
}

.otp-feedback.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.otp-feedback.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* Responsive */
@media (max-width: 480px) {
    .glass-panel {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .therapedia-card {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 6px solid #fdcb6e;
    }
}

/* ===== Memory Match Game Styles ===== */

.memory-game-header {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.memory-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    min-width: 80px;
    transition: transform 0.2s ease;
}

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

.memory-stat-icon {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.memory-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary, #888);
    font-weight: 600;
}

.memory-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #333);
}

.memory-grid {
    display: grid;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    perspective: 1000px;
    padding: 0.5rem;
}

.memory-card {
    aspect-ratio: 1;
    min-height: 80px;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    transition: transform 0.15s ease;
}

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

.memory-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 12px;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
}

/* Front of card — golden card back (as per reference images) */
/* Front of card — restored to Golden Yellow as per original */
.memory-card-front {
    background: linear-gradient(145deg, #f5c842, #e8a817);
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.2rem;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 15px rgba(229, 168, 23, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Back of card — revealed symbol */
.memory-card-back {
    background: linear-gradient(145deg, #5e4a3a, #4a3728);
    color: white;
    font-size: 2.2rem;
    transform: rotateY(180deg);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Matched state */
.memory-card.matched .memory-card-back {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 0 20px rgba(46, 204, 113, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: matchPulse 0.5s ease;
}

.memory-card.matched {
    pointer-events: none;
}

#microStoryTherapediaBtn {
    position: relative;
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    color: white !important;
    overflow: hidden;
}

#microStoryTherapediaBtn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.5), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

@keyframes matchPulse {
    0% {
        transform: rotateY(180deg) scale(1);
    }

    50% {
        transform: rotateY(180deg) scale(1.1);
    }

    100% {
        transform: rotateY(180deg) scale(1);
    }
}

/* Responsive for smaller screens */
@media (max-width: 480px) {
    .memory-grid {
        gap: 6px;
        max-width: 100%;
    }

    .memory-card-front {
        font-size: 1.2rem;
    }

    .memory-card-back {
        font-size: 1.6rem;
    }

    .memory-game-header {
        gap: 0.8rem;
    }

    .memory-stat {
        padding: 0.5rem 0.8rem;
        min-width: 65px;
    }
}

/* ===== Visual Statistics Stats ===== */
.wide-card {
    grid-column: span 2;
}

.stats-visualization-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 24px;
    margin-top: 1.5rem;
    padding: 10px;
}

.stat-viz-box {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.viz-caption {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 12px;
    opacity: 0.8;
}

/* Progress Ring */
.progress-ring-viz {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring-viz svg {
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: #f1f2f6;
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    /* 2 * PI * r (54) */
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s cubic-bezier(0.1, 0.5, 0.1, 1);
}

/* === Weekly Progress Ring (Dashboard Card) === */
.progress-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-card .progress-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 12px auto 8px;
}

.progress-card .progress-ring {
    transform: rotate(-90deg);
    display: block;
}

.progress-ring-bg {
    fill: none;
    stroke: #e8edf3;
    stroke-width: 10;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent-color, #4f7df9);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314.16;
    /* 2 * PI * 50 */
    stroke-dashoffset: 314.16;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-percent {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color, #4f7df9);
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

.ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ring-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ring-lab {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Heatmap */
.heatmap-box {
    align-items: stretch;
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.heatmap-legend {
    display: flex;
    gap: 4px;
}

.legend-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 5px;
    flex: 1;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    background: #f1f2f6;
    position: relative;
    cursor: help;
    transition: transform 0.2s;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 2;
}

.heatmap-cell.active {
    background: var(--accent-color);
    box-shadow: 0 0 8px rgba(var(--accent-color-rgb), 0.3);
}

/* Badges */
.badges-box {
    align-items: stretch;
}

.badges-header {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.badges-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    flex: 1;
}

.badge-item {
    flex: 0 0 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.3;
    filter: grayscale(1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-item.unlocked {
    opacity: 1;
    filter: grayscale(0);
}

.badge-item.unlocked:hover {
    transform: translateY(-4px);
}

.badge-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.badge-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .stats-visualization-container {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-column: span 1;
    }
}

/* =============================================
   ADMIN DASHBOARD STYLES
   ============================================= */

:root {
    --admin-bg: #f8fafc;
    --admin-sidebar: #1e293b;
    --admin-accent: #3b82f6;
    --admin-text-main: #1e293b;
    --admin-text-muted: #64748b;
    --admin-border: #e2e8f0;
    --admin-white: #ffffff;
}

[data-theme="ADMIN"] {
    background: var(--admin-bg);
    display: block !important;
    padding: 0 !important;
}

[data-theme="ADMIN"] .app-container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--admin-bg);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transition: all 0.3s ease;
    min-height: 100vh;
}

.sidebar-header {
    padding: 0 24px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.sidebar-header img {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--admin-accent);
    border-left-color: var(--admin-accent);
}

/* Main Content Area */
.admin-main {
    flex: 1;
    padding: 32px;
    color: var(--admin-text-main);
}

.admin-module-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.admin-module-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: black;
}

.admin-module-header p {
    color: var(--admin-text-muted);
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--admin-white);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--admin-border);
    overflow: hidden;
}

.stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.stat-icon.users {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon.rate {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon.star {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stat-info .label {
    display: block;
    color: var(--admin-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 4px;
}

.stat-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    margin-top: 2px;
}

/* Charts */
.admin-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
}

.chart-container {
    background: var(--admin-white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--admin-border);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-container canvas {
    flex: 1;
    width: 100% !important;
}

/* Tables */
.table-container {
    background: var(--admin-white);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--admin-border);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    padding: 16px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: #fbfcfe;
}

.track-btn {
    background: var(--admin-accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.track-btn:hover {
    opacity: 0.9;
}

/* Search Box */
.header-actions .search-box {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    font-size: 0.9rem;
}

/* User Detail Drill-down */
.back-link {
    background: none;
    border: none;
    color: var(--admin-accent);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--admin-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.detail-card {
    background: var(--admin-white);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column: 1 / -1;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--admin-white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
}

.stat-box .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-box .value {
    font-weight: 600;
    font-size: 1.1rem;
}

.radar-wrapper {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* Mobile Responsiveness for Admin */
@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--admin-border);
        padding: 8px 12px;
        background: var(--admin-white);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }

    .sidebar-item {
        white-space: nowrap;
        padding: 8px 16px;
    }

    .admin-main {
        padding: 16px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-stats {
        grid-template-columns: 1fr;
    }

    .admin-charts-grid {
        grid-template-columns: 1fr;
    }

    .user-profile-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Login Type Toggle */
.login-type-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.type-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.type-btn.active {
    background: white;
    color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Mental Fitness Footer Styles --- */
.mental-fitness-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 900;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mental-fitness-footer:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-style: italic;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 8px 30px;
    border-radius: 60px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 3px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Logic for "hidden" class if not already defined for global use */
.hidden {
    display: none !important;
}
/* --- Word Grid (Sunday Step 1) --- */
.wordgrid-theme {
    text-align: center;
    margin-bottom: 1rem;
}

body[data-theme='WORD_GRID'] {
    --bg-animate: linear-gradient(-45deg, #FF9A8B 0%, #FF6A88 55%, #FF99AC 100%);
    --accent-color: #ff6b81;
}
body[data-theme='UNSCRAMBLE'] {
    --bg-animate: linear-gradient(-45deg, #A8E6CF 0%, #DCEDC1 100%);
    --accent-color: #55efc4;
}
body[data-theme='MAZE'] {
    --bg-animate: linear-gradient(-45deg, #a1c4fd 0%, #c2e9fb 100%);
    --accent-color: #74b9ff;
}
body[data-theme='RIDDLE'] {
    --bg-animate: linear-gradient(-45deg, #667eea 0%, #764ba2 100%);
    --accent-color: #a29bfe;
}

/* --- Word Discovery Grid (Screenshot Style) --- */
.wordgrid-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.wordgrid-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #2d3436;
}

.wordgrid-instruction {
    color: #636e72;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.word-list-top {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.word-chip {
    padding: 8px 20px;
    background: #eaeff2;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b6584;
}

.word-chip.found {
    color: #26a69a;
    background: #e0f2f1;
}

.word-grid-container {
    display: grid;
    gap: 12px;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 20px;
}

.grid-letter-cell {
    aspect-ratio: 1;
    background: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3436;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-letter-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.grid-letter-cell.selected {
    background: #546de5;
    color: white;
}

.grid-letter-cell.found {
    background: white;
    color: #2ecc71;
    cursor: default;
    box-shadow: none;
    opacity: 1;
}

.wordgrid-hint-bottom {
    font-size: 0.95rem;
    color: #636e72;
    margin-top: 2rem;
}

/* --- Affirmation Unscramble (Updated to Letter blocks) --- */
.unscramble-container {
    text-align: center;
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.unscramble-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.unscramble-hint {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.unscramble-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 3rem;
    min-height: 60px;
}

.unscramble-slot {
    width: 50px;
    height: 60px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.unscramble-slot.filled {
    border: 2px solid var(--accent-color);
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.unscramble-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.unscramble-letter-btn {
    width: 55px;
    height: 55px;
    background: white;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unscramble-letter-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.unscramble-letter-btn.used {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* --- Focus Maze Premium (Sunday Step 3) --- */
.maze-wrapper-premium {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background: #f3f0ff; /* Soft lavender background wash from screenshot */
    border-radius: 40px;
    box-shadow: inset 0 0 100px rgba(255,255,255,0.5);
}

.maze-title-main {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.maze-subtitle-main {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.maze-grid-traditional {
    display: grid;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.maze-cell-trad {
    aspect-ratio: 1;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid transparent; 
}

/* Maze Wall Borders (Crisp and Fine) */
.maze-cell-trad.w-top { border-top: 1px solid #b2bec3; }
.maze-cell-trad.w-right { border-right: 1px solid #b2bec3; }
.maze-cell-trad.w-bottom { border-bottom: 1px solid #b2bec3; }
.maze-cell-trad.w-left { border-left: 1px solid #b2bec3; }

/* Visited Path Dots - Tiny dark circles from screenshot */
.maze-cell-trad.visited::after {
    content: '';
    width: 25%;
    height: 25%;
    background: #536b6b; 
    border-radius: 50%;
    display: block;
    animation: dotPop 0.15s ease-out forwards;
}

@keyframes dotPop {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* Token Styling for Pixel Perfection */
.maze-token-circle {
    width: 75%;
    height: 75%;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.maze-token-circle.start {
    background: #536b6b; /* Dark Slate Green */
}

.maze-token-circle.end {
    background: #c59d5f; /* Deep Gold */
    border: 4px solid #483d2e; /* The high-contrast dark ring */
    box-shadow: 0 4px 10px rgba(197, 157, 95, 0.4);
}

.maze-hint-bottom-main {
    margin-top: 2rem;
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}



/* --- Journey UI --- */
.journey-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-right: 12px;
    vertical-align: middle;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.next-stage-btn {
    background: #6c5ce7 !important;
    animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(108, 92, 231, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
}
