/* ============================================================================
   TANK SIMULATOR - Styles
   Military Combat Edition
   ============================================================================ */

:root {
    --bg-dark: #0B0F14;
    --bg-panel: #121826;
    --bg-panel-hover: #1a2235;
    --text-primary: #E6EDF6;
    --text-secondary: #8899AA;
    --accent: #00E5FF;
    --accent-dark: #00B8CC;
    --danger: #FF3B3B;
    --danger-dark: #CC2222;
    --reward: #FFD166;
    --reward-dark: #E5B84D;
    --success: #4ADE80;
    --success-dark: #22C55E;
    --military-green: #4A5D23;
    --military-dark: #2D3A16;
    --fire-orange: #FF6B35;

    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.7);
}

* {
    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%;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hide cursor when playing (crosshair is shown instead) */
#game-container.playing {
    cursor: none;
}

#game-container.playing * {
    cursor: none;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   CROSSHAIR
   ============================================================================ */

#crosshair {
    position: fixed;
    pointer-events: none;
    z-index: 150;
    transform: translate(-50%, -50%);
    transition: left 0.05s ease-out, top 0.05s ease-out;
}

.crosshair-inner {
    position: relative;
    width: 60px;
    height: 60px;
}

.crosshair-line {
    position: absolute;
    background: #FF3333;
    box-shadow: 0 0 8px rgba(255, 50, 50, 0.8), 0 0 20px rgba(255, 50, 50, 0.4);
}

.crosshair-top {
    width: 4px;
    height: 18px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.crosshair-bottom {
    width: 4px;
    height: 18px;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
}

.crosshair-left {
    width: 18px;
    height: 4px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.crosshair-right {
    width: 18px;
    height: 4px;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.crosshair-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #FF0000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 0, 0, 1), 0 0 25px rgba(255, 0, 0, 0.6);
}

/* Crosshair ready state (green when can fire) */
#crosshair.ready .crosshair-line {
    background: #00FF00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.8), 0 0 20px rgba(0, 255, 0, 0.4);
}

#crosshair.ready .crosshair-dot {
    background: #00FF00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 1), 0 0 25px rgba(0, 255, 0, 0.6);
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */

#loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #1a1f2a 0%, var(--bg-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-icon {
    font-size: 100px;
    animation: tankRock 1.5s ease-in-out infinite;
}

@keyframes tankRock {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

.loading-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--fire-orange);
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    margin-top: 20px;
}

.loading-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.loading-bar {
    width: 280px;
    height: 10px;
    background: var(--bg-panel);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--military-green), var(--success));
    border-radius: 5px;
    transition: width 0.3s ease;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================================
   MAIN MENU
   ============================================================================ */

#main-menu {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #1a2a1a 0%, #0d1810 50%, var(--bg-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
}

.menu-content {
    text-align: center;
    padding: 30px;
    max-width: 400px;
}

.menu-title h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--fire-orange);
    text-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    line-height: 1;
}

.menu-title h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 5px;
}

.menu-tank {
    font-size: 120px;
    margin: 30px 0;
    animation: menuFloat 3s ease-in-out infinite;
}

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

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.menu-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.menu-row .menu-btn {
    flex: 1;
}

.menu-row .reset-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 18px 20px;
}

.reset-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel);
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--fire-orange), #CC5520);
    color: white;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.share-btn {
    background: linear-gradient(135deg, #1DA1F2, #0077B5) !important;
    color: white !important;
}

.share-btn:hover {
    background: linear-gradient(135deg, #0077B5, #005582) !important;
}

.other-games-btn {
    background: linear-gradient(135deg, #9B59B6, #8E44AD) !important;
    color: white !important;
}

.other-games-btn:hover {
    background: linear-gradient(135deg, #8E44AD, #6C3483) !important;
}

.corner-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.corner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.menu-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--reward);
}

/* ============================================================================
   HUD
   ============================================================================ */

#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    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.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hud-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.hud-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.level-info .hud-value {
    color: var(--accent);
}

.coins-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coins-info .hud-value {
    color: var(--reward);
}

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

.progress-info {
    flex: 1;
    max-width: 220px;
}

.progress-container {
    position: relative;
    height: 22px;
    background: var(--bg-dark);
    border-radius: 11px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--fire-orange), var(--reward));
    border-radius: 11px;
    transition: width 0.4s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Health bar in top HUD */
.health-info {
    min-width: 120px;
}

.health-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.health-bar-bg {
    width: 80px;
    height: 16px;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #FF4444, #44FF44);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.health-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--success);
}

/* Ammo/Reload Gauge */
.ammo-info {
    min-width: 130px;
}

.ammo-gauge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ammo-fill {
    width: 70px;
    height: 16px;
    background: linear-gradient(90deg, #44AA44 0%, #AAAA44 50%, #FF4444 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.ammo-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    transition: width 0.1s ease;
}

.ammo-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
    min-width: 50px;
}

/* ============================================================================
   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-area {
    position: relative;
    width: 150px;
    height: 150px;
    pointer-events: auto;
}

.joystick-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 3px solid rgba(0, 229, 255, 0.3);
    box-shadow: var(--shadow), inset 0 0 40px rgba(0,0,0,0.4);
}

.joystick-stick {
    position: absolute;
    width: 65px;
    height: 65px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.5);
    pointer-events: none;
    transition: transform 0.05s ease-out;
}

.joystick-stick.active {
    box-shadow: 0 2px 15px rgba(0, 229, 255, 0.7);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
}

.action-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.fire-btn {
    background: linear-gradient(145deg, var(--danger), var(--danger-dark));
    color: white;
    box-shadow: var(--shadow), 0 0 25px rgba(255, 59, 59, 0.3);
}

.fire-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 10px rgba(255, 59, 59, 0.5);
}

.fire-icon {
    font-size: 2rem;
}

.fire-label {
    font-size: 0.7rem;
    font-weight: 800;
}

.boost-btn {
    background: linear-gradient(145deg, var(--reward), var(--reward-dark));
    color: var(--bg-dark);
    box-shadow: var(--shadow), 0 0 25px rgba(255, 209, 102, 0.3);
}

.boost-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 10px rgba(255, 209, 102, 0.5);
}

.boost-icon {
    font-size: 2rem;
}

.boost-label {
    font-size: 0.7rem;
    font-weight: 800;
}

#pause-btn {
    position: fixed;
    top: 70px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 100;
    box-shadow: var(--shadow), 0 0 10px rgba(0, 229, 255, 0.3);
    transition: all 0.2s ease;
}

#pause-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    transform: scale(1.05);
}

#pause-btn:active {
    transform: scale(0.95);
}

/* ============================================================================
   EFFECTS
   ============================================================================ */

#clear-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 200;
}

.clear-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--fire-orange);
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    animation: clearPop 0.6s ease-out forwards;
}

@keyframes clearPop {
    0% { opacity: 1; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(1) translateY(-40px); }
}

#damage-flash {
    position: fixed;
    inset: 0;
    background: rgba(255, 59, 59, 0.3);
    pointer-events: none;
    z-index: 150;
    animation: damageFlash 0.2s ease-out forwards;
}

@keyframes damageFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

#power-warning {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fire-orange);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    z-index: 160;
    box-shadow: var(--shadow);
    animation: warningShake 0.5s ease-in-out;
}

@keyframes warningShake {
    0%, 100% { transform: translateX(-50%); }
    20% { transform: translateX(calc(-50% - 10px)); }
    40% { transform: translateX(calc(-50% + 10px)); }
    60% { transform: translateX(calc(-50% - 5px)); }
    80% { transform: translateX(calc(-50% + 5px)); }
}

/* ============================================================================
   CASHOUT
   ============================================================================ */

#cashout {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
}

.cashout-content {
    text-align: center;
    animation: cashoutAnim 2s ease-out forwards;
}

.cashout-icon {
    font-size: 80px;
    animation: coinSpin 0.5s ease-in-out infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.cashout-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--reward);
    margin: 10px 0;
}

.cashout-amount {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 209, 102, 0.6);
}

@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.9) translateY(-30px); }
}

/* ============================================================================
   LEVEL COMPLETE
   ============================================================================ */

#level-complete {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(11, 15, 20, 0.95);
    z-index: 500;
}

.complete-panel {
    background: var(--bg-panel);
    padding: 35px 45px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s ease-out;
}

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

.complete-panel h2 {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.complete-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: 18px;
    border-top: 2px solid var(--accent);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--reward);
}

.complete-buttons {
    display: flex;
    gap: 15px;
}

.complete-btn {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel-hover);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.complete-btn.primary {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--bg-dark);
}

.complete-btn:hover {
    transform: translateY(-2px);
}

/* ============================================================================
   GAME OVER
   ============================================================================ */

#game-over {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(11, 15, 20, 0.95);
    z-index: 500;
}

.gameover-panel {
    background: var(--bg-panel);
    padding: 35px 45px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.gameover-panel h2 {
    font-size: 1.8rem;
    color: var(--danger);
    margin-bottom: 15px;
}

.gameover-icon {
    font-size: 80px;
    margin: 15px 0;
}

.gameover-panel p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.gameover-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.gameover-stats strong {
    color: var(--text-primary);
}

.gameover-buttons {
    display: flex;
    gap: 15px;
}

.gameover-btn {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel-hover);
    color: var(--text-primary);
}

.gameover-btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--bg-dark);
}

/* ============================================================================
   ARMORY (GARAGE)
   ============================================================================ */

#garage {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(11, 15, 20, 0.98);
    z-index: 600;
    overflow-y: auto;
}

.garage-panel {
    width: 100%;
    max-width: 650px;
    padding: 25px;
    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: 2.2rem;
    color: var(--fire-orange);
}

.garage-coins {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--reward);
    background: var(--bg-panel);
    padding: 12px 22px;
    border-radius: var(--radius);
}

.upgrades-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.upgrade-card {
    background: var(--bg-panel);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.upgrade-card:hover {
    background: var(--bg-panel-hover);
}

.upgrade-icon {
    font-size: 2.8rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.upgrade-details {
    flex: 1;
}

.upgrade-details h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.upgrade-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upgrade-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.upgrade-level span {
    color: var(--accent);
    font-weight: 700;
}

.upgrade-effect {
    font-size: 0.9rem;
    color: var(--success);
    margin-top: 4px;
    font-weight: 600;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--bg-dark);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.upgrade-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.upgrade-btn:disabled {
    background: var(--bg-dark);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.upgrade-btn.maxed {
    background: var(--bg-panel-hover);
}

.coin-small {
    font-size: 1rem;
}

.garage-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.garage-btn {
    flex: 1;
    padding: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel-hover);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.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 CONFIRM
   ============================================================================ */

#reset-confirm {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.85);
    z-index: 700;
}

.confirm-panel {
    background: var(--bg-panel);
    padding: 30px 35px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 380px;
}

.confirm-panel h3 {
    color: var(--danger);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.confirm-panel p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
}

.confirm-btn {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel-hover);
    color: var(--text-primary);
}

.confirm-btn.danger {
    background: var(--danger);
    color: white;
}

/* ============================================================================
   PAUSE MENU
   ============================================================================ */

#pause-menu {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(11, 15, 20, 0.95);
    z-index: 400;
}

.pause-panel {
    text-align: center;
}

.pause-panel h2 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 40px;
}

.pause-menu-btn {
    display: block;
    width: 220px;
    margin: 15px auto;
    padding: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-panel);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.pause-menu-btn:hover {
    background: var(--bg-panel-hover);
    transform: translateY(-2px);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 600px) {
    .menu-title h1 {
        font-size: 2rem;
    }

    .menu-tank {
        font-size: 90px;
    }

    .hud-panel {
        padding: 8px 12px;
    }

    .hud-value {
        font-size: 1.2rem;
    }

    .progress-info {
        max-width: 160px;
    }

    .joystick-area {
        width: 130px;
        height: 130px;
    }

    .joystick-stick {
        width: 55px;
        height: 55px;
    }

    .action-btn {
        width: 75px;
        height: 75px;
    }

    .complete-panel,
    .gameover-panel {
        padding: 25px;
    }

    .upgrade-card {
        padding: 15px;
    }

    .upgrade-icon {
        width: 55px;
        height: 55px;
        font-size: 2.2rem;
    }
}

@media screen and (max-height: 500px) {
    #mobile-controls {
        bottom: 10px;
    }

    .joystick-area {
        width: 110px;
        height: 110px;
    }

    .joystick-stick {
        width: 45px;
        height: 45px;
    }

    .action-btn {
        width: 65px;
        height: 65px;
    }

    .upgrades-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (pointer: coarse) {
    #mobile-controls {
        display: flex !important;
    }
}

@media (pointer: fine) {
    #mobile-controls {
        display: none !important;
    }
}
