/* =====================================================
   SHORT MEMORY CHECKER: PATTERN FOCUS 5x5
   Clean, Modern, Gamified & 100% Mobile-First Stylesheet
   ===================================================== */

:root {
    --mem-bg-dark: #090e1a;
    --mem-card-bg: #111827;
    --mem-card-border: #1f2937;
    --mem-tile-bg: #1e293b;
    --mem-tile-border: #334155;
    --mem-cyan: #38bdf8;
    --mem-cyan-glow: rgba(56, 189, 248, 0.45);
    --mem-emerald: #10b981;
    --mem-emerald-glow: rgba(16, 185, 129, 0.45);
    --mem-crimson: #ef4444;
    --mem-crimson-glow: rgba(239, 68, 68, 0.45);
    --mem-amber: #f59e0b;
    --mem-amber-glow: rgba(245, 158, 11, 0.45);
    --mem-purple: #8b5cf6;
    --mem-text-main: #f8fafc;
    --mem-text-sub: #94a3b8;
}

/* Base Page Wrapper */
.mem-page-wrapper {
    width: 100%;
    min-height: calc(100vh - 80px);
    background: linear-gradient(180deg, #090e1a 0%, #0f172a 100%);
    color: var(--mem-text-main);
    padding: 16px 10px 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    font-family: 'Nunito', 'Noto Sans Sinhala', system-ui, -apple-system, sans-serif;
}

.mem-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Breadcrumb Navigation */
.mem-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 2px;
}

.mem-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.mem-breadcrumb a:hover {
    color: var(--mem-cyan);
}

.mem-breadcrumb .sep {
    color: #475569;
}

.mem-breadcrumb .current {
    color: #cbd5e1;
    font-weight: 600;
}

/* Main Game Card */
.mem-game-card {
    background: var(--mem-card-bg);
    border: 1px solid var(--mem-card-border);
    border-radius: 24px;
    padding: 20px 16px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Card Topbar */
.mem-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mem-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--mem-cyan);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.mem-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mem-back-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-1px);
}

.mem-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mem-icon-btn:hover {
    background: #334155;
    color: #ffffff;
    transform: scale(1.05);
}

.mem-icon-btn.muted {
    color: #64748b;
    border-color: #334155;
}

/* ===================================================
   SCREEN 1: WELCOME & HOW TO PLAY
   =================================================== */
.screen-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.mem-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(56, 189, 248, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
}

.mem-game-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

.mem-game-title span {
    background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mem-game-desc {
    font-size: 0.92rem;
    color: var(--mem-text-sub);
    line-height: 1.5;
    margin: 0;
    max-width: 440px;
}

/* High Score Pill on Welcome */
.mem-welcome-stats-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}

.mem-stat-badge-box {
    flex: 1;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mem-stat-badge-box .stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f1f5f9;
}

.mem-stat-badge-box .stat-lbl {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* How to Play Box */
.mem-tutorial-box {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-radius: 18px;
    padding: 16px;
    text-align: left;
    margin-top: 4px;
}

.mem-tutorial-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mem-tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mem-tut-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.mem-tut-icon-circle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

/* Big Start Button */
.btn-start-game {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #059669 100%);
    border: none;
    border-radius: 18px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 6px;
}

.btn-start-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(2, 132, 199, 0.65);
}

.btn-start-game:active {
    transform: scale(0.98);
}

/* ===================================================
   SCREEN 2: COUNTDOWN OVERLAY
   =================================================== */
.screen-countdown {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.mem-countdown-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(16, 185, 129, 0.15));
    border: 3px solid var(--mem-cyan);
    box-shadow: 0 0 35px var(--mem-cyan-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    animation: countdownPulse 0.9s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(0.85);
        opacity: 0.6;
    }
}

.mem-countdown-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: #94a3b8;
}

/* ===================================================
   SCREEN 3: ACTIVE GAMEPLAY
   =================================================== */
.screen-gameplay {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* HUD Top Header */
.mem-hud-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 8px;
    align-items: center;
}

.mem-hud-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mem-hud-card .hud-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mem-hud-card .hud-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.mem-hud-card.level-card .hud-value {
    color: var(--mem-cyan);
}

.mem-hud-card.score-card .hud-value {
    color: #34d399;
}

/* Phase & Instruction Banner */
.mem-phase-banner {
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mem-phase-banner.memorize {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

.mem-phase-banner.recall {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
}

.mem-phase-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 800;
}

.mem-phase-banner.memorize .mem-phase-left {
    color: var(--mem-cyan);
}

.mem-phase-banner.recall .mem-phase-left {
    color: #34d399;
}

.mem-phase-right {
    font-size: 0.8rem;
    font-weight: 700;
    color: #cbd5e1;
}

/* Memorize Countdown Bar */
.mem-timer-bar-wrap {
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: -4px;
}

.mem-timer-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #38bdf8, #34d399);
    border-radius: 9999px;
    transform-origin: left;
}

/* ===================================================
   THE 5x5 GRID (100% Mobile Responsive)
   =================================================== */
.mem-grid-container {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin: 4px auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 8px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

@media (max-width: 400px) {
    .mem-grid-container {
        gap: 6px;
    }
}

.mem-tile {
    width: 100%;
    height: 100%;
    background: var(--mem-tile-bg);
    border: 1.5px solid var(--mem-tile-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: transparent;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.mem-tile:active {
    transform: scale(0.92);
}

/* Highlighted (Memorize Phase) */
.mem-tile.highlighted {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    border-color: #7dd3fc;
    box-shadow: 0 0 20px var(--mem-cyan-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: tilePulse 1.2s infinite ease-in-out;
}

@keyframes tilePulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.03);
        filter: brightness(1.15);
    }
}

/* Correct Tap (Vibrant Emerald Neon) */
.mem-tile.correct {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #6ee7b7;
    box-shadow: 0 0 18px var(--mem-emerald-glow);
    color: #ffffff;
    animation: correctPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes correctPop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.12);
    }

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

/* Wrong Tap (Crimson Red with Shake) */
.mem-tile.wrong {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-color: #fca5a5;
    box-shadow: 0 0 22px var(--mem-crimson-glow);
    color: #ffffff;
    animation: tileShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes tileShake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(3px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Missed Tiles (Revealed at Game Over) */
.mem-tile.missed {
    background: rgba(245, 158, 11, 0.2);
    border: 2px dashed #fbbf24;
    box-shadow: 0 0 15px var(--mem-amber-glow);
    color: #fde68a;
    animation: missedGlow 1s infinite alternate ease-in-out;
}

@keyframes missedGlow {
    0% {
        border-color: #f59e0b;
    }

    100% {
        border-color: #fef08a;
    }
}

/* Level Up Overlay Banner */
.mem-level-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mem-level-banner-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.mem-level-banner-badge {
    font-size: 2.2rem;
    animation: bounceBadge 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceBadge {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    70% {
        transform: scale(1.15);
        opacity: 1;
    }

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

.mem-level-banner-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.mem-level-banner-sub {
    font-size: 0.9rem;
    color: #34d399;
    font-weight: 700;
}

/* ===================================================
   SCREEN 4: GAME OVER & VICTORY MODAL
   =================================================== */
.screen-gameover {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    width: 100%;
}

/* 5 Medal Types & Glowing Animation System */
.mem-result-trophy-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2px auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: medalFloat 3s ease-in-out infinite alternate;
}

.mem-result-trophy-wrap i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

@keyframes medalFloat {
    0% {
        transform: translateY(0px) scale(0.98);
    }

    100% {
        transform: translateY(-6px) scale(1.03);
    }
}

/* 1. NO MEDAL (Level 1-2) */
.mem-result-trophy-wrap.medal-none {
    background: radial-gradient(circle, rgba(100, 116, 139, 0.25) 0%, rgba(30, 41, 59, 0.5) 100%);
    border: 2.5px solid #64748b;
    box-shadow: 0 0 25px rgba(100, 116, 139, 0.35);
    animation: medalNonePulse 2.5s infinite alternate ease-in-out;
}

.mem-result-trophy-wrap.medal-none i {
    color: #94a3b8 !important;
}

@keyframes medalNonePulse {
    0% {
        box-shadow: 0 0 15px rgba(100, 116, 139, 0.2);
    }

    100% {
        box-shadow: 0 0 30px rgba(100, 116, 139, 0.45);
    }
}

/* 2. BRONZE MEDAL (Level 3-4) */
.mem-result-trophy-wrap.medal-bronze {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.35) 0%, rgba(146, 64, 14, 0.5) 100%);
    border: 2.5px solid #d97706;
    box-shadow: 0 0 35px rgba(217, 119, 6, 0.55), inset 0 0 15px rgba(245, 158, 11, 0.3);
    animation: medalBronzeGlow 2s infinite alternate ease-in-out;
}

.mem-result-trophy-wrap.medal-bronze i {
    color: #f59e0b !important;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.65));
}

@keyframes medalBronzeGlow {
    0% {
        transform: translateY(0) scale(0.98);
        box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
    }

    100% {
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 0 42px rgba(245, 158, 11, 0.75);
    }
}

/* 3. SILVER MEDAL (Level 5-6) */
.mem-result-trophy-wrap.medal-silver {
    background: radial-gradient(circle, rgba(226, 232, 240, 0.35) 0%, rgba(148, 163, 184, 0.5) 100%);
    border: 2.5px solid #cbd5e1;
    box-shadow: 0 0 40px rgba(226, 232, 240, 0.65), inset 0 0 20px rgba(255, 255, 255, 0.35);
    animation: medalSilverGlow 2s infinite alternate ease-in-out;
}

.mem-result-trophy-wrap.medal-silver i {
    color: #f8fafc !important;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.85));
}

@keyframes medalSilverGlow {
    0% {
        transform: translateY(0) scale(0.98);
        box-shadow: 0 0 25px rgba(203, 213, 225, 0.4);
    }

    100% {
        transform: translateY(-5px) scale(1.04);
        box-shadow: 0 0 48px rgba(255, 255, 255, 0.8);
    }
}

/* 4. GOLD MEDAL (Level 7-9) */
.mem-result-trophy-wrap.medal-gold {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, rgba(217, 119, 6, 0.55) 100%);
    border: 2.5px solid #fbbf24;
    box-shadow: 0 0 45px rgba(251, 191, 36, 0.75), inset 0 0 22px rgba(254, 240, 138, 0.45);
    animation: medalGoldGlow 1.8s infinite alternate ease-in-out;
}

.mem-result-trophy-wrap.medal-gold i {
    color: #fde047 !important;
    filter: drop-shadow(0 0 18px rgba(250, 204, 21, 0.95));
}

@keyframes medalGoldGlow {
    0% {
        transform: translateY(0) scale(0.97);
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    }

    100% {
        transform: translateY(-6px) scale(1.05);
        box-shadow: 0 0 58px rgba(251, 191, 36, 0.95);
    }
}

/* 5. PLATINUM MEDAL (Level 10 / Victory) */
.mem-result-trophy-wrap.medal-platinum {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(168, 85, 247, 0.45) 100%);
    border: 2.5px solid #38bdf8;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.85), 0 0 25px rgba(168, 85, 247, 0.65), inset 0 0 25px rgba(255, 255, 255, 0.55);
    animation: medalPlatinumGlow 1.5s infinite alternate ease-in-out;
}

.mem-result-trophy-wrap.medal-platinum i {
    color: #e0f2fe !important;
    filter: drop-shadow(0 0 22px rgba(56, 189, 248, 1));
}

@keyframes medalPlatinumGlow {
    0% {
        transform: translateY(0) scale(0.97) rotate(-2deg);
        box-shadow: 0 0 35px rgba(56, 189, 248, 0.6);
    }

    100% {
        transform: translateY(-7px) scale(1.06) rotate(2deg);
        box-shadow: 0 0 65px rgba(56, 189, 248, 0.95), 0 0 35px rgba(168, 85, 247, 0.75);
    }
}

/* Medal Pill Tag */
.mem-medal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -4px;
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mem-medal-tag.medal-none {
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid #64748b;
    color: #cbd5e1;
}

.mem-medal-tag.medal-bronze {
    background: linear-gradient(90deg, #92400e, #d97706);
    border: 1px solid #f59e0b;
    color: #ffffff;
}

.mem-medal-tag.medal-silver {
    background: linear-gradient(90deg, #475569, #94a3b8);
    border: 1px solid #e2e8f0;
    color: #ffffff;
}

.mem-medal-tag.medal-gold {
    background: linear-gradient(90deg, #d97706, #fbbf24);
    border: 1px solid #fde047;
    color: #78350f;
    font-weight: 900;
}

.mem-medal-tag.medal-platinum {
    background: linear-gradient(90deg, #0284c7, #8b5cf6);
    border: 1px solid #38bdf8;
    color: #ffffff;
    font-weight: 900;
    animation: highGlow 1.5s infinite alternate;
}

.mem-result-title,
h2.mem-result-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0;
}

.mem-new-high-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #f59e0b, #e11d48);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: highGlow 1.5s infinite alternate;
}

@keyframes highGlow {
    0% {
        transform: scale(0.96);
    }

    100% {
        transform: scale(1.04);
    }
}

/* Score Breakdown Card */
.mem-score-breakdown-card {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.mem-score-main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 12px;
}

.mem-score-main-num {
    font-size: 2.6rem;
    font-weight: 900;
    color: #38bdf8;
    line-height: 1.1;
}

.mem-score-main-lbl {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mem-score-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.mem-score-sub-item {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 8px 6px;
    text-align: center;
}

.mem-score-sub-item .sub-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
}

.mem-score-sub-item .sub-lbl {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

/* Cognitive Performance Tier Card */
.mem-cognitive-tier-card {
    width: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 14px 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
}

.mem-tier-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mem-tier-info {
    flex: 1;
}

.mem-tier-name {
    font-size: 1rem;
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 2px;
}

.mem-tier-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

/* Social Share Action Section */
.mem-share-section {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

.mem-share-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mem-share-buttons-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mem-share-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 6px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.mem-share-btn i {
    font-size: 1.15rem;
}

.mem-share-btn:active {
    transform: scale(0.94);
}

.mem-share-btn.whatsapp {
    background: #25d366;
}

.mem-share-btn.facebook {
    background: #1877f2;
}

.mem-share-btn.twitter {
    background: #000000;
    border: 1px solid #334155;
}

.mem-share-btn.native {
    background: linear-gradient(135deg, #0284c7, #0d9488);
}

/* Play Again & Action Buttons */
.mem-action-buttons-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-play-again {
    flex: 1.4;
    background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 20px -5px rgba(5, 150, 105, 0.45);
    transition: all 0.2s;
}

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

.btn-all-tools {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 14px 12px;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-all-tools:hover {
    background: #334155;
    color: #ffffff;
}

/* ===================================================
   STANDARD MEDICAL DISCLAIMER CARD (Amber Rounded)
   =================================================== */
.medical-disclaimer-card {
    background: #fffdf5 !important;
    border: 1.5px solid #fef08a !important;
    border-radius: 20px !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.05) !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .medical-disclaimer-card {
        padding: 14px 16px !important;
        gap: 12px !important;
        border-radius: 16px !important;
    }
}

.disclaimer-icon-wrap {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    background: #fef3c7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #d97706 !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
}

.disclaimer-text {
    font-size: 0.85rem !important;
    color: #92400e !important;
    line-height: 1.55 !important;
}

.disclaimer-text strong {
    color: #78350f !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   Full Focus / Fullscreen Mode Styles
   ========================================================================== */

body.mem-focus-active {
    overflow-x: hidden !important;
    background: #090d16 !important;
}

/* Hide website navbar, footer, sidebars, ads, breadcrumbs & disclaimer in Focus Mode */
body.mem-focus-active #navbar-placeholder,
body.mem-focus-active #footer-placeholder,
body.mem-focus-active .navbar,
body.mem-focus-active .footer,
body.mem-focus-active header,
body.mem-focus-active footer,
body.mem-focus-active .mobile-only-nav,
body.mem-focus-active .tool-ad-sidebar-col,
body.mem-focus-active .tool-ad-slot,
body.mem-focus-active .mem-breadcrumb,
body.mem-focus-active .medical-disclaimer-card {
    display: none !important;
}

body.mem-focus-active .tool-ad-layout-wrapper,
body.mem-focus-active .tool-ad-main-col,
body.mem-focus-active .mem-page-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.mem-focus-active .mem-container {
    max-width: 580px !important;
    margin: 0 auto !important;
    padding: 16px 12px !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.mem-focus-active .mem-game-card {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Bottom Focus Mode Exit Bar */
.mem-bottom-exit-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.mem-bottom-exit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 9999px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mem-bottom-exit-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
}

.mem-bottom-exit-btn i {
    font-size: 1.25rem;
    color: #ef4444;
    transition: transform 0.2s ease;
}

.mem-bottom-exit-btn:hover i {
    transform: translateX(-3px);
}