/* ============================================================================
   ROLLER DUTIES - Styles
   Roblox-style 3D Mobile Game
   ============================================================================ */

:root {
    /* Color palette */
    --bg-dark: #0B0F14;
    --bg-panel: #121826;
    --bg-panel-light: #1a2332;
    --text-primary: #E6EDF6;
    --text-secondary: #8B9DB5;
    --accent: #00E5FF;
    --accent-dark: #00B8CC;
    --danger: #FF3B3B;
    --danger-dark: #CC2E2E;
    --reward: #FFD166;
    --reward-dark: #E5B84D;
    --success: #4ADE80;
    --success-dark: #22C55E;

    /* Sizing */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-icon {
    width: 120px;
    height: 84px;
    margin: 0 auto 20px;
    animation: bounce 1s infinite ease-in-out;
}

.loading-icon .roller-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-5deg); }
}

.loading-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    margin-bottom: 10px;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.loading-bar {
    width: 250px;
    height: 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================================================
   MAIN MENU
   ============================================================================ */

#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0d1520 50%, #0B0F14 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
}

.menu-content {
    text-align: center;
    padding: 40px;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
    margin-bottom: 20px;
    line-height: 1.2;
}

.menu-roller {
    width: 150px;
    height: 105px;
    margin: 30px auto;
    animation: menuRoller 3s infinite ease-in-out;
}

.menu-roller .roller-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

@keyframes menuRoller {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(20px) rotate(5deg); }
    75% { transform: translateX(-20px) rotate(-5deg); }
}

.menu-btn {
    display: block;
    width: 220px;
    margin: 15px auto;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-panel-light);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-dark);
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn.share-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.menu-btn.other-games-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.menu-coins {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--reward);
}

.coin-icon {
    font-size: 1.5em;
}

.coin-icon.small {
    font-size: 1em;
}

/* ============================================================================
   HUD
   ============================================================================ */

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    z-index: 100;
    pointer-events: none;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.hud-panel {
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    pointer-events: auto;
}

.hud-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.hud-value {
    font-size: 1.4rem;
    font-weight: 800;
}

.level-panel .hud-value {
    color: var(--accent);
}

.coins-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coins-panel .hud-value {
    color: var(--reward);
}

.progress-panel {
    flex: 1;
    max-width: 200px;
}

.progress-bar-container {
    position: relative;
    height: 20px;
    background: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--success), var(--accent));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hud-bottom-left {
    position: fixed;
    bottom: 180px;
    left: 15px;
}

.health-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: var(--border-radius);
}

.health-icon {
    font-size: 1.2rem;
}

.health-bar-container {
    width: 100px;
    height: 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    overflow: hidden;
}

.health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--danger), #FF6B6B);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.health-text {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 40px;
}

/* ============================================================================
   MOBILE CONTROLS
   ============================================================================ */

#mobile-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
    z-index: 100;
    pointer-events: none;
}

.joystick-container {
    position: relative;
    width: 140px;
    height: 140px;
    pointer-events: auto;
}

.joystick-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 24, 38, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 3px solid rgba(0, 229, 255, 0.3);
    box-shadow: var(--shadow), inset 0 0 30px rgba(0,0,0,0.3);
}

.joystick-knob {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4);
    transition: transform 0.05s ease-out;
    pointer-events: none;
}

.joystick-knob.active {
    box-shadow: 0 2px 10px rgba(0, 229, 255, 0.6);
}

.boost-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, var(--reward), var(--reward-dark));
    color: var(--bg-dark);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow), 0 0 20px rgba(255, 209, 102, 0.3);
    pointer-events: auto;
    transition: all 0.1s ease;
}

.boost-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 209, 102, 0.5);
}

.boost-icon {
    font-size: 1.8rem;
}

.boost-text {
    font-size: 0.75rem;
}

/* ============================================================================
   FLATTEN POPUP
   ============================================================================ */

#flatten-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 200;
}

.flatten-text {
    font-size: 3rem;
    font-weight: 900;
    color: var(--success);
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
    animation: flattenPop 0.5s ease-out forwards;
}

@keyframes flattenPop {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1) translateY(-30px);
    }
}

/* ============================================================================
   CASHOUT POPUP
   ============================================================================ */

#cashout-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 300;
    pointer-events: none;
}

.cashout-content {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--reward), var(--reward-dark));
    padding: 30px 50px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(255, 209, 102, 0.5);
    animation: cashoutAnim 1.5s ease-out forwards;
}

.cashout-icon {
    font-size: 3rem;
}

.cashout-amount {
    font-size: 3rem;
    font-weight: 900;
    color: var(--bg-dark);
}

@keyframes cashoutAnim {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
}

/* ============================================================================
   LEVEL COMPLETE
   ============================================================================ */

#level-complete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 20, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
}

.level-complete-content {
    background: var(--bg-panel);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.level-complete-content h2 {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.level-stats {
    margin-bottom: 30px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1rem;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row.total {
    margin-top: 15px;
    padding-top: 20px;
    border-top: 2px solid var(--accent);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--reward);
}

.level-complete-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.lc-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-panel-light);
    color: var(--text-primary);
}

.lc-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-dark);
}

.lc-btn:hover {
    transform: translateY(-2px);
}

.lc-btn.share-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.lc-btn.other-games-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ============================================================================
   GAME OVER
   ============================================================================ */

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 20, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
}

.game-over-content {
    background: var(--bg-panel);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.game-over-content h2 {
    font-size: 1.8rem;
    color: var(--danger);
    margin-bottom: 20px;
}

.game-over-icon {
    font-size: 80px;
    margin: 20px 0;
}

.game-over-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.game-over-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.game-over-stats strong {
    color: var(--text-primary);
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.go-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-panel-light);
    color: var(--text-primary);
}

.go-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-dark);
}

/* ============================================================================
   GARAGE / SHOP
   ============================================================================ */

#garage-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 20, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 600;
    overflow-y: auto;
}

.garage-overlay {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    max-height: 100vh;
    overflow-y: auto;
}

.garage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.garage-header h1 {
    font-size: 2rem;
    color: var(--accent);
}

.garage-coins {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--reward);
    background: var(--bg-panel);
    padding: 10px 20px;
    border-radius: var(--border-radius);
}

.upgrade-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.upgrade-card {
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.upgrade-card:hover {
    background: var(--bg-panel-light);
}

.upgrade-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: var(--border-radius);
}

.upgrade-info {
    flex: 1;
}

.upgrade-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.upgrade-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upgrade-level {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.level-display {
    color: var(--accent);
    font-weight: 700;
}

.upgrade-effect {
    font-size: 0.85rem;
    color: var(--success);
    margin-top: 5px;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--bg-dark);
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    transform: scale(1.05);
}

.upgrade-btn:disabled {
    background: var(--bg-dark);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.upgrade-btn.maxed {
    background: var(--bg-panel-light);
    color: var(--text-secondary);
}

.garage-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.garage-btn {
    flex: 1;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-panel-light);
    color: var(--text-primary);
}

.garage-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-dark);
}

.garage-btn.danger {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
}

.garage-btn:hover {
    transform: translateY(-2px);
}

/* ============================================================================
   RESET CONFIRMATION
   ============================================================================ */

#reset-confirm {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 700;
}

.reset-content {
    background: var(--bg-panel);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 350px;
}

.reset-content h3 {
    color: var(--danger);
    margin-bottom: 15px;
}

.reset-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.reset-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.reset-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: var(--bg-panel-light);
    color: var(--text-primary);
}

.reset-btn.danger {
    background: var(--danger);
    color: white;
}

/* ============================================================================
   PAUSE MENU
   ============================================================================ */

#pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 20, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 400;
}

.pause-content {
    text-align: center;
}

.pause-content h2 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 40px;
}

.pause-btn {
    display: block;
    width: 200px;
    margin: 15px auto;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: var(--bg-panel);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.pause-btn:hover {
    background: var(--bg-panel-light);
    transform: translateY(-2px);
}

#pause-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
}

#pause-btn:hover {
    background: var(--bg-panel-light);
}

/* ============================================================================
   TOO WEAK WARNING
   ============================================================================ */

#weak-warning {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 700;
    z-index: 150;
    animation: shake 0.5s ease-in-out;
    box-shadow: var(--shadow);
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%); }
    25% { transform: translateX(calc(-50% - 10px)); }
    75% { transform: translateX(calc(-50% + 10px)); }
}

/* ============================================================================
   SHARE NOTIFICATION
   ============================================================================ */

.share-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.share-notification.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 600px) {
    .game-title {
        font-size: 2rem;
    }

    .menu-roller {
        width: 120px;
        height: 84px;
    }

    .hud-panel {
        padding: 8px 12px;
    }

    .hud-value {
        font-size: 1.2rem;
    }

    .progress-panel {
        max-width: 150px;
    }

    .joystick-container {
        width: 120px;
        height: 120px;
    }

    .joystick-knob {
        width: 50px;
        height: 50px;
    }

    .boost-btn {
        width: 85px;
        height: 85px;
    }

    .boost-icon {
        font-size: 1.5rem;
    }

    .hud-bottom-left {
        bottom: 160px;
    }

    .health-bar-container {
        width: 80px;
    }

    .level-complete-content,
    .game-over-content {
        padding: 25px;
    }

    .upgrade-card {
        padding: 15px;
    }

    .upgrade-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
}

/* Landscape mobile optimizations */
@media screen and (max-height: 500px) {
    .hud-top {
        padding: 10px;
    }

    .hud-panel {
        padding: 6px 10px;
    }

    .hud-label {
        font-size: 0.6rem;
    }

    .hud-value {
        font-size: 1rem;
    }

    .hud-bottom-left {
        bottom: 130px;
    }

    .joystick-container {
        width: 100px;
        height: 100px;
    }

    .joystick-knob {
        width: 40px;
        height: 40px;
    }

    .boost-btn {
        width: 70px;
        height: 70px;
    }

    #mobile-controls {
        bottom: 10px;
    }

    .garage-overlay {
        padding: 10px;
    }

    .upgrade-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Touch device detection */
@media (pointer: coarse) {
    #mobile-controls {
        display: flex !important;
    }
}

@media (pointer: fine) {
    #mobile-controls {
        display: none !important;
    }

    .hud-bottom-left {
        bottom: 20px;
    }
}
