body{margin:0}:root{--bg:#0f172a;--surface:#1e293b;--surface-light:#334155;--text:#f8fafc;--text-muted:#94a3b8;--wall:#1a1a2e;--path:#f1f5f9;--start:#bbf7d0;--exit:#fde68a;--player:#06b6d4;--accent:#6366f1}*{box-sizing:border-box}body{background:radial-gradient(circle at top, #1e293b 0%, var(--bg) 55%);min-height:100vh;color:var(--text);margin:0;font-family:Segoe UI,system-ui,-apple-system,sans-serif}#root{min-height:100vh}.app{min-height:100vh;padding:1rem}.app--playing{flex-direction:column;gap:1rem;max-width:960px;margin:0 auto;display:flex}.home-screen{text-align:center;max-width:720px;margin:0 auto;padding:2rem 1rem}.home-screen__header h1{letter-spacing:.04em;margin:0 0 .5rem;font-size:clamp(2rem,5vw,3rem)}.home-screen__header p{color:var(--text-muted);margin:0 0 1.5rem}.maze-type-tabs{gap:.75rem;margin-bottom:1.5rem;display:grid}.maze-type-tab{border:2px solid var(--surface-light);background:var(--surface);color:var(--text);cursor:pointer;text-align:left;border-radius:.85rem;flex-direction:column;gap:.25rem;padding:1rem 1.25rem;transition:border-color .15s,box-shadow .15s;display:flex}.maze-type-tab--active{border-color:var(--accent);box-shadow:0 0 0 1px #6366f159}.maze-type-tab__label{font-size:1.1rem;font-weight:700}.maze-type-tab__desc{color:var(--text-muted);font-size:.9rem}.difficulty-grid{gap:1rem;display:grid}.difficulty-card{border:2px solid var(--surface-light);background:var(--surface);color:var(--text);cursor:pointer;text-align:left;border-radius:1rem;flex-direction:column;gap:.35rem;padding:1.25rem 1.5rem;transition:transform .15s,border-color .15s,box-shadow .15s;display:flex}.difficulty-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 8px 24px #6366f140}.difficulty-card__label{color:var(--accent);font-size:1.5rem;font-weight:700}.difficulty-card--easy .difficulty-card__label{color:#22c55e}.difficulty-card--medium .difficulty-card__label{color:#f59e0b}.difficulty-card--hard .difficulty-card__label{color:#ef4444}.difficulty-card__meta{color:var(--text-muted);font-size:.95rem}.difficulty-card__time{color:#c7d2fe;font-weight:600}.game-header{background:var(--surface);border-radius:.75rem;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.75rem;padding:.75rem 1rem;display:flex}.game-header__info,.game-header__stats{flex-wrap:wrap;align-items:center;gap:.75rem;display:flex}.game-header__type{color:#c7d2fe;background:#6366f133;border-radius:999px;padding:.25rem .6rem;font-size:.8rem;font-weight:600}.game-header__badge{color:#0f172a;border-radius:999px;padding:.25rem .6rem;font-size:.8rem;font-weight:700}.game-header__name{color:var(--text-muted);font-size:.9rem}.game-header__quit{border:1px solid var(--surface-light);color:var(--text);cursor:pointer;background:0 0;border-radius:.5rem;padding:.4rem .85rem}.game-header__quit:hover{background:var(--surface-light)}.game-header__timer--urgent{color:#fca5a5;font-weight:700;animation:.8s ease-in-out infinite timerPulse}.game-header__elapsed{color:var(--text-muted);font-size:.85rem}@keyframes timerPulse{0%,to{opacity:1}50%{opacity:.65}}.game-over-card h2{color:#fca5a5}.game-layout{flex-direction:column;flex:1;align-items:center;gap:1.25rem;display:flex}.maze-board,.classic-maze-board{aspect-ratio:1;border-radius:.5rem;width:min(80vw,80vh,560px);display:grid;overflow:hidden;box-shadow:0 12px 40px #00000059}.maze-board{border:3px solid var(--surface-light)}.classic-maze-wrapper{width:min(80vw,80vh,560px);position:relative}.classic-maze-board{background:#fff;border:3px solid #111827;padding:.35rem}.classic-cell{background:#fff;border-style:solid;border-color:#111827;min-width:0;min-height:0;position:relative}.classic-cell--start{background:#ecfdf5}.classic-cell--exit{background:#fef9c3;animation:1.4s ease-in-out infinite classicExitPulse}.classic-cell--player .player-dot{background:var(--player);z-index:2;border-radius:50%;position:absolute;inset:22%;box-shadow:0 0 8px #06b6d4d9}.classic-cell__arrow{color:#111827;z-index:1;font-size:.75rem;font-weight:700;line-height:1;position:absolute;left:50%;transform:translate(-50%)}.classic-cell__arrow--in{top:-.85rem}.classic-cell__arrow--out{bottom:-.85rem}@keyframes classicExitPulse{0%,to{background:#fef9c3}50%{background:#fde047}}.maze-cell{min-width:0;min-height:0;position:relative}.maze-cell--wall{background:var(--wall)}.maze-cell--path{background:var(--path)}.maze-cell--start{background:var(--start)}.maze-cell--exit{background:var(--exit);animation:1.4s ease-in-out infinite exitPulse}.maze-cell--player .player-dot{background:var(--player);border-radius:50%;position:absolute;inset:18%;box-shadow:0 0 10px #06b6d4cc}@keyframes exitPulse{0%,to{background:#fde68a}50%{background:#fbbf24}}.controls{flex-direction:column;align-items:center;gap:.35rem;display:flex}.controls__row{gap:.35rem;display:flex}.controls__btn{background:var(--surface);width:3.25rem;height:3.25rem;color:var(--text);cursor:pointer;border:none;border-radius:.75rem;font-size:1.35rem;transition:transform .1s,background .1s;box-shadow:0 4px 12px #00000040}.controls__btn:hover{background:var(--surface-light)}.controls__btn:active{transform:scale(.95)}.controls__hint{color:var(--text-muted);text-align:center;margin:.5rem 0 0;font-size:.85rem}.level-complete-overlay{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0f172abf;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.level-complete-card{background:var(--surface);text-align:center;border-radius:1rem;width:min(100%,420px);padding:1.5rem;box-shadow:0 16px 48px #0006}.level-complete-card h2{margin:0 0 .5rem}.level-complete-card p{color:var(--text-muted);margin:0 0 1.25rem}.level-complete-stats{grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1.25rem;display:grid}@media (width<=480px){.level-complete-stats{grid-template-columns:1fr}}.stat-label{color:var(--text-muted);font-size:.85rem;display:block}.stat-value{font-size:1.5rem;font-weight:700;display:block}.level-complete-actions{flex-direction:column;gap:.75rem;display:flex}.btn{cursor:pointer;border:none;border-radius:.6rem;padding:.75rem 1rem;font-size:1rem}.btn--primary{background:var(--accent);color:#fff}.btn--primary:hover{filter:brightness(1.08)}.btn--secondary{border:1px solid var(--surface-light);color:var(--text);background:0 0}.btn--secondary:hover{background:var(--surface-light)}@media (width>=640px){.maze-type-tabs{grid-template-columns:repeat(2,1fr)}.difficulty-grid{grid-template-columns:repeat(3,1fr)}.controls__btn{width:3.75rem;height:3.75rem}}@media (width>=768px){.game-layout{flex-direction:row;justify-content:center;align-items:flex-start}.controls{margin-top:1rem}}
