:root {
    --bg-main: #0b0f19; --bg-panel: rgba(30, 41, 59, 0.7); 
    --bg-grid: #020617; --cell-empty: rgba(14, 165, 233, 0.02);
    --text-main: #f8fafc; --text-muted: #64748b;
    --accent-blue: #38bdf8; --accent-green: #10b981; 
    --accent-pink: #f43f5e; --accent-amber: #f59e0b;
    --grid-size: 5;
    --cell-size: min(calc(85vw / var(--grid-size)), calc((100svh - 500px) / var(--grid-size)), calc((100dvh - 500px) / var(--grid-size)), calc((100vh - 500px) / var(--grid-size)), 65px);
    --led-op: 0.6;
}

html {
    width: 100%; height: 100%;
    overflow: hidden; overscroll-behavior: none;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: radial-gradient(circle at top, #1e293b, var(--bg-main));
    color: var(--text-main); margin: 0; padding: env(safe-area-inset-top) 10px calc(60px + env(safe-area-inset-bottom)) 10px;
    box-sizing: border-box; 
    display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%;
    user-select: none; -webkit-user-select: none; overflow: hidden; overscroll-behavior: none;
}

/* SCREEN MANAGEMENT */
.screen { display: none; width: 100%; height: 100%; max-width: 520px; flex-direction: column; align-items: center; overflow-y: auto; overflow-x: hidden; }
.screen.active { display: flex; animation: fade-in 0.3s ease-out; }

@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

#screen-play { overflow: hidden; padding-bottom: 8px; }

/* HEADER STYLES */
.menu-header { text-align: center; margin: 0; }
.menu-header h1 { margin: 0; font-size: 48px; font-weight: 900; letter-spacing: 2px; color: transparent; background: linear-gradient(90deg, var(--accent-blue), var(--accent-green)); -webkit-background-clip: text; }
.menu-header h2 { margin: 5px 0 0 0; font-size: 24px; color: var(--text-muted); font-weight: 300; letter-spacing: 8px; text-transform: uppercase; }

.play-header, .map-header { width: 100%; display: flex; align-items: center; gap: 15px; margin: 6px 0; }
.small-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: 2px; color: transparent; background: linear-gradient(90deg, var(--accent-blue), var(--accent-green)); -webkit-background-clip: text; }
.back-btn { background: #334155; border: none; color: white; padding: 8px 12px; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* MAIN MENU */
.menu-content { 
    width: 100%; 
    min-height: 100%;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: space-evenly; 
    box-sizing: border-box;
    padding: 20px 0 calc(20px + env(safe-area-inset-bottom)) 0;
}
.menu-buttons { display: flex; flex-direction: column; gap: 12px; width: 80%; max-width: 300px; }
.menu-btn { padding: 14px 18px; border: none; border-radius: 12px; font-size: 17px; font-weight: bold; background: var(--bg-panel); color: white; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform 0.1s, background 0.2s; }
.menu-btn:active { transform: scale(0.96); }
.menu-btn.primary { background: var(--accent-blue); color: #020617; border: none; }
.menu-btn.danger { background: transparent; color: var(--accent-pink); border: 1px solid rgba(244, 63, 94, 0.3); padding: 10px; font-size: 13px; margin-top: 10px; }
.menu-btn.danger:active { background: rgba(244, 63, 94, 0.1); }

/* MAP SELECT */
.map-container { width: 100%; display: flex; flex-direction: column; gap: 15px; overflow-y: auto; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.world-card { background: var(--bg-panel); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.world-header { margin: 0 0 12px 0; font-size: 18px; color: var(--accent-blue); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.world-header.locked { color: var(--text-muted); }
.level-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.lvl-map-btn { width: 45px; height: 45px; border-radius: 50%; background: #334155; border: 2px solid transparent; color: white; font-weight: bold; font-size: 16px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.lvl-map-btn.locked { background: #1e293b; color: var(--text-muted); opacity: 0.5; pointer-events: none; }
.lvl-map-btn.completed { background: rgba(16, 185, 129, 0.2); border-color: var(--accent-green); color: var(--accent-green); }
.lvl-map-btn.current { background: rgba(56, 189, 248, 0.2); border-color: var(--accent-blue); color: var(--accent-blue); box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }

/* GAME PLAY */
.game-container { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 520px; flex: 1; min-height: 0; }

.campaign-panel, .toolbar {
    background: var(--bg-panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.mission-info { padding: 4px; position: relative; flex-shrink: 0; }
.mission-header-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0; }
.obj-title { margin: 0; font-size: 18px; font-weight: bold; color: var(--accent-blue); }
.obj-hint { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.rule-badge { display: inline-block; padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.rule-sandbox { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.rule-strict { background: rgba(244, 63, 94, 0.2); color: var(--accent-pink); }
.dev-skip-btn { background: #334155; border: none; color: white; padding: 4px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; }

.board-wrapper {
    background: var(--bg-grid); padding: 12px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: center; align-items: center;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.5);
    flex: 1; min-height: 0;
}

#grid-container { 
    display: grid; gap: 0; position: relative; border-radius: 4px;
    border-top: 1px solid rgba(56, 189, 248, 0.15); border-left: 1px solid rgba(56, 189, 248, 0.15);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1); touch-action: none;
}

.cell { 
    width: var(--cell-size); height: var(--cell-size); background: var(--cell-empty);
    box-sizing: border-box; border-right: 1px solid rgba(56, 189, 248, 0.15); border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    position: relative; cursor: pointer; display: flex; justify-content: center; align-items: center; 
}
.cell.emitter { background: rgba(56, 189, 248, 0.1); }
.cell.blocked { background: repeating-linear-gradient(45deg, rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.6) 4px, transparent 4px, transparent 8px); }

.toolbar { padding: 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(65px, 1fr)); gap: 4px; flex-shrink: 0; }
.tool-btn { background: #1e293b; border: 1px solid rgba(255,255,255,0.1); color: var(--text-main); padding: 4px 2px; border-radius: 8px; font-size: 10px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.tool-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tool-btn.active { background: rgba(16, 185, 129, 0.15); border-color: var(--accent-green); }
.tool-btn.locked { opacity: 0.4; filter: grayscale(100%); cursor: default; }

.controls { display: flex; gap: 8px; width: 100%; flex-shrink: 0; margin-bottom: 4px; }
#btn-play { width: 100%; }
.btn-action { flex: 1; min-width: 0; padding: 8px; border: none; border-radius: 12px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 42px; overflow: hidden; text-overflow: ellipsis; }
#btn-undo { background: #475569; color: white; }
#btn-clear { background: #334155; color: white; }
#btn-speed { background: #1e293b; border: 1px solid rgba(255,255,255,0.15); color: white; }
#btn-hint { background: var(--accent-amber); color: #020617; border: 1px solid rgba(255,255,255,0.15); }
#btn-play.state-design { background: var(--accent-green); color: white; }
#btn-play.state-running { background: #ef4444; color: white; }

/* Disabled state for btn-action */
.btn-action:disabled, .btn-action.disabled {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #475569 !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.theme-sketch .btn-action:disabled,
body.theme-sketch .btn-action.disabled {
    background: #e2e8f0 !important;
    border: 2px solid #94a3b8 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}
body.theme-cyberpunk .btn-action:disabled,
body.theme-cyberpunk .btn-action.disabled {
    background: #090014 !important;
    border: 1px solid #334155 !important;
    color: #475569 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.theme-retro .btn-action:disabled,
body.theme-retro .btn-action.disabled {
    background: #0c0600 !important;
    border: 2px solid #334155 !important;
    color: #334155 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.theme-whimsical .btn-action:disabled,
body.theme-whimsical .btn-action.disabled {
    background: #f1f5f9 !important;
    border: 2px solid #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

#btn-global-mute {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    right: 10px;
    z-index: 2000;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    font-size: 20px;
    transition: 0.2s;
}

#status { text-align: center; font-weight: bold; margin: 0; font-size: 14px; min-height: 20px; display: flex; align-items: center; justify-content: center; }

.shape { position: absolute; width: var(--cell-size); height: var(--cell-size); display: flex; justify-content: center; align-items: center; z-index: 10; pointer-events: none; transition: top var(--tick-dur, 0.3s) linear, left var(--tick-dur, 0.3s) linear, transform calc(var(--tick-dur, 0.3s) * 0.66) ease-in-out; }
.shape svg { width: 60%; height: 60%; }

.machine-layer { position: absolute; inset: 0; pointer-events: none; transition: transform 0.2s; }
.machine-layer svg { width: 100%; height: 100%; display: block; }
.tread-pulse { stroke-dasharray: 6 6; animation: flowTread 0.5s linear infinite; }
.led-pulse { stroke-dasharray: 8 8; opacity: var(--led-op); animation: flowLED 0.8s linear infinite; }
@keyframes flowLED { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
@keyframes flowTread { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }

/* POPUP STYLES */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.popup-content {
    background: var(--bg-panel); border: 2px solid var(--accent-amber); border-radius: 16px;
    padding: 24px; max-width: 90%; width: 400px; box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    text-align: center; animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh; overflow-y: auto;
}
.popup-title {
    margin: 0 0 20px 0; color: var(--accent-amber); font-size: 24px; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.popup-items {
    display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px;
}
.unlock-item {
    display: flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.4); padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
}
.unlock-icon {
    width: 48px; height: 48px; display: flex; justify-content: center; align-items: center; background: #0f172a; border-radius: 10px; border: 1px solid #334155;
}
.unlock-info {
    text-align: left;
}
.unlock-name {
    margin: 0; font-size: 18px; font-weight: bold; color: var(--accent-blue);
}
.unlock-desc {
    margin: 4px 0 0 0; font-size: 13px; color: var(--text-muted);
}
@keyframes pop-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Victory Pulse Animation */
@keyframes victory-pulse-wave {
    0% { box-shadow: inset 0 0 0 0 rgba(56, 189, 248, 0.8), 0 0 0 0 rgba(56, 189, 248, 0.8); border-color: rgba(56, 189, 248, 1); }
    40% { box-shadow: inset 0 0 50px 0 rgba(16, 185, 129, 0), 0 0 50px 50px rgba(16, 185, 129, 0); border-color: rgba(16, 185, 129, 0.3); }
    100% { box-shadow: inset 0 0 0 0 rgba(16, 185, 129, 0), 0 0 0 0 rgba(16, 185, 129, 0); border-color: transparent; }
}

@keyframes victory-glow {
    0% { filter: brightness(1) drop-shadow(0 0 0 rgba(56, 189, 248, 0)); transform: scale(1); }
    15% { filter: brightness(1.8) drop-shadow(0 0 15px rgba(56, 189, 248, 1)) drop-shadow(0 0 25px rgba(16, 185, 129, 0.8)); transform: scale(1.1); }
    40% { filter: brightness(1.4) drop-shadow(0 0 8px rgba(56, 189, 248, 0.6)); transform: scale(1.05); }
    70% { filter: brightness(1.6) drop-shadow(0 0 12px rgba(16, 185, 129, 0.9)); transform: scale(1.08); }
    100% { filter: brightness(1) drop-shadow(0 0 0 rgba(16, 185, 129, 0)); transform: scale(1); }
}

.victory-pulse {
    animation: victory-pulse-wave 2.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.victory-glow {
    animation: victory-glow 3.5s ease-in-out;
}

/* Particles */
.particle-text {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-green);
    pointer-events: none;
    z-index: 100;
    animation: float-up 1s ease-out forwards;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
@keyframes float-up {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-30px) scale(1.5); opacity: 0; }
}

/* Credits Scene */
.credits-viewport {
    width: 100%;
    height: 70vh;
    margin-top: 5vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.credits-scroll {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: center;
    animation: scroll-credits 20s linear infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes scroll-credits {
    0% { top: 100%; }
    100% { top: -150%; }
}

/* COMPACT MODE FOR SMALL SCREENS */
@media (max-height: 750px) {
    .game-container { gap: 6px !important; }
    .play-header { margin: 5px 0 !important; }
    .menu-header { margin-top: 10vh !important; margin-bottom: 20px !important; }
    .board-wrapper { padding: 6px !important; }
    .controls { gap: 6px !important; margin-bottom: 4px !important; }
    .controls > div { gap: 6px !important; margin-bottom: 4px !important; }
    .btn-action { padding: 10px !important; font-size: 14px !important; min-height: 44px !important; }
    .mission-info { padding: 0 !important; }
    .obj-title { font-size: 16px !important; }
    .toolbar { padding: 4px !important; gap: 2px !important; }
    .tool-btn { padding: 4px 2px !important; }
}

@media (max-height: 680px) {
    .game-container { gap: 4px !important; }
    .play-header { margin: 2px 0 !important; }
    .board-wrapper { padding: 4px !important; }
    .controls { gap: 4px !important; margin-bottom: 2px !important; }
    .controls > div { gap: 4px !important; margin-bottom: 2px !important; }
    .btn-action { padding: 8px 4px !important; font-size: 12px !important; min-height: 40px !important; }
    .toolbar { padding: 2px !important; gap: 2px !important; }
    .tool-btn { padding: 2px !important; font-size: 9px !important; }
}

@media (max-height: 600px) {
    :root {
        --cell-size: min(calc(85vw / var(--grid-size)), calc((100svh - 380px) / var(--grid-size)), calc((100dvh - 380px) / var(--grid-size)), calc((100vh - 380px) / var(--grid-size)), 55px);
    }
    .hud-header { padding-top: calc(env(safe-area-inset-top) + 4px); padding-bottom: 4px; }
    h1 { font-size: 20px; }
    .mission-info h2 { font-size: 16px; margin: 4px 0; }
    .toolbar { gap: 8px; }
}

/* 1. Pencil Sketch Theme */
body.theme-sketch {
    --bg-main: #f1f5f9;
    --bg-panel: #ffffff;
    --bg-grid: #ffffff;
    --cell-empty: rgba(0, 0, 0, 0.01);
    --text-main: #0f172a;
    --text-muted: #475569;
    
    /* Sketch/Ink Colors */
    --accent-blue: #1d4ed8;
    --accent-green: #15803d;
    --accent-pink: #be123c;
    --accent-amber: #b45309;
}
body.theme-sketch {
    background: #f1f5f9;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    color: #0f172a;
}
body.theme-sketch .board-wrapper {
    background: #ffffff;
    border: 2px solid #334155;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #334155;
}
body.theme-sketch .cell {
    border-right: 1px solid rgba(51, 65, 85, 0.15);
    border-bottom: 1px solid rgba(51, 65, 85, 0.15);
}
body.theme-sketch #grid-container {
    border-top: 1px solid rgba(51, 65, 85, 0.15);
    border-left: 1px solid rgba(51, 65, 85, 0.15);
    box-shadow: none;
}
body.theme-sketch .campaign-panel, body.theme-sketch .toolbar {
    border: 2px solid #334155 !important;
    border-radius: 8px !important;
    box-shadow: 4px 4px 0px #334155 !important;
    background: #ffffff !important;
}
body.theme-sketch .tool-btn {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
body.theme-sketch .tool-btn.active {
    background: #dcfce7 !important;
    border-color: #15803d !important;
    color: #14532d !important;
}
body.theme-sketch #btn-undo {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch #btn-clear {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 2px solid #fca5a5 !important;
    box-shadow: 2px 2px 0px #fca5a5 !important;
}
body.theme-sketch #btn-speed {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch .menu-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch .menu-btn.primary {
    background: var(--accent-blue) !important;
    color: white !important;
}

body.theme-sketch .btn-action {
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #334155 !important;
    border-radius: 8px;
    box-shadow: 3px 3px 0px #334155;
    transition: transform 0.1s, box-shadow 0.1s;
}
body.theme-sketch .btn-action:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #334155;
}
body.theme-sketch #btn-play.state-design {
    background: var(--accent-green) !important;
    color: white !important;
}
body.theme-sketch #btn-play.state-running {
    background: var(--accent-pink) !important;
    color: white !important;
}
body.theme-sketch #btn-hint {
    background: var(--accent-amber) !important;
    color: #0f172a !important;
}
body.theme-sketch #btn-global-mute {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch .back-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    border-radius: 6px !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch .back-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #334155 !important;
}

body.theme-sketch .lvl-map-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #334155 !important;
    box-shadow: 2px 2px 0px #334155 !important;
}
body.theme-sketch .lvl-map-btn.completed {
    background: #f0fdf4 !important;
    color: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
}
body.theme-sketch .lvl-map-btn.current {
    background: #eff6ff !important;
    color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 8px rgba(29, 78, 216, 0.3) !important;
}
body.theme-sketch .lvl-map-btn.locked {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    opacity: 0.5 !important;
}

/* 2. Neon Cyberpunk Theme */
body.theme-cyberpunk {
    --bg-main: #03001e;
    --bg-panel: rgba(18, 0, 36, 0.85);
    --bg-grid: #0d001a;
    --cell-empty: rgba(0, 240, 255, 0.02);
    --text-main: #00f0ff;
    --text-muted: #ff007f;
    --accent-blue: #00f0ff;
    --accent-green: #39ff14;
    --accent-pink: #ff007f;
    --accent-amber: #ffff00;
}
body.theme-cyberpunk {
    background: 
        linear-gradient(rgba(255, 0, 127, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 127, 0.07) 1px, transparent 1px),
        radial-gradient(ellipse at top, #2d0060 0%, #0a0018 40%, #03001e 100%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    color: #00f0ff;
}
body.theme-cyberpunk .board-wrapper {
    background: #0d001a;
    border: 2px solid #ff007f;
    border-radius: 12px;
    box-shadow: inset 0 0 30px rgba(255, 0, 127, 0.3), 0 0 20px rgba(255, 0, 127, 0.2);
}
body.theme-cyberpunk .cell {
    border-right: 1px solid rgba(0, 240, 255, 0.2);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}
body.theme-cyberpunk #grid-container {
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    border-left: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}
body.theme-cyberpunk .campaign-panel, body.theme-cyberpunk .toolbar {
    border: 1px solid #ff007f !important;
    border-radius: 12px !important;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.25) !important;
    background: rgba(18, 0, 36, 0.9) !important;
}
body.theme-cyberpunk .menu-btn {
    background: #120024 !important;
    color: #ff007f !important;
    border: 1px solid #ff007f !important;
    border-radius: 4px !important;
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}
body.theme-cyberpunk .menu-btn:active {
    transform: scale(0.96) skewX(-4deg);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.6) !important;
}
body.theme-cyberpunk .menu-btn.primary {
    background: #00f0ff !important;
    color: #120024 !important;
    border: 1px solid #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5) !important;
}
body.theme-cyberpunk .btn-action {
    background: #120024;
    color: #ff007f;
    border: 1px solid #ff007f !important;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.3);
    text-shadow: 0 0 4px rgba(255, 0, 127, 0.4);
}
body.theme-cyberpunk .btn-action:active {
    box-shadow: 0 0 12px rgba(255, 0, 127, 0.6);
}
body.theme-cyberpunk #btn-play.state-design {
    background: transparent !important;
    color: #39ff14 !important;
    border-color: #39ff14 !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4) !important;
    text-shadow: 0 0 5px #39ff14;
}
body.theme-cyberpunk #btn-play.state-running {
    background: transparent !important;
    color: #ff007f !important;
    border-color: #ff007f !important;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.4) !important;
    text-shadow: 0 0 5px #ff007f;
}
body.theme-cyberpunk #btn-hint {
    background: transparent !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.4) !important;
    text-shadow: 0 0 5px #ffff00;
}
body.theme-cyberpunk #btn-global-mute {
    background: #120024 !important;
    color: #ff007f !important;
    border: 1px solid #ff007f !important;
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.3) !important;
}
body.theme-cyberpunk .back-btn {
    background: #120024 !important;
    color: #00f0ff !important;
    border: 1px solid #00f0ff !important;
    border-radius: 4px !important;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3) !important;
}
body.theme-cyberpunk .lvl-map-btn {
    background: #120024 !important;
    color: #00f0ff !important;
    border: 1px solid #00f0ff !important;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3) !important;
}
body.theme-cyberpunk .lvl-map-btn.completed {
    background: rgba(57, 255, 20, 0.1) !important;
    color: #39ff14 !important;
    border-color: #39ff14 !important;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.5) !important;
}
body.theme-cyberpunk .lvl-map-btn.current {
    background: rgba(0, 240, 255, 0.2) !important;
    color: #00f0ff !important;
    border-color: #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.8) !important;
}
body.theme-cyberpunk .lvl-map-btn.locked {
    background: rgba(18, 0, 36, 0.5) !important;
    color: #555577 !important;
    border-color: #332244 !important;
    box-shadow: none !important;
    opacity: 0.4 !important;
}
body.theme-cyberpunk h1, body.theme-cyberpunk h2, body.theme-cyberpunk h3 {
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

/* 3. Retro Amber Terminal Theme */
body.theme-retro, body.theme-retro * {
    font-family: 'Courier New', Courier, monospace !important;
}
body.theme-retro {
    --bg-main: #0c0600;
    --bg-panel: rgba(12, 6, 0, 0.95);
    --bg-grid: #050200;
    --cell-empty: rgba(255, 159, 0, 0.02);
    --text-main: #ff9f00;
    --text-muted: #b86b00;
    --accent-blue: #ffa600;
    --accent-green: #ffb732;
    --accent-pink: #ff5500;
    --accent-amber: #ff8c00;
}
body.theme-retro {
    background: #0c0600;
    background-image: 
        linear-gradient(rgba(255, 159, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 0, 0.03) 1px, transparent 1px);
    background-size: 25px 25px;
    color: #ff9f00;
}
body.theme-retro .board-wrapper {
    background: #050200;
    border: 3px double #ff9f00;
    border-radius: 0px;
    box-shadow: inset 0 0 20px rgba(255, 159, 0, 0.1), 0 5px 15px rgba(0,0,0,0.9);
}
body.theme-retro .cell {
    border-right: 1px dashed rgba(255, 159, 0, 0.25);
    border-bottom: 1px dashed rgba(255, 159, 0, 0.25);
}
body.theme-retro #grid-container {
    border-top: 1px dashed rgba(255, 159, 0, 0.25);
    border-left: 1px dashed rgba(255, 159, 0, 0.25);
    box-shadow: none;
}
body.theme-retro .campaign-panel, body.theme-retro .toolbar {
    border: 3px double #ff9f00 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
    background: #0c0600 !important;
}
body.theme-retro .menu-btn {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border: 2px solid #ff9f00 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
    text-transform: uppercase;
}
body.theme-retro .menu-btn:active {
    background: #ff9f00 !important;
    color: #0c0600 !important;
    transform: none;
}
body.theme-retro .menu-btn.primary {
    background: #ff9f00 !important;
    color: #0c0600 !important;
    border: 2px solid #ff9f00 !important;
}
body.theme-retro .btn-action {
    background: #0c0600;
    color: #ff9f00;
    border: 2px solid #ff9f00 !important;
    border-radius: 0px;
    box-shadow: none;
    text-transform: uppercase;
}
body.theme-retro .btn-action:active {
    background: #ff9f00 !important;
    color: #0c0600 !important;
    transform: none;
}
body.theme-retro #btn-play.state-design {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border-color: #ff9f00 !important;
}
body.theme-retro #btn-play.state-running {
    background: #ff5500 !important;
    color: #0c0600 !important;
    border-color: #ff5500 !important;
}
body.theme-retro #btn-hint {
    background: #ff9f00 !important;
    color: #0c0600 !important;
}
body.theme-retro #btn-global-mute {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border: 2px solid #ff9f00 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
}
body.theme-retro .back-btn {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border: 2px solid #ff9f00 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
}
body.theme-retro .back-btn:active {
    background: #ff9f00 !important;
    color: #0c0600 !important;
    transform: none;
}
body.theme-retro .lvl-map-btn {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border: 1px solid #ff9f00 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}
body.theme-retro .lvl-map-btn.completed {
    background: #ff9f00 !important;
    color: #0c0600 !important;
    border-color: #ff9f00 !important;
}
body.theme-retro .lvl-map-btn.current {
    background: #0c0600 !important;
    color: #ff9f00 !important;
    border: 2px solid #ff9f00 !important;
    outline: 1px solid #ff9f00 !important;
    box-shadow: 0 0 5px rgba(255, 159, 0, 0.5) !important;
}
body.theme-retro .lvl-map-btn.locked {
    background: #0c0600 !important;
    color: #442700 !important;
    border-color: #442700 !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

/* 4. Whimsical Candy Theme */
body.theme-whimsical {
    --bg-main: #fff1f2;
    --bg-panel: #ffffff;
    --bg-grid: #ffffff;
    --cell-empty: rgba(244, 114, 182, 0.03);
    --text-main: #be185d;
    --text-muted: #db2777;
    --accent-blue: #06b6d4;
    --accent-green: #10b981;
    --accent-pink: #ec4899;
    --accent-amber: #fbbf24;
}
body.theme-whimsical {
    background: linear-gradient(135deg, #fff1f2, #fdf2f8, #f5f3ff);
    color: #be185d;
}
body.theme-whimsical .board-wrapper {
    background: #ffffff;
    border: 3px solid #db2777;
    border-radius: 12px;
    box-shadow: 4px 4px 15px rgba(219, 39, 119, 0.15);
}
/* Emitter = warm pink, Receiver = cool teal — clearly different */
body.theme-whimsical .cell.emitter {
    background: rgba(251, 207, 232, 0.5) !important;
}
body.theme-whimsical .cell.receiver {
    background: rgba(167, 243, 208, 0.45) !important;
}
body.theme-whimsical .cell {
    border-right: 1px dotted rgba(219, 39, 119, 0.15);
    border-bottom: 1px dotted rgba(219, 39, 119, 0.15);
}
body.theme-whimsical #grid-container {
    border-top: 1px dotted rgba(219, 39, 119, 0.15);
    border-left: 1px dotted rgba(219, 39, 119, 0.15);
    box-shadow: none;
}
body.theme-whimsical .campaign-panel, body.theme-whimsical .toolbar {
    border: 3px solid #db2777 !important;
    border-radius: 12px !important;
    box-shadow: 4px 4px 15px rgba(219, 39, 119, 0.1) !important;
    background: #ffffff !important;
}
body.theme-whimsical .menu-btn {
    background: #ffffff !important;
    color: #be185d !important;
    border: 2px solid #db2777 !important;
    box-shadow: 2px 2px 0px #db2777 !important;
}
body.theme-whimsical .menu-btn.primary {
    background: var(--accent-pink) !important;
    color: white !important;
}
/* Toolbar tool buttons */
body.theme-whimsical .tool-btn {
    background: #fff0f5 !important;
    color: #be185d !important;
    border: 1.5px solid #f9a8d4 !important;
    border-radius: 10px !important;
}
body.theme-whimsical .tool-btn.active {
    background: #fce7f3 !important;
    border-color: #db2777 !important;
    color: #9d174d !important;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.3) !important;
}
body.theme-whimsical .tool-btn.locked {
    background: #fdf2f8 !important;
    opacity: 0.4 !important;
}
/* Undo / Clear / Speed buttons */
body.theme-whimsical #btn-undo {
    background: #fdf2f8 !important;
    color: #be185d !important;
    border: 2px solid #f9a8d4 !important;
    box-shadow: 2px 2px 0px #f9a8d4 !important;
}
body.theme-whimsical #btn-clear {
    background: #fff1f2 !important;
    color: #be123c !important;
    border: 2px solid #fda4af !important;
    box-shadow: 2px 2px 0px #fda4af !important;
}
body.theme-whimsical #btn-speed {
    background: #fdf2f8 !important;
    color: #be185d !important;
    border: 2px solid #f9a8d4 !important;
    box-shadow: 2px 2px 0px #f9a8d4 !important;
}
body.theme-whimsical .btn-action {
    background: #ffffff;
    color: #be185d;
    border: 2px solid #db2777 !important;
    border-radius: 10px;
    box-shadow: 3px 3px 0px #db2777;
    transition: transform 0.1s, box-shadow 0.1s;
}
body.theme-whimsical .btn-action:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #db2777;
}
body.theme-whimsical #btn-play.state-design {
    background: var(--accent-pink) !important;
    color: white !important;
}
body.theme-whimsical #btn-play.state-running {
    background: var(--accent-blue) !important;
    color: white !important;
}
body.theme-whimsical #btn-hint {
    background: var(--accent-amber) !important;
    color: #78350f !important;
}
body.theme-whimsical #btn-global-mute {
    background: #ffffff !important;
    color: #be185d !important;
    border: 2px solid #db2777 !important;
    box-shadow: 2px 2px 0px #db2777 !important;
}
body.theme-whimsical .back-btn {
    background: #ffffff !important;
    color: #be185d !important;
    border: 2px solid #db2777 !important;
    border-radius: 8px !important;
    box-shadow: 2px 2px 0px #db2777 !important;
}
body.theme-whimsical .back-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #db2777 !important;
}
body.theme-whimsical .lvl-map-btn {
    background: #ffffff !important;
    color: #be185d !important;
    border: 2px solid #db2777 !important;
    box-shadow: 2px 2px 0px #db2777 !important;
}
body.theme-whimsical .lvl-map-btn.completed {
    background: #fff1f2 !important;
    color: var(--accent-pink) !important;
    border-color: var(--accent-pink) !important;
}
body.theme-whimsical .lvl-map-btn.current {
    background: #ecfeff !important;
    color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3) !important;
}
body.theme-whimsical .lvl-map-btn.locked {
    background: #f1f5f9 !important;
    color: #cbd5e1 !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    opacity: 0.5 !important;
}

/* ═══════════════════════════════════════════
   DAILY CHALLENGE SCREEN
═══════════════════════════════════════════ */

.daily-screen-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* Streak Card */
.daily-streak-card {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(245,158,11,0.2) 0%, rgba(251,191,36,0.08) 100%);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 20px;
    padding: 22px 20px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(245,158,11,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: fade-in 0.4s ease-out;
}
.daily-streak-num {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--accent-amber);
    line-height: 1;
    text-shadow: 0 0 20px rgba(245,158,11,0.4);
}
.daily-streak-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(245,158,11,0.7);
    margin-top: 6px;
}
.daily-streak-total {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Play Zone */
.daily-play-zone {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px 16px;
}
.daily-date-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}
.daily-play-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #000;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245,158,11,0.5), 0 1px 0 rgba(255,255,255,0.2) inset;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s;
    animation: pulse-amber 2.5s ease-in-out infinite;
}
.daily-play-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}
.daily-play-btn--replay {
    background: var(--bg-panel);
    color: var(--accent-amber);
    border: 1px solid rgba(245,158,11,0.3);
    box-shadow: none;
    animation: none;
    font-size: 15px;
    padding: 12px;
}
.daily-completed-badge {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-green);
    text-shadow: 0 0 12px rgba(16,185,129,0.4);
}
.daily-no-level {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    padding: 10px 0;
}

@keyframes pulse-amber {
    0%, 100% { box-shadow: 0 4px 20px rgba(245,158,11,0.5); }
    50% { box-shadow: 0 4px 30px rgba(245,158,11,0.75), 0 0 40px rgba(245,158,11,0.2); }
}

/* Section label */
.daily-section-label {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-left: 4px;
}

/* 14-day Calendar */
.daily-calendar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.daily-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 11px;
}
.daily-cal-day .cal-icon { font-size: 16px; }
.daily-cal-day .cal-num  { font-size: 10px; color: var(--text-muted); font-weight: 700; }
.daily-cal-done  { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); }
.daily-cal-missed { background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.15); }
.daily-cal-today { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.4); box-shadow: 0 0 10px rgba(245,158,11,0.2); }
.daily-cal-empty { opacity: 0.35; }

/* Hint-free notice */
.daily-hint-notice {
    width: 100%;
    box-sizing: border-box;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.18);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}
.daily-hint-notice strong { color: var(--accent-amber); }

/* Featured Daily Card on Main Menu */
#daily-menu-card {
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, border-color 0.2s;
}
#daily-menu-card:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.18);
}
#daily-menu-card:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

/* INTERACTIVE TUTORIAL / WALKTHROUGH */
.tutorial-cell-highlight {
    position: relative;
    z-index: 1001 !important;
    box-shadow: 0 0 16px 4px var(--accent-amber) !important;
    animation: tutorialPulse 1.2s infinite ease-in-out;
}
@keyframes tutorialPulse {
    0% { box-shadow: 0 0 4px 1px var(--accent-amber); }
    50% { box-shadow: 0 0 20px 6px var(--accent-amber); }
    100% { box-shadow: 0 0 4px 1px var(--accent-amber); }
}

.tutorial-emitter-highlight {
    position: relative;
    z-index: 1001 !important;
    box-shadow: 0 0 18px 5px var(--accent-amber) !important;
    animation: emitterPulse 1.2s infinite ease-in-out;
    border-radius: 50%;
}
@keyframes emitterPulse {
    0% { box-shadow: 0 0 6px 1px var(--accent-amber); }
    50% { box-shadow: 0 0 22px 7px var(--accent-amber); }
    100% { box-shadow: 0 0 6px 1px var(--accent-amber); }
}

.tutorial-receiver-highlight {
    position: relative;
    z-index: 1001 !important;
    box-shadow: 0 0 18px 5px var(--accent-blue) !important;
    animation: receiverPulse 1.2s infinite ease-in-out;
    border-radius: 8px;
}
@keyframes receiverPulse {
    0% { box-shadow: 0 0 6px 1px var(--accent-blue); }
    50% { box-shadow: 0 0 22px 7px var(--accent-blue); }
    100% { box-shadow: 0 0 6px 1px var(--accent-blue); }
}

.tutorial-path-guide {
    position: relative;
}
.tutorial-path-guide::after {
    content: "➔";
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-amber);
    font-size: 28px;
    font-weight: bold;
    pointer-events: none;
    animation: guideArrowPulse 1.2s infinite ease-in-out;
    z-index: 5;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}
.tutorial-arrow-right::after { transform: rotate(0deg); }
.tutorial-arrow-down-right::after { transform: rotate(45deg); }
.tutorial-arrow-down::after { transform: rotate(90deg); }
.tutorial-arrow-down-left::after { transform: rotate(135deg); }
.tutorial-arrow-left::after { transform: rotate(180deg); }
.tutorial-arrow-up-left::after { transform: rotate(225deg); }
.tutorial-arrow-up::after { transform: rotate(270deg); }
.tutorial-arrow-up-right::after { transform: rotate(315deg); }

@keyframes guideArrowPulse {
    0% { opacity: 0.35; }
    50% { opacity: 1; }
    100% { opacity: 0.35; }
}

.tutorial-tooltip-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 1010;
}
.tutorial-tooltip-container {
    background: var(--bg-panel); border: 2px solid var(--accent-amber); border-radius: 16px;
    padding: 24px; max-width: 90%; width: 400px; box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    text-align: center; animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
}
.tutorial-tooltip-text {
    font-size: 14px;
    line-height: 1.5;
    color: #f8fafc;
    margin-bottom: 14px;
    font-weight: 500;
}
.tutorial-tooltip-text b {
    color: var(--accent-amber);
}
.tutorial-tooltip-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.tutorial-btn {
    flex: 1;
    max-width: 180px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, opacity 0.15s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.tutorial-btn:active {
    transform: scale(0.96);
}
.tutorial-btn.primary {
    background: var(--accent-amber);
    color: #000;
}
.tutorial-btn.secondary {
    background: #334155;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
}

