/* style.css - Ultra Premium Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #38bdf8;
    --primary-dim: #0284c7;
    --secondary: #a78bfa;
    --accent: #06b6d4;
    --success: #6366f1;
    --danger: #ff3355;
    --dark: #06060f;
    --darker: #020205;
    --glass: rgba(10, 12, 24, 0.78);
    --glass-light: rgba(16, 20, 40, 0.58);
    --border: rgba(56, 189, 248, 0.16);
    --text: #f0f4ff;
    --text-dim: rgba(200, 210, 255, 0.5);
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Orbitron', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--darker);
    font-family: var(--font-main);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

#gameContainer {
    position: fixed;
    inset: 0;
    z-index: 1;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #030308;
    touch-action: none;
}

/* ============================================
   DASHBOARD
============================================ */
#dashboard {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    background: 
        radial-gradient(ellipse at 30% 10%, rgba(0, 150, 220, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 90%, rgba(220, 0, 150, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(80, 0, 180, 0.05) 0%, transparent 60%),
        var(--darker);
    z-index: 100;
    overflow-y: auto;
    overscroll-behavior: none;
}

/* Animated Particles */
.dash-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.dash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    from { transform: translateY(100%) translateX(0); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    to { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Top Section */
.dash-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: ringSpin 10s linear infinite;
    opacity: 0.5;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text);
}

.logo-sub {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.6);
}

.settings-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(90deg);
}

/* Center Section */
.dash-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.coin-display {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.26);
    border-radius: 30px;
}

.coin-orb {
    position: absolute;
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.35;
}

.coin-display .coin-icon {
    font-size: 1.1rem;
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent);
    z-index: 1;
}

#coinDisplay {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    width: 100%;
    max-width: 400px;
}

.stat-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.stat-glow {
    position: absolute;
    bottom: -20px;
    width: 60px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.2;
}

.stat-box:hover .stat-glow {
    opacity: 0.35;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary);
}

.stat-label {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Modes */
.dash-modes {
    margin-bottom: 1.25rem;
}

.mode-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.4rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.mode-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-card:hover .mode-shine {
    opacity: 1;
}

.mode-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.2), inset 0 0 20px rgba(0, 200, 255, 0.06);
}

.mode-card:active {
    transform: scale(0.96);
}

.mode-icon {
    font-size: 1.3rem;
}

.mode-card.active .mode-icon {
    text-shadow: 0 0 15px currentColor;
    animation: modeBounce 1s ease-in-out infinite;
}

@keyframes modeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.mode-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
}

/* Play Button */
.play-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    border: none;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    background: var(--primary);
    filter: blur(40px);
    opacity: 0.4;
    animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.btn-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--dark);
    z-index: 1;
}

.btn-arrow {
    font-size: 1rem;
    color: var(--dark);
    z-index: 1;
    transition: transform 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 200, 255, 0.45);
}

.play-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.play-btn:active {
    transform: translateY(0);
}

/* Footer */
.dash-footer {
    display: flex;
    gap: 0.6rem;
}

.footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 200, 255, 0.08);
}

/* ============================================
   GAME HUD
============================================ */
#gameOverlay {
    position: fixed;
    inset: 0;
    padding: 0.8rem;
    z-index: 50;
    pointer-events: none;
}

#gameOverlay.hidden {
    display: none;
}

.hud-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(16px);
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hud-score-box {
    display: flex;
    flex-direction: column;
}

.hud-score-box .hud-label {
    font-size: 0.5rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.hud-score-box .hud-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary);
}

.hud-streak-box {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 150, 0, 0.15);
    border: 1px solid rgba(255, 150, 0, 0.3);
    border-radius: 8px;
}

.streak-fire {
    font-size: 0.9rem;
}

#hudStreak {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.hud-coin-box {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hud-coin-box .coin-icon {
    font-size: 0.95rem;
    color: var(--accent);
}

#hudCoins {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.hud-mode-box {
    padding: 0.3rem 0.7rem;
    background: rgba(255, 0, 150, 0.12);
    border: 1px solid rgba(255, 0, 150, 0.25);
    border-radius: 8px;
}

#hudMode {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 1px;
}

/* Tap Indicator */
.tap-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.6rem 1.2rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 10px;
    animation: tapPulse 1.5s ease-in-out infinite;
}

.tap-indicator span {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary);
}

@keyframes tapPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.tap-indicator.hidden {
    display: none;
}

/* ============================================
   GAME OVER
============================================ */
#gameOverScreen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 4, 15, 0.92);
    backdrop-filter: blur(12px);
    z-index: 150;
}

#gameOverScreen.hidden {
    display: none;
}

.go-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 380px;
    padding: 2rem 1.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(28px);
    animation: goSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes goSlideIn {
    from { opacity: 0; transform: translateY(40px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.go-crasher {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

.crash-orb {
    width: 100%;
    height: 100%;
    background: var(--danger);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.5;
    animation: crashBlink 1s ease-in-out infinite;
}

@keyframes crashBlink {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

.go-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--danger);
    text-shadow: 0 0 30px var(--danger);
    letter-spacing: 4px;
    margin-bottom: 1.25rem;
}

/* Score Circle */
.go-score-circle {
    position: relative;
    width: 130px;
    height: 130px;
    margin-bottom: 1.25rem;
}

.score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.score-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-out;
}

.score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#goScore {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    text-shadow: 0 0 25px var(--primary);
}

/* Rewards */
.go-rewards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.4rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}

.reward-icon {
    font-size: 1rem;
    color: var(--primary);
}

.reward-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.reward-label {
    font-size: 0.5rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* New Record */
.new-record {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.20), rgba(167, 139, 250, 0.12));
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: 10px;
    margin-bottom: 1rem;
    animation: recordPulse 1s ease-in-out infinite;
}

.new-record span {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}

.new-record.hidden {
    display: none;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.28); }
    50% { box-shadow: 0 0 35px rgba(167, 139, 250, 0.36); }
}

/* Actions */
.go-actions {
    display: flex;
    gap: 0.6rem;
    width: 100%;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    color: var(--dark);
    box-shadow: 0 4px 20px rgba(0, 200, 255, 0.35);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 200, 255, 0.45);
}

.action-btn.secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.action-btn.secondary:hover {
    border-color: var(--primary);
    background: rgba(0, 200, 255, 0.08);
}

/* ============================================
   MODALS
============================================ */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 15, 0.92);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 92%;
    max-width: 400px;
    max-height: 80vh;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    backdrop-filter: blur(28px);
    z-index: 1;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}

.modal-balance {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 20px;
}

.modal-balance .coin-icon {
    font-size: 0.9rem;
    color: var(--accent);
}

#shopBalance {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Shop Nav */
.shop-nav {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.nav-btn {
    flex: 1;
    padding: 0.55rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    background: var(--glass-light);
    color: var(--primary);
}

/* Shop Scroll */
.shop-scroll {
    flex: 1;
    overflow-y: auto;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.shop-grid.hidden {
    display: none;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-item:hover {
    background: rgba(0, 200, 255, 0.06);
    border-color: var(--primary);
}

.shop-item.owned {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
}

.item-color {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.item-cost {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--accent);
}

.item-check {
    display: none;
    width: 22px;
    height: 22px;
    background: var(--success);
    border-radius: 50%;
    color: var(--dark);
    font-size: 0.7rem;
    align-items: center;
    justify-content: center;
}

.shop-item.owned .item-check {
    display: flex;
}

/* Achievements */
.achievements-content h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-align: center;
}

.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.achievement-item.unlocked {
    border-color: rgba(56, 189, 248, 0.30);
    background: rgba(56, 189, 248, 0.06);
}

.ach-icon {
    font-size: 1.4rem;
}

.ach-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ach-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.ach-progress {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.ach-status {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.achievement-item.unlocked .ach-status {
    color: var(--accent);
}

/* Settings */
.settings-content h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-align: center;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.setting-row span {
    font-size: 0.9rem;
    color: var(--text);
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.switch input:checked + .switch-slider {
    background: rgba(0, 200, 255, 0.15);
    border-color: var(--primary);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.danger-btn {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.25);
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--danger);
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    background: rgba(255, 68, 102, 0.2);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-box {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .mode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dash-footer {
        flex-direction: column;
    }
}

@media (min-width: 500px) {
    #dashboard {
        padding: 2rem;
    }
    
    .dash-center {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .coin-display {
        position: absolute;
        top: 1.2rem;
        right: 1.2rem;
    }
    
    .stats-grid {
        max-width: none;
    }
    
    .mode-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch optimizations */
@media (hover: none) {
    .play-btn:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 200, 255, 0.35);
    }
    
    .play-btn:hover .btn-arrow {
        transform: none;
    }
}


/* Mobile Touch Controls */
.mobile-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: none;
}

.mobile-btn {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Show mobile controls on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mobile-controls {
        display: block !important;
    }
}
