* {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f172a;
    font-family: 'Quicksand', sans-serif;
}

.font-game { font-family: 'Fredoka One', cursive, sans-serif; }
.font-comic { font-family: 'Bungee', cursive, sans-serif; }

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    touch-action: none;
}

.overlay-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.glass-card {
    background: rgba(26, 17, 12, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.control-circle-btn {
    width: 66px;
    height: 66px;
    border-radius: 9999px;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s ease, filter 0.08s ease;
    position: relative;
}

.control-circle-btn:active, .control-circle-btn.btn-pressed {
    transform: scale(0.90);
    filter: brightness(1.25);
}

#btn-brake {
    background: radial-gradient(circle at 35% 35%, #ef4444, #991b1b);
    border: 3px solid rgba(254, 202, 202, 0.95);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

#btn-shield {
    background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7);
    border: 3px solid rgba(224, 242, 254, 0.95);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

#btn-action {
    background: radial-gradient(circle at 35% 35%, #f59e0b, #b45309);
    border: 3px solid rgba(254, 240, 138, 0.95);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.token-float {
    position: absolute;
    pointer-events: none;
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 3px 10px rgba(0,0,0,0.85);
    z-index: 40;
    animation: token-waft 2.4s ease-out forwards;
}

@keyframes token-waft {
    0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
    15%  { opacity: 1; transform: translate(-50%, -15px) scale(1.15); }
    75%  { opacity: 0.95; transform: translate(-50%, -60px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -105px) scale(0.9); }
}

.tray-badge {
    background: rgba(22, 14, 10, 0.78);
    border: 1.5px solid rgba(251, 191, 36, 0.35);
    border-radius: 9999px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.tray-badge.active-weapon {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.28);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
}

.tray-badge.perk-active {
    animation: pulse-border 1.2s infinite alternate;
}

@keyframes pulse-border {
    0% { border-color: rgba(56, 189, 248, 0.4); transform: scale(1); }
    100% { border-color: rgba(56, 189, 248, 1); transform: scale(1.08); box-shadow: 0 0 14px rgba(56, 189, 248, 0.6); }
}

.run-pill {
    transition: all 0.15s ease;
}

.run-pill.active {
    background: #f59e0b;
    color: #451a03;
    border-color: #fde68a;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}