/* style.css - Responsive Modern Glassmorphic HUD & Mobile Touch Controls */

:root {
    --primary-cyan: #00f2fe;
    --accent-magenta: #ff2a6d;
    --accent-gold: #ffd166;
    --accent-green: #39ff14;
    --dark-bg: rgba(10, 18, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.22);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #05101a;
    font-family: var(--font-stack);
    touch-action: none;
}

#game-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* UI Overlay Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: env(safe-area-inset-top, 16px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 16px) env(safe-area-inset-left, 16px);
}

/* Glassmorphism Common Styles */
.glass-panel {
    background: var(--dark-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

/* TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.score-box {
    padding: 10px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.score-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.score-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #94b8db;
    text-transform: uppercase;
}

.score-value {
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(0, 242, 254, 0.6);
    font-variant-numeric: tabular-nums;
}

.best-row {
    display: flex;
    gap: 6px;
    font-size: 11px;
    color: #a0aec0;
}

.best-val {
    color: var(--accent-gold);
    font-weight: 700;
}

.combo-badge {
    align-self: flex-start;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--accent-magenta), #ff758c);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    box-shadow: 0 0 14px rgba(255, 42, 109, 0.7);
    display: none;
    animation: pulseCombo 0.8s infinite alternate ease-in-out;
}

.combo-badge.active {
    display: inline-block;
}

@keyframes pulseCombo {
    0% { transform: scale(1.0); }
    100% { transform: scale(1.15); }
}

/* TIMER BAR (for 2-Min Trick Attack) */
.timer-container {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
    color: var(--accent-gold);
}

.timer-container.hidden {
    display: none;
}

/* CABLE PARK STATUS (Waterskibaan De Berendonck) */
.cable-info {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-cyan);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.cable-info.hidden {
    display: none;
}

.cable-lap {
    color: var(--accent-gold);
    font-weight: 900;
}

.cable-dist {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.highlight-btn {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(20, 35, 55, 0.85)) !important;
    border-color: var(--primary-cyan) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* TOP ACTIONS / BUTTONS */
.top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill-btn {
    background: rgba(20, 35, 55, 0.75);
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-btn:hover, .pill-btn:active {
    background: rgba(0, 242, 254, 0.3);
    border-color: var(--primary-cyan);
    color: #ffffff;
    transform: translateY(-1px);
}

/* DYNAMIC TRICK BANNER */
.banner-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

.banner {
    background: linear-gradient(135deg, rgba(10, 25, 45, 0.95), rgba(20, 45, 80, 0.95));
    border: 2px solid var(--primary-cyan);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.5);
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.banner.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.banner.wipeout {
    border-color: var(--accent-magenta);
    box-shadow: 0 10px 30px rgba(255, 42, 109, 0.6);
    color: #ff758c;
}

.banner.gold {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(255, 209, 102, 0.6);
    color: var(--accent-gold);
}

/* CENTER / AIR METER */
.center-hud {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.air-badge {
    background: rgba(0, 242, 254, 0.25);
    border: 1px solid var(--primary-cyan);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: 16px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.air-badge.active {
    opacity: 1;
    transform: scale(1);
}

/* BOTTOM HUD & GAUGES */
.bottom-bar {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    position: relative;
    width: 100%;
}

/* Desktop Controls Helper Box - Positioned safely ABOVE the touch steer zone */
.controls-hint {
    position: absolute;
    bottom: 195px;
    left: 20px;
    padding: 12px 18px;
    font-size: 12px;
    line-height: 1.6;
    max-width: 320px;
    display: block;
    z-index: 12;
    pointer-events: auto;
}

.controls-hint.hidden {
    display: none !important;
}

.controls-hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-cyan);
    text-transform: uppercase;
}

.btn-close-hint {
    background: transparent;
    border: none;
    color: #94b8db;
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-close-hint:hover {
    color: #ffffff;
}

.controls-hint kbd {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 700;
    font-family: inherit;
    font-size: 11px;
    color: var(--primary-cyan);
}

/* Center Meters: Speedometer, Tension & Pop */
.meters-box {
    padding: 12px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}

.speed-display {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.gauge-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gauge-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    width: 50%;
    background: var(--primary-cyan);
    border-radius: 8px;
    transition: width 0.08s ease, background-color 0.15s ease;
}

.pop-bar-fill {
    background: linear-gradient(90deg, #ffd166, #ff2a6d);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.6);
}

/* =========================================
   TOUCH CONTROLS (OPTIMIZED FOR ANDROID & MOBILE)
   ========================================= */
.touch-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

/* Left Steer Joystick / Touch Zone */
.touch-steer-zone {
    position: absolute;
    bottom: 24px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(10, 25, 45, 0.45);
    border: 2px dashed rgba(0, 242, 254, 0.4);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joystick-thumb {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-cyan), #007799);
    border: 2px solid #ffffff;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.05s ease-out;
}

.steer-label {
    position: absolute;
    bottom: -22px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-cyan);
    text-transform: uppercase;
}

/* Right Touch Action Buttons Cluster */
.touch-action-buttons {
    position: absolute;
    bottom: 24px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: auto;
}

.trick-buttons-cluster {
    display: flex;
    gap: 10px;
}

.action-btn {
    border-radius: 50%;
    background: rgba(15, 30, 50, 0.75);
    border: 2px solid var(--glass-border);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    cursor: pointer;
    touch-action: none;
    transition: all 0.12s ease;
    user-select: none;
}

.btn-small {
    width: 58px;
    height: 58px;
    font-size: 11px;
    border-color: rgba(255, 209, 102, 0.6);
    color: var(--accent-gold);
}

.btn-raley {
    border-color: rgba(0, 242, 254, 0.85);
    color: var(--primary-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.btn-roll {
    border-color: rgba(255, 42, 109, 0.85);
    color: #ff758c;
    box-shadow: 0 0 12px rgba(255, 42, 109, 0.4);
}

.btn-flip {
    border-color: rgba(180, 80, 255, 0.85);
    color: #c77dff;
    box-shadow: 0 0 12px rgba(180, 80, 255, 0.4);
}

.btn-small.active, .btn-small:active {
    background: rgba(255, 209, 102, 0.4);
    transform: scale(0.92);
}

.btn-raley.active, .btn-raley:active {
    background: rgba(0, 242, 254, 0.4);
    transform: scale(0.92);
}

.btn-roll.active, .btn-roll:active {
    background: rgba(255, 42, 109, 0.4);
    transform: scale(0.92);
}

.btn-flip.active, .btn-flip:active {
    background: rgba(180, 80, 255, 0.4);
    transform: scale(0.92);
}

/* Big Pop Button */
.btn-pop {
    width: 90px;
    height: 90px;
    font-size: 16px;
    letter-spacing: 1px;
    background: radial-gradient(circle, #ff2a6d, #b31045);
    border: 3px solid #ffffff;
    box-shadow: 0 0 25px rgba(255, 42, 109, 0.75);
}

.btn-pop.active, .btn-pop:active {
    transform: scale(0.88);
    box-shadow: 0 0 35px rgba(255, 42, 109, 1.0);
    background: radial-gradient(circle, #ff5e91, #d61b58);
}

/* RESULTS MODAL (FOR 2-MIN TRICK ATTACK) */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 12, 22, 0.85);
    backdrop-filter: blur(16px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: linear-gradient(145deg, rgba(20, 38, 65, 0.95), rgba(10, 20, 35, 0.95));
    border: 2px solid var(--primary-cyan);
    border-radius: 24px;
    padding: 32px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 242, 254, 0.35);
    color: #ffffff;
}

.modal-card h2 {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 1px;
    color: var(--primary-cyan);
}

.modal-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 14px;
}

.modal-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
}

.modal-stat-row span:last-child {
    color: var(--accent-gold);
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-cyan), #007799);
    border: none;
    border-radius: 28px;
    color: #05101a;
    font-weight: 900;
    font-size: 16px;
    padding: 14px 32px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(0, 242, 254, 0.6);
    transition: transform 0.15s ease;
}

.btn-primary:active {
    transform: scale(0.95);
}

/* RESPONSIVE LAYOUT ADJUSTMENTS FOR PHONES & TABLETS */
@media (max-width: 768px) {
    .controls-hint {
        display: none;
    }
    .score-value {
        font-size: 20px;
    }
    .score-box {
        padding: 8px 14px;
    }
    .meters-box {
        padding: 8px 14px;
        min-width: 180px;
    }
    .speed-display {
        font-size: 16px;
    }
    .banner {
        font-size: 14px;
        padding: 8px 18px;
    }
    .touch-steer-zone {
        width: 125px;
        height: 125px;
        bottom: 16px;
        left: 12px;
    }
    .joystick-thumb {
        width: 50px;
        height: 50px;
    }
    .touch-action-buttons {
        bottom: 16px;
        right: 12px;
        gap: 8px;
    }
    .btn-small {
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    .btn-pop {
        width: 76px;
        height: 76px;
        font-size: 14px;
    }
}


/* DE BERENDONCK STARTSTEIGER DOCK JUMP-START TIMING HUD */
.dock-start-hud {
    position: absolute;
    bottom: 155px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 22px;
    min-width: 320px;
    max-width: 92vw;
    text-align: center;
    z-index: 30;
    border: 1.5px solid rgba(0, 242, 254, 0.55);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 242, 254, 0.25);
    pointer-events: none;
}

.dock-start-hud.hidden {
    display: none;
}

.dock-start-title {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: var(--accent-gold);
    text-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
    margin-bottom: 4px;
}

.dock-start-sub {
    font-size: 12px;
    color: #e2e8f0;
    margin-bottom: 10px;
}

.dock-start-sub kbd {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    padding: 1px 6px;
    font-weight: 800;
    color: #ffffff;
}

.dock-timing-track {
    position: relative;
    width: 100%;
    height: 26px;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.28);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.dock-zone-early {
    width: 66%;
    height: 100%;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.35), rgba(245, 158, 11, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.72);
}

.dock-zone-sweet {
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.78), rgba(57, 255, 20, 0.92), rgba(34, 197, 94, 0.78));
    box-shadow: inset 0 0 12px rgba(57, 255, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #052e16;
    letter-spacing: 0.6px;
}

.dock-zone-late {
    width: 14%;
    height: 100%;
    background: rgba(239, 68, 68, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #ffffff;
}

.dock-timing-cursor {
    position: absolute;
    top: 0;
    left: 0%;
    width: 6px;
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transform: translateX(-50%);
    box-shadow: 0 0 12px #ffffff, 0 0 20px var(--primary-cyan);
    z-index: 5;
}


/* ANGRY CABLE PARK OPERATOR POPUP */
.operator-mad-hud {
    position: absolute;
    bottom: 145px;
    left: 50%;
    transform: translateX(-50%);
    padding: 18px 24px;
    min-width: 310px;
    max-width: 90vw;
    text-align: center;
    z-index: 40;
    background: rgba(30, 10, 18, 0.88);
    border: 2px solid #ff2a4b;
    box-shadow: 0 12px 42px rgba(255, 25, 65, 0.45);
    pointer-events: auto;
}

.operator-mad-hud.hidden {
    display: none;
}

.operator-mad-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 900;
    color: #ff4d6d;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.operator-emoji {
    font-size: 26px;
    display: inline-block;
    animation: operatorShake 0.22s infinite alternate ease-in-out;
}

@keyframes operatorShake {
    0% { transform: rotate(-14deg) scale(1.05); }
    100% { transform: rotate(14deg) scale(1.18); }
}

.operator-mad-quote {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 14px;
}

.btn-operator-sorry {
    background: linear-gradient(135deg, #ff2a6d, #ff7b00);
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 42, 109, 0.5);
    transition: transform 0.15s ease;
}

.btn-operator-sorry:hover, .btn-operator-sorry:active {
    transform: scale(1.06);
}


/* EDGE LOAD METER (REQUIRED FOR WATER RALEY & BACKROLL) */
.edge-track {
    position: relative;
}

.edge-threshold-tick {
    position: absolute;
    left: 55%;
    top: -1px;
    bottom: -1px;
    width: 2.5px;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    z-index: 3;
}

.edge-bar-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.05s linear;
}

.edge-bar-fill.ready {
    background: linear-gradient(90deg, #22c55e, #39ff14);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.75);
}

.edge-status {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #fbbf24;
}

.edge-status.ready {
    color: #39ff14;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.8);
}


/* =========================================================
   MOBILE-ONLY VIEW OPTIMIZATION (PORTRAIT & LANDSCAPE)
   Desktop layout remains untouched above 900px x 520px!
   ========================================================= */
@media (max-width: 900px), (max-height: 520px) {
    #ui-layer {
        padding: max(env(safe-area-inset-top, 8px), 8px) max(env(safe-area-inset-right, 10px), 10px) max(env(safe-area-inset-bottom, 8px), 8px) max(env(safe-area-inset-left, 10px), 10px);
    }

    /* Hide desktop-only keyboard guide & button on mobile */
    .controls-hint,
    #btn-guide {
        display: none !important;
    }

    /* Slim, non-cramped top HUD */
    .top-bar {
        gap: 6px;
        flex-wrap: wrap;
        align-items: center;
    }

    .score-box {
        padding: 5px 10px;
        border-radius: 10px;
    }

    .score-label {
        font-size: 9px;
    }

    .score-value {
        font-size: 18px;
    }

    .best-row {
        font-size: 9px;
    }

    .cable-info {
        padding: 4px 10px;
        font-size: 11px;
        gap: 6px;
        border-radius: 10px;
    }

    .top-actions {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .pill-btn {
        padding: 5px 9px;
        font-size: 11px;
        border-radius: 16px;
        gap: 4px;
    }

    /* Banner sits cleanly below slim top bar */
    .banner-container {
        top: 68px;
        width: 90vw;
        text-align: center;
    }

    .banner {
        font-size: 13px;
        padding: 6px 14px;
    }

    /* Place Speed (KM/H), Line Tension & Edge Load cleanly ABOVE the left Carve control! */
    .bottom-bar {
        position: fixed;
        bottom: 124px;
        left: 10px;
        transform: none;
        width: auto;
        justify-content: flex-start;
        pointer-events: none;
    }

    .meters-box {
        min-width: 126px;
        max-width: 148px;
        padding: 6px 10px;
        border-radius: 12px;
        gap: 4px;
    }

    .speed-display {
        font-size: 14px;
        margin-bottom: 2px;
        text-align: left;
    }

    /* Show Line Tension & Edge Load; hide Pop Charge bar on small screens to stay compact */
    .meters-box .gauge-row:last-of-type {
        display: none;
    }

    .gauge-label {
        font-size: 9px;
        gap: 6px;
    }

    /* Sleek, ergonomic left Carve pad */
    .touch-steer-zone {
        width: 104px;
        height: 104px;
        bottom: 12px;
        left: 10px;
    }

    .joystick-thumb {
        width: 42px;
        height: 42px;
    }

    .steer-label {
        font-size: 9px;
    }

    /* Place Raley / Roll / Flip / Spin / Grab to the LEFT of the POP button! */
    .touch-action-buttons {
        bottom: 12px;
        right: 10px;
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }

    .trick-buttons-cluster {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 5px;
        max-width: 146px;
    }

    .btn-small {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        font-size: 9px;
        padding: 0;
    }

    .btn-pop {
        width: 68px;
        height: 68px;
        flex: 0 0 68px;
        font-size: 13px;
    }

    /* Compact Dock Start & Angry Operator popups so they never collide with thumbs */
    .dock-start-hud,
    .operator-mad-hud {
        min-width: 240px;
        max-width: 82vw;
        padding: 10px 14px;
        bottom: 132px;
    }

    .dock-start-title,
    .operator-mad-header {
        font-size: 13px;
    }

    .dock-start-sub,
    .operator-mad-quote {
        font-size: 11px;
        margin-bottom: 8px;
    }
}

/* Extra polish for short landscape mobile screens */
@media (max-height: 460px) {
    .dock-start-hud,
    .operator-mad-hud {
        bottom: auto;
        top: 60px;
    }
}
