@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
    background: #06060f;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    display: flex; justify-content: center; align-items: center;
    height: 100%; height: 100dvh; overflow: hidden;
    touch-action: pan-y; user-select: none;
    -webkit-user-select: none; -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#app {
    width: 100%; max-width: 440px; height: 100%;
    display: flex; flex-direction: column;
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    overflow: hidden; position: relative; z-index: 1;
    background: linear-gradient(180deg, #0a0a1a 0%, #080816 100%);
}

@media (min-width: 500px) {
    #app {
        border-radius: 28px;
        border: 1px solid rgba(255,255,255,0.04);
        height: min(844px, 95vh);
        box-shadow: 0 0 80px rgba(0,0,0,0.6);
    }
}

/* ---- Animations ---- */
@keyframes pulse-glow {
    0%,100% { box-shadow: 0 0 20px rgba(110,142,251,0.2), 0 4px 20px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 30px rgba(110,142,251,0.35), 0 4px 20px rgba(0,0,0,0.3); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
@keyframes star-pop {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    60% { transform: scale(1.4) rotate(5deg); opacity: 1; }
    80% { transform: scale(0.9); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes coin-fly {
    0% { transform: scale(0.5) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes subtlePulse {
    0%,100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ---- Main Menu ---- */
.main-menu {
    text-align: center; flex: 1; display: flex;
    flex-direction: column; justify-content: center;
    padding: 0; overflow: hidden; gap: 0;
}

.logo-wrap { margin-bottom: 2px; }
.logo {
    font-size: clamp(56px, 16vw, 76px);
    font-weight: 900; letter-spacing: 6px;
    background: linear-gradient(135deg, #ff5555 0%, #ff9944 20%, #ffcc33 40%, #44ee66 60%, #5599ff 80%, #bb66ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: gradient-shift 8s ease infinite;
    line-height: 1.1;
}
.logo-sub {
    color: rgba(255,255,255,0.2); font-size: 11px; font-weight: 600;
    letter-spacing: 4px; text-transform: uppercase;
    margin-bottom: 20px;
}

.streak-banner {
    color: #ffaa00; font-size: 13px; font-weight: 700;
    margin-bottom: 12px; letter-spacing: 0.5px;
}

.coin-display {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(255,170,0,0.03));
    border: 1px solid rgba(255,215,0,0.1);
    border-radius: 100px;
    padding: 8px 22px; margin: 0 auto 20px;
}
.coin-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #000; font-weight: 800;
    box-shadow: 0 1px 4px rgba(255,215,0,0.3);
    animation: float 3s ease-in-out infinite;
    line-height: 1;
}
.coin-amount { color: #FFD700; font-size: 15px; font-weight: 700; letter-spacing: 0.5px; }

/* Progress bar */
.progress-bar-wrap {
    background: rgba(255,255,255,0.03);
    border-radius: 10px; height: 28px;
    position: relative; overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.04);
}
.progress-bar-wrap.big { height: 36px; margin-top: 8px; }
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6e8efb, #a78bfa, #44ddaa);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 2px;
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: 10px;
}
.progress-text {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: rgba(255,255,255,0.35);
    font-weight: 600; letter-spacing: 0.5px;
}

/* ---- Buttons ---- */
.menu-big-btn {
    display: flex; align-items: center; width: 100%;
    padding: 0 24px; border-radius: 16px; border: none;
    margin-bottom: 10px; cursor: pointer;
    -webkit-tap-highlight-color: transparent; text-align: left;
    height: 64px; transition: transform 0.15s ease, opacity 0.15s;
    position: relative; overflow: hidden;
}
.menu-big-btn:active { transform: scale(0.97); opacity: 0.9; }

.play-btn {
    background: linear-gradient(135deg, #6e8efb 0%, #44ddaa 100%);
    animation: pulse-glow 3s ease-in-out infinite;
    height: 68px; border-radius: 18px; margin-bottom: 12px;
}
.play-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    border-radius: 18px; pointer-events: none;
}
.play-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
    background-size: 200% 100%; animation: shimmer 3s ease-in-out infinite;
}

.levels-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.btn-icon {
    font-size: 22px; margin-right: 16px; color: #fff;
    position: relative; z-index: 1;
    width: 38px; height: 38px; display: flex;
    align-items: center; justify-content: center;
    border-radius: 10px; flex-shrink: 0;
}
.play-btn .btn-icon {
    background: rgba(255,255,255,0.15);
}
.levels-btn .btn-icon {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.4);
}
.btn-label {
    font-size: 17px; font-weight: 700; color: #fff;
    flex: 1; position: relative; z-index: 1; letter-spacing: 0.3px;
}
.levels-btn .btn-label { color: rgba(255,255,255,0.6); }
.btn-hint {
    font-size: 12px; color: rgba(255,255,255,0.35);
    position: relative; z-index: 1; font-weight: 500;
}
.levels-btn .btn-hint { color: rgba(255,255,255,0.2); }

/* Square buttons row */
.menu-row { display: flex; gap: 10px; margin-bottom: 10px; }

.menu-sq-btn {
    flex: 1;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px; padding: 16px 8px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative; -webkit-tap-highlight-color: transparent;
    min-height: 72px; transition: transform 0.15s, background 0.15s;
}
.menu-sq-btn:active { background: rgba(255,255,255,0.05); transform: scale(0.95); }
.sq-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    background: rgba(255,255,255,0.04);
}
.sq-label { font-size: 11px; color: rgba(255,255,255,0.3); font-weight: 600; letter-spacing: 0.3px; }
.sq-badge {
    position: absolute; top: 8px; right: 10px;
    background: linear-gradient(135deg, #ff5555, #ff3333);
    color: #fff; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 8px;
    box-shadow: 0 2px 6px rgba(255,50,50,0.3);
}

/* Small buttons row */
.menu-sm-btn {
    flex: 1; background: none;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px; color: rgba(255,255,255,0.2);
    padding: 12px 4px; font-size: 12px; font-weight: 600;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    min-height: 42px; transition: transform 0.15s;
    letter-spacing: 0.3px;
}
.menu-sm-btn:active { background: rgba(255,255,255,0.03); transform: scale(0.95); }

/* ---- Screen ---- */
.screen {
    padding: 0; flex: 1; display: flex;
    flex-direction: column; overflow: hidden;
}
.screen-scroll {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}
.screen-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0 20px; min-height: 48px;
}
.screen-title {
    color: rgba(255,255,255,0.85); font-size: 18px;
    font-weight: 700; letter-spacing: 0.3px;
}
.screen-right { width: 48px; }

/* ---- Back Button (universal) ---- */
.back-btn {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5); border-radius: 12px;
    font-size: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s, background 0.15s;
    padding: 0;
}
.back-btn:active { transform: scale(0.88); background: rgba(255,255,255,0.06); }

/* ---- Level Select ---- */
.pack-title {
    color: rgba(255,255,255,0.25); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    margin: 12px 0 10px; display: flex;
    justify-content: space-between; align-items: center;
}
.pack-title:first-child { margin-top: 0; }
.pack-progress { color: rgba(255,255,255,0.15); font-size: 11px; letter-spacing: 0; font-weight: 600; }
.level-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 16px; }

.lvl-btn {
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.15);
    font-size: clamp(14px, 4vw, 17px); font-weight: 700;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent; min-height: 48px;
    transition: transform 0.15s, background 0.2s, border-color 0.2s;
    gap: 2px; position: relative;
}
.lvl-num { display: block; line-height: 1; }
.lvl-stars {
    font-size: clamp(6px, 1.8vw, 8px); line-height: 1;
    letter-spacing: -0.5px;
}
.lvl-stars .star-on { color: #FFD700; }
.lvl-stars .star-off { color: rgba(255,255,255,0.08); }

.lvl-btn.open {
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.03);
}
.lvl-btn.open:active { transform: scale(0.9); background: rgba(255,255,255,0.06); }
.lvl-btn.done {
    border-color: rgba(42,170,102,0.2);
    color: rgba(42,170,102,0.8);
    background: rgba(42,170,102,0.05);
}
.lvl-btn.perfect {
    border-color: rgba(255,215,0,0.2);
    color: rgba(255,215,0,0.9);
    background: rgba(255,215,0,0.04);
}
.lvl-btn.perfect::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,215,0,0.08), transparent 60%);
    pointer-events: none;
}
.lvl-btn.locked { cursor: default; opacity: 0.3; }

.pack-title.hardcore {
    color: rgba(255,68,68,0.7); letter-spacing: 5px;
    font-weight: 800; font-size: 12px;
}
.pack-title.shapes {
    color: rgba(68,221,170,0.6); letter-spacing: 4px;
    font-weight: 800; font-size: 12px;
}
.pack-title.walls {
    color: rgba(255,120,80,0.7); letter-spacing: 4px;
    font-weight: 800; font-size: 12px;
}
.pack-title.bridges {
    color: rgba(255,255,100,0.7); letter-spacing: 4px;
    font-weight: 800; font-size: 12px;
}

/* ---- Settings ---- */
.settings-list { padding: 0; }
.setting-item {
    display: flex; justify-content: space-between;
    align-items: center; padding: 16px 2px;
    color: rgba(255,255,255,0.6); font-size: 14px;
    font-weight: 500; min-height: 52px;
}
.setting-divider {
    height: 1px;
    background: rgba(255,255,255,0.03);
    margin: 2px 0;
}
.toggle-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3); font-weight: 600;
    padding: 10px 18px; border-radius: 10px; font-size: 13px;
    cursor: pointer; min-width: 68px; min-height: 42px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s; letter-spacing: 0.3px;
    font-family: inherit;
}
.toggle-btn.on {
    background: rgba(42,170,102,0.1);
    border-color: rgba(42,170,102,0.25);
    color: rgba(42,170,102,0.9);
}
.toggle-btn.danger {
    color: rgba(255,68,68,0.7);
    border-color: rgba(255,68,68,0.15);
}
.toggle-btn.link-btn {
    color: rgba(110,142,251,0.7);
    border-color: rgba(110,142,251,0.15);
}
.setting-val {
    color: rgba(255,255,255,0.15); font-size: 13px;
    font-weight: 600;
}

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.stat-card {
    background: rgba(255,255,255,0.025);
    border-radius: 16px; padding: 24px 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.04);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.streak-card { background: rgba(255,170,0,0.03); border-color: rgba(255,170,0,0.08); }
.streak-card::before { background: linear-gradient(90deg, transparent, rgba(255,170,0,0.1), transparent); }
.stat-num {
    font-size: 32px; font-weight: 800;
    color: rgba(255,255,255,0.9);
    margin-bottom: 6px; letter-spacing: -0.5px;
}
.stat-label {
    font-size: 10px; color: rgba(255,255,255,0.25);
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}
.stats-bar-section { padding: 10px 0; }
.stats-bar-label {
    color: rgba(255,255,255,0.4); font-size: 13px;
    margin-bottom: 8px; font-weight: 600;
}

/* ---- Hint Shop ---- */
.hint-balance {
    text-align: center; padding: 32px 0;
    background: linear-gradient(135deg, rgba(255,215,0,0.03), rgba(255,170,0,0.015));
    border-radius: 20px; margin-bottom: 24px;
    border: 1px solid rgba(255,215,0,0.06);
    position: relative; overflow: hidden;
}
.hint-balance::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.12), transparent);
}
.hint-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.hint-count {
    font-size: 44px; font-weight: 800;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    letter-spacing: -1px;
}
.hint-label { display: block; color: rgba(255,255,255,0.25); font-size: 12px; margin-top: 6px; font-weight: 600; letter-spacing: 0.5px; }
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-item {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px; padding: 14px 16px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    text-align: left; min-height: 64px;
    transition: transform 0.15s, background 0.15s;
}
.shop-item:active { transform: scale(0.98); background: rgba(255,255,255,0.04); }
.shop-icon { font-size: 24px; margin-right: 14px; }
.shop-info { flex: 1; }
.shop-title { display: block; color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 700; letter-spacing: 0.2px; }
.shop-desc { display: block; color: rgba(255,255,255,0.2); font-size: 11px; font-weight: 500; margin-top: 2px; }
.shop-price {
    color: rgba(110,142,251,0.8); font-size: 14px; font-weight: 700;
    padding: 8px 14px; background: rgba(110,142,251,0.06);
    border-radius: 10px; border: 1px solid rgba(110,142,251,0.1);
    letter-spacing: 0.3px;
}
.shop-price.free { color: rgba(42,204,113,0.9); background: rgba(42,204,113,0.06); border-color: rgba(42,204,113,0.1); }
.shop-price.can-buy { color: rgba(255,215,0,0.9); background: rgba(255,215,0,0.06); border-color: rgba(255,215,0,0.1); }

/* ---- Game Screen ---- */
.game-screen { padding: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.game-screen-compact { padding: 0 !important; }
.game-header {
    display: flex; justify-content: space-between;
    align-items: center; padding: 4px 0 8px;
}
.level-info {
    color: rgba(255,255,255,0.5); font-size: 15px;
    font-weight: 700; letter-spacing: 0.5px;
}
.flow-count {
    color: rgba(255,255,255,0.5); font-size: 15px;
    font-weight: 700; letter-spacing: 0.3px;
    min-width: 42px; text-align: right;
}

.board-area {
    flex: 1; display: flex; align-items: center;
    justify-content: center; overflow: hidden; min-height: 0;
}

.board-wrap {
    position: relative; border-radius: 12px; overflow: hidden; touch-action: none;
    box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.board-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; }

.game-footer {
    display: flex; justify-content: space-between;
    align-items: center; padding: 8px 0 2px; gap: 10px;
}
.game-action-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4); font-weight: 600;
    padding: 12px 18px; border-radius: 12px;
    font-size: 13px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 46px; white-space: nowrap;
    transition: transform 0.15s, background 0.15s;
    font-family: inherit; letter-spacing: 0.3px;
}
.game-action-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.05); }
.hint-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000; font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 6px; margin-left: 6px;
    letter-spacing: 0;
}
.pipe-info {
    color: rgba(255,255,255,0.2); font-size: 15px;
    font-weight: 700; flex: 1; text-align: center;
    letter-spacing: 0.5px;
}

/* ---- Win Overlay ---- */
.win-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; transition: background 0.5s ease; padding: 24px;
}
.win-overlay.show {
    background: rgba(4,4,12,0.92);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.win-box {
    text-align: center;
    transform: scale(0.6) translateY(30px); opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%; max-width: 340px;
}
.win-overlay.show .win-box { transform: scale(1) translateY(0); opacity: 1; }

.win-title {
    font-size: clamp(32px, 9vw, 48px); font-weight: 900;
    margin-bottom: 16px; animation: bounce-in 0.7s ease-out;
    letter-spacing: -0.5px;
}
.win-title.perfect { color: #FFD700; text-shadow: 0 0 30px rgba(255,215,0,0.25); }
.win-title.great { color: #44ddaa; text-shadow: 0 0 20px rgba(68,221,170,0.15); }
.win-title.good { color: #6e8efb; }

.win-stars-wrap { display: flex; justify-content: center; gap: 6px; margin-bottom: 24px; }
.win-star {
    font-size: clamp(32px, 9vw, 44px);
    color: rgba(255,255,255,0.06);
    display: inline-block; opacity: 0; transform: scale(0);
    animation: star-pop 0.5s ease-out forwards;
}
.win-star.big { font-size: clamp(40px, 11vw, 56px); margin-top: -6px; }
.win-star.active { color: #FFD700; text-shadow: 0 0 16px rgba(255,215,0,0.35); }

.win-stats {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px; padding: 16px 20px; margin-bottom: 24px;
}
.win-stat-row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.win-stat-row:last-child { border-bottom: none; }
.win-stat-label { color: rgba(255,255,255,0.3); font-size: 13px; font-weight: 500; }
.win-stat-val { color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 700; }
.coins-row .win-stat-val { color: #FFD700; animation: coin-fly 0.5s ease-out 0.6s both; }

.win-bonus {
    text-align: center; color: #44ddaa; font-size: 12px;
    font-weight: 700; padding: 5px 0 0;
    animation: fadeInUp 0.4s ease-out 0.5s both;
    letter-spacing: 0.3px;
}
.win-bonus.streak { color: #ffaa00; animation-delay: 0.7s; }

.win-btns { display: flex; gap: 12px; justify-content: center; }
.win-btn {
    padding: 16px 32px; border: none; border-radius: 14px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    color: #fff; -webkit-tap-highlight-color: transparent;
    min-height: 54px; transition: transform 0.15s;
    position: relative; overflow: hidden; font-family: inherit;
    letter-spacing: 0.3px;
}
.win-btn:active { transform: scale(0.93); }
.win-btn.next-btn {
    background: linear-gradient(135deg, #6e8efb, #44ddaa);
    animation: pulse-glow 3s ease-in-out infinite;
}
.win-btn.next-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    border-radius: 14px; pointer-events: none;
}
.win-btn.next-btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
    background-size: 200% 100%; animation: shimmer 3s ease-in-out infinite;
}
.win-btn.menu-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

/* ---- Sprint Mode ---- */
.sprint-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7c948 100%);
    border: none;
}
.sprint-btn .btn-icon {
    background: rgba(255,255,255,0.15);
}

.sprint-timer-wrap {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px; overflow: hidden;
    margin-bottom: 4px;
}
.sprint-timer-bar {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #44ddaa, #6e8efb);
    border-radius: 3px;
    transition: width 0.05s linear;
}
.sprint-timer-bar.danger {
    background: linear-gradient(90deg, #ff3333, #ff6b35);
}

.sprint-info {
    color: #f7c948 !important;
    font-size: 16px !important;
}

.sprint-streak-display {
    color: #f7c948; font-size: 15px; font-weight: 800;
    letter-spacing: 0.3px;
}
.sprint-size-display {
    color: rgba(255,255,255,0.25); font-size: 13px; font-weight: 600;
}

.win-title.sprint-over {
    color: #ff6b35;
    text-shadow: 0 0 30px rgba(255,107,53,0.25);
}
.sprint-result-streak {
    font-size: clamp(56px, 16vw, 80px);
    font-weight: 900; color: #f7c948;
    text-shadow: 0 0 40px rgba(247,201,72,0.3);
    line-height: 1; margin-bottom: 4px;
}
.sprint-result-label {
    font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px; letter-spacing: 0.5px;
}
