/* =========================================== */
/* RESET Y BASE - FULLSCREEN */
/* =========================================== */
* {
    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;
    position: fixed;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0f0f23 0%, #1a0520 50%, #0f0f23 100%);
    color: #00ffff;
    touch-action: none;
}

/* =========================================== */
/* ANIMACIONES GLOBALES */
/* =========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* =========================================== */
/* START SCREEN */
/* =========================================== */
#startScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    padding: 20px;
    z-index: 1000;
    animation: fadeIn 1s ease-in;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
}

/* ===== TOP BAR LIMPIO ===== */
.top-bar-clean {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 25px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.user-profile-trigger:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0066, #00ffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid #00ffff;
    background-size: cover;
    background-position: center;
}

.user-name-display {
    color: #00ffff;
    font-weight: bold;
    font-size: 16px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    color: #00ffff;
    font-size: 12px;
    transition: transform 0.3s;
}

.user-profile-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== DROPDOWN MENU ===== */
.profile-dropdown {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(10, 5, 20, 0.98);
    border: 3px solid #00ffff;
    border-radius: 15px;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    z-index: 99;
    animation: slideDown 0.3s ease;
    font-family: 'Courier New', monospace;
}

.dropdown-content {
    padding: 20px;
}

.profile-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-label {
    color: #aaa;
    font-size: 14px;
}

.stat-value {
    color: #ffff00;
    font-size: 18px;
    font-weight: bold;
}

.xp-bar-mini {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
    margin: 5px 0;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffff00, #ff8800);
    transition: width 0.5s ease;
}

.xp-text-mini {
    text-align: center;
    color: #00ffff;
    font-size: 12px;
    margin-bottom: 15px;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

.dropdown-btn {
    width: 100%;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    text-align: left;
}

.dropdown-btn:hover {
    background: rgba(0, 255, 255, 0.3);
    transform: translateX(5px);
}

.login-btn-dropdown {
    background: linear-gradient(135deg, #ff0066, #ff8800);
    border-color: #ffff00;
    color: #fff;
    text-align: center;
}

.login-btn-dropdown:hover {
    background: linear-gradient(135deg, #ff8800, #ffff00);
    transform: scale(1.05);
}

.logout-btn {
    background: rgba(255, 0, 128, 0.2);
    border-color: #ff0066;
    color: #ff0066;
}

.logout-btn:hover {
    background: rgba(255, 0, 128, 0.4);
}

.dropdown-info {
    color: #aaa;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}

/* Logo Container */
#logoContainer {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

#logoCanvas {
    max-width: 90vw;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 20px rgba(255, 0, 128, 0.5));
}

#gameTitle {
    font-size: clamp(32px, 8vw, 48px);
    color: #ff0080;
    text-shadow: 
        0 0 10px #ff0080,
        0 0 20px #ff0080,
        2px 2px 0px #00ffff;
    margin: 15px 0 5px 0;
    letter-spacing: 3px;
    animation: pulse 2s infinite;
}

#gameSubtitle {
    font-size: clamp(14px, 3vw, 20px);
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    letter-spacing: 6px;
}

/* ===== BOTONES PRINCIPALES (MISMO TAMAÑO) ===== */
#startButtons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

/* Botón JUGAR */
.big-button {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #ff0080, #ff0066);
    color: white;
    border: 4px solid #00ffff;
    padding: 18px 50px;
    font-size: clamp(24px, 5vw, 32px);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 
        0 0 20px rgba(255, 0, 128, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.big-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 3s infinite;
}

.big-button:hover, .big-button:active {
    transform: scale(1.05);
    box-shadow: 
        0 0 30px rgba(255, 0, 128, 0.8),
        0 0 60px rgba(0, 255, 255, 0.5);
}

.button-text {
    position: relative;
    z-index: 1;
}

/* Récord mundial */
.world-record {
    margin: 5px 0;
    font-size: 16px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    text-align: center;
}

/* Botón GARAJE - MISMO TAMAÑO QUE JUGAR */
.garage-button-home {
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.6);
    border: 4px solid #00ffff;
    color: #00ffff;
    padding: 18px 50px;
    border-radius: 12px;
    font-size: clamp(20px, 4.5vw, 28px);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Courier New', monospace;
    touch-action: manipulation;
}

.garage-button-home .button-icon {
    font-size: clamp(24px, 5vw, 32px);
}

.garage-button-home:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* =========================================== */
/* GAME SCREEN - FULLSCREEN */
/* =========================================== */
#gameContainer {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #0a0a0a;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    touch-action: none;
}

/* ===== HUD MINIMALISTA ===== */
#gameHUD {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.hud-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
}

.hud-level-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-badge {
    color: #ffff00;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 5px #ffff00;
}

.xp-mini-bar {
    width: 80px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.xp-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffff00, #ff8800);
    width: 0%;
    transition: width 0.3s ease;
}

.hud-center-stats {
    display: flex;
    gap: 15px;
}

.stat-compact {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.stat-compact .stat-icon {
    font-size: 18px;
}

.speed-indicator {
    color: #00ffff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
}

.hud-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 8px 15px;
}

.bottom-stat {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.combo-stat {
    color: #ff0080;
    text-shadow: 0 0 10px #ff0080;
    font-size: 16px;
}

.combo-mini-bar {
    width: 60px;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 128, 0.3);
    margin-left: 5px;
}

.combo-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0080, #ff00ff);
    width: 100%;
    transition: width 0.5s linear;
}

.powerup-stat {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

/* ===== TOUCH CONTROLS ===== */
#touchControls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: auto;
    display: flex;
}

.touch-zone {
    width: 50%;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: background-color 0.1s;
}

.touch-zone:active {
    background: rgba(0, 255, 255, 0.1);
}

.touch-left:active {
    background: rgba(255, 0, 128, 0.1);
}

.touch-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: rgba(0, 255, 255, 0.3);
    pointer-events: none;
    animation: fadeOut 3s forwards;
}

.touch-left .touch-hint {
    color: rgba(255, 0, 128, 0.3);
}

/* =========================================== */
/* GAME OVER SCREEN */
/* =========================================== */
.game-over-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.5s;
}

.game-over-content {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px 20px;
}

.game-over-title {
    color: #ff0080;
    font-size: clamp(28px, 6vw, 40px);
    text-align: center;
    text-shadow: 0 0 20px #ff0080;
    margin-bottom: 25px;
    animation: pulse 1.5s infinite;
}

.final-score-box {
    background: linear-gradient(135deg, #1a0a2e, #0f0520);
    border: 3px solid #00ffff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

.final-score-label {
    color: #00ffff;
    font-size: 14px;
    margin-bottom: 10px;
}

.final-score-value {
    color: #ffff00;
    font-size: clamp(42px, 10vw, 56px);
    font-weight: bold;
    text-shadow: 0 0 20px #ffff00;
    margin: 10px 0;
}

.new-record-badge {
    background: linear-gradient(135deg, #ffff00, #ff8800);
    color: #000;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    animation: pulse 1s infinite;
}

.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.game-stat {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 10px 5px;
    text-align: center;
}

.stat-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.stat-number {
    color: #ffff00;
    font-size: 18px;
    font-weight: bold;
    display: block;
}

.stat-name {
    display: none;
}

/* ===== RECOMPENSAS SIMPLIFICADAS ===== */
.rewards-summary {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-item:last-of-type {
    border-bottom: none;
}

.reward-label {
    color: #fff;
    font-size: 16px;
}

.reward-value {
    color: #ffff00;
    font-size: 20px;
    font-weight: bold;
}

.level-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 0, 0.1);
    border-radius: 8px;
    color: #fff;
}

.mini-xp-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
}

.mini-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffff00, #ff8800);
    transition: width 0.5s ease;
}

.xp-text {
    color: #00ffff;
    font-size: 14px;
    white-space: nowrap;
}

.level-up-compact {
    background: linear-gradient(135deg, #ffff00, #ff8800);
    color: #000;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    animation: pulse 1s infinite;
}

.main-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-main {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border: 3px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-restart {
    background: #ff0080;
    color: #fff;
    border-color: #00ffff;
}

.btn-home {
    background: linear-gradient(135deg, #666, #333);
    color: #fff;
    border-color: #00ffff;
}

.btn-main:hover, .btn-main:active {
    transform: scale(1.05);
    box-shadow: 0 0 30px currentColor;
}

.action-buttons-compact {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-compact {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    color: #00ffff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-compact:hover {
    background: #00ffff;
    color: #000;
    transform: scale(1.1);
}

/* =========================================== */
/* GARAGE SYSTEM */
/* =========================================== */
#garageScreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0015, #1a0a2e);
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
}

.garage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    border: 2px solid #00ffff;
}

.garage-title {
    font-size: 32px;
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 20px #00ffff;
    font-family: 'Courier New', monospace;
}

.garage-coins {
    font-size: 24px;
    color: #ffaa00;
    font-weight: bold;
    padding: 10px 20px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 10px;
    border: 2px solid #ffaa00;
}

.back-btn {
    background: linear-gradient(135deg, #ff0066, #cc0044);
    border: 2px solid #ff0066;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #ff006680;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.car-card {
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.95), rgba(22, 33, 62, 0.95));
    border: 3px solid;
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.car-card.locked {
    opacity: 0.8;
}

.car-card.equipped {
    border-color: #00ffff !important;
    box-shadow: 0 0 40px #00ffff60;
}

.car-card:not(.locked):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.car-card.tier-common { border-color: #888888; }
.car-card.tier-rare { border-color: #00ccff; }
.car-card.tier-epic { border-color: #cc00ff; }
.car-card.tier-legendary { border-color: #ffaa00; }

.car-tier-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.car-tier-badge.tier-common { 
    background: linear-gradient(135deg, #888, #666); 
    color: #fff;
}
.car-tier-badge.tier-rare { 
    background: linear-gradient(135deg, #00ccff, #0099cc);
    color: #000;
}
.car-tier-badge.tier-epic { 
    background: linear-gradient(135deg, #cc00ff, #9900cc);
    color: #fff;
}
.car-tier-badge.tier-legendary { 
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    color: #000;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 17px;
}

.lock-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.lock-text {
    color: #fff;
    font-size: 13px;
    text-align: center;
    padding: 0 30px;
    line-height: 1.6;
    opacity: 0.9;
}

.car-content {
    padding: 25px;
}

.car-icon {
    font-size: 72px;
    margin: 20px 0;
    text-align: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.car-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 20px currentColor;
}

.car-description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 20px;
    text-align: center;
    min-height: 42px;
    line-height: 1.5;
}

.car-stats {
    margin: 25px 0;
}

.stat-bar {
    margin: 12px 0;
}

.stat-bar .stat-label {
    font-size: 14px;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.stat-bar-container {
    background: rgba(0, 0, 0, 0.7);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.stat-speed .stat-bar-fill { 
    background: linear-gradient(90deg, #ff0080, #ff4080); 
}
.stat-handling .stat-bar-fill { 
    background: linear-gradient(90deg, #00ffff, #40ffff); 
}
.stat-drift .stat-bar-fill { 
    background: linear-gradient(90deg, #ffff00, #ffff40); 
}
.stat-acceleration .stat-bar-fill { 
    background: linear-gradient(90deg, #00ff00, #40ff40); 
}

.car-special {
    background: rgba(255, 170, 0, 0.12);
    border: 2px solid rgba(255, 170, 0, 0.4);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
}

.special-name {
    color: #ffaa00;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

.special-description {
    color: #ddd;
    font-size: 13px;
    line-height: 1.4;
}

.car-action {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-buy {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #00ff44, #00dd22);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
}

.btn-equip {
    background: linear-gradient(135deg, #00ffff, #00cccc);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.btn-equip:hover {
    background: linear-gradient(135deg, #44ffff, #22dddd);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
}

.btn-locked {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.btn-equipped {
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    color: #000;
    cursor: default;
}

.car-requirement {
    text-align: center;
    color: #ff6666;
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
}

/* =========================================== */
/* RESPONSIVE - MÓVIL */
/* =========================================== */
@media (max-width: 768px) {
    .hud-top-bar {
        height: 40px;
        padding: 5px 10px;
    }
    
    .hud-bottom-bar {
        height: 35px;
        padding: 5px 10px;
        gap: 15px;
    }
    
    .level-badge {
        font-size: 12px;
    }
    
    .xp-mini-bar {
        width: 60px;
        height: 5px;
    }
    
    .stat-compact {
        font-size: 14px;
    }
    
    .stat-compact .stat-icon {
        font-size: 16px;
    }
    
    .speed-indicator {
        font-size: 16px;
    }
    
    .bottom-stat {
        font-size: 12px;
    }
    
    .combo-stat {
        font-size: 14px;
    }
    
    .touch-hint {
        font-size: 60px;
    }
    
    .game-over-content {
        padding: 20px 15px;
    }
    
    .final-score-value {
        font-size: 38px;
    }
    
    .game-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .game-stat {
        padding: 10px 6px;
    }
    
    .stat-icon {
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .main-buttons {
        gap: 8px;
    }
    
    .btn-main {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 130px;
    }
    
    #gameTitle {
        font-size: clamp(28px, 7vw, 36px);
    }
    
    #gameSubtitle {
        font-size: clamp(12px, 2.5vw, 16px);
        letter-spacing: 4px;
    }
    
    .big-button, .garage-button-home {
        padding: 15px 35px;
        font-size: clamp(20px, 4vw, 26px);
    }
    
    #logoCanvas {
        width: 300px;
        height: 150px;
    }
    
    .top-bar-clean {
        top: 10px;
        right: 10px;
    }
    
    .profile-dropdown {
        right: 10px;
        min-width: 260px;
    }
    
    .user-name-display {
        max-width: 100px;
        font-size: 14px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .garage-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .garage-title {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .hud-top-bar {
        height: 35px;
        padding: 3px 8px;
    }
    
    .hud-bottom-bar {
        height: 30px;
        padding: 3px 8px;
        gap: 10px;
    }
    
    .level-badge {
        font-size: 11px;
    }
    
    .xp-mini-bar {
        width: 50px;
        height: 4px;
    }
    
    .stat-compact {
        font-size: 12px;
    }
    
    .stat-compact .stat-icon {
        font-size: 14px;
    }
    
    .speed-indicator {
        font-size: 14px;
    }
    
    .bottom-stat {
        font-size: 11px;
    }
    
    .game-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .touch-hint {
        font-size: 50px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hud-top-bar {
        height: 30px;
        padding: 3px 10px;
    }
    
    .hud-bottom-bar {
        height: 30px;
        padding: 3px 10px;
    }
    
    .level-badge {
        font-size: 11px;
    }
    
    .stat-compact {
        font-size: 12px;
    }
    
    .speed-indicator {
        font-size: 13px;
    }
    
    .bottom-stat {
        font-size: 11px;
    }
}
/* =========================================== */
/* BANNER DE ADSENSE - FIX PARA MÓVIL */
/* =========================================== */
#bottomBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: block;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    padding: 8px 0;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

#bottomBanner ins {
    display: block;
    width: 100%;
}

/* Ocultar banner durante el juego y en garaje */
#gameContainer:not([style*="display: none"]) ~ #startScreen #bottomBanner,
#garageScreen:not([style*="display: none"]) ~ #startScreen #bottomBanner {
    display: none !important;
}

/* FIX ADICIONAL PARA MÓVIL */
@media (max-width: 768px) {
    /* Banner más pequeño */
    #bottomBanner {
        padding: 4px 0 !important;
        max-height: 50px !important;
        overflow: hidden !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 50px !important;
        max-height: 50px !important;
        height: 50px !important;
    }
    
    /* Dar espacio al startScreen */
    #startScreen {
        padding-bottom: 85px !important;
    }
    
    /* Reducir margen del logo */
    #logoContainer {
        margin-bottom: 15px !important;
    }
}

@media (max-width: 400px) {
    #bottomBanner {
        padding: 3px 0 !important;
        max-height: 55px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 48px !important;
        max-height: 48px !important;
        height: 48px !important;
    }
    
    #startScreen {
        padding-bottom: 75px !important;
    }
}
/* =========================================== */
/* FIX DEFINITIVO PARA BANNER DE ADSENSE */
/* =========================================== */

/* IMPORTANTE: Añade esto AL FINAL de tu style.css */

#bottomBanner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: block !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    padding: 5px 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.8) !important;
    border-top: 1px solid rgba(0, 255, 255, 0.15) !important;
    max-height: 65px !important;
    overflow: hidden !important;
}

#bottomBanner ins {
    display: block !important;
    width: 100% !important;
}

/* Ocultar durante el juego */
#gameContainer:not([style*="display: none"]) ~ #startScreen #bottomBanner,
#garageScreen:not([style*="display: none"]) ~ #startScreen #bottomBanner {
    display: none !important;
}

/* =========================================== */
/* MÓVIL - Banner MÁS PEQUEÑO */
/* =========================================== */
@media (max-width: 768px) {
    #bottomBanner {
        padding: 3px 0 !important;
        max-height: 55px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 48px !important;
        max-height: 48px !important;
        height: 48px !important;
    }
    
    /* Dar espacio al startScreen */
    #startScreen {
        padding-bottom: 70px !important;
        justify-content: flex-start !important;
        padding-top: 50px !important;
    }
    
    /* Logo más compacto */
    #logoContainer {
        margin-bottom: 10px !important;
        margin-top: 0 !important;
    }
    
    #gameTitle {
        font-size: clamp(28px, 7vw, 36px) !important;
        margin: 10px 0 5px 0 !important;
    }
    
    #gameSubtitle {
        font-size: clamp(11px, 2.5vw, 15px) !important;
        margin-bottom: 10px !important;
    }
    
    #logoCanvas {
        width: 280px !important;
        height: 140px !important;
    }
}

/* Pantallas MUY pequeñas */
@media (max-width: 400px) {
    #bottomBanner {
        padding: 2px 0 !important;
        max-height: 50px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 45px !important;
        max-height: 45px !important;
        height: 45px !important;
    }
    
    #startScreen {
        padding-bottom: 60px !important;
        padding-top: 40px !important;
    }
    
    #logoContainer {
        margin-bottom: 8px !important;
    }
    
    #logoCanvas {
        width: 250px !important;
        height: 125px !important;
    }
}

/* Desktop - Banner normal */
@media (min-width: 769px) {
    #bottomBanner {
        padding: 8px 0 !important;
        max-height: 90px !important;
    }
}
/* =========================================== */
/* FIX DEFINITIVO: BANNER PEQUEÑO EN TODO */
/* =========================================== */

/**
 * PROBLEMA:
 * - En desktop el banner es GIGANTE (300px+)
 * - Tapa el botón de GARAJE
 * - Se ve horrible
 * 
 * SOLUCIÓN:
 * - Forzar tamaño pequeño en TODOS los dispositivos
 * - Máximo 60px en desktop
 * - Máximo 50px en móvil
 */

/* BASE: Banner pequeño por defecto */
#bottomBanner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: block !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    padding: 3px 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.8) !important;
    border-top: 1px solid rgba(0, 255, 255, 0.15) !important;
    
    /* ✅ IMPORTANTE: Forzar altura máxima */
    max-height: 60px !important;
    min-height: 50px !important;
    height: 60px !important;
    overflow: hidden !important;
}

/* Forzar tamaño del anuncio dentro */
#bottomBanner ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-height: 48px !important;
    max-height: 55px !important;
    height: 50px !important;
    overflow: hidden !important;
}

/* Ocultar durante el juego */
#gameContainer:not([style*="display: none"]) ~ #startScreen #bottomBanner,
#garageScreen:not([style*="display: none"]) ~ #startScreen #bottomBanner {
    display: none !important;
}

/* =========================================== */
/* MÓVIL - Aún más pequeño */
/* =========================================== */
@media (max-width: 768px) {
    #bottomBanner {
        padding: 2px 0 !important;
        max-height: 52px !important;
        height: 52px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 45px !important;
        max-height: 48px !important;
        height: 48px !important;
    }
    
    /* Dar espacio al startScreen */
    #startScreen {
        padding-bottom: 65px !important;
        justify-content: flex-start !important;
        padding-top: 50px !important;
    }
    
    /* Logo más compacto */
    #logoContainer {
        margin-bottom: 10px !important;
        margin-top: 0 !important;
    }
    
    #gameTitle {
        font-size: clamp(28px, 7vw, 36px) !important;
        margin: 10px 0 5px 0 !important;
    }
    
    #gameSubtitle {
        font-size: clamp(11px, 2.5vw, 15px) !important;
        margin-bottom: 10px !important;
    }
    
    #logoCanvas {
        width: 280px !important;
        height: 140px !important;
    }
}

/* Pantallas MUY pequeñas */
@media (max-width: 400px) {
    #bottomBanner {
        padding: 2px 0 !important;
        max-height: 50px !important;
        height: 50px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 43px !important;
        max-height: 45px !important;
        height: 45px !important;
    }
    
    #startScreen {
        padding-bottom: 60px !important;
        padding-top: 40px !important;
    }
    
    #logoContainer {
        margin-bottom: 8px !important;
    }
    
    #logoCanvas {
        width: 250px !important;
        height: 125px !important;
    }
}

/* =========================================== */
/* DESKTOP - TAMBIÉN PEQUEÑO (NO GIGANTE) */
/* =========================================== */
@media (min-width: 769px) {
    #bottomBanner {
        padding: 3px 0 !important;
        max-height: 60px !important;  /* ✅ ANTES: 90px - AHORA: 60px */
        height: 60px !important;
    }
    
    #bottomBanner ins.adsbygoogle {
        min-height: 50px !important;
        max-height: 55px !important;
        height: 55px !important;
    }
    
    /* Dar espacio al startScreen en desktop también */
    #startScreen {
        padding-bottom: 75px !important;
    }
}

/* =========================================== */
/* PANTALLAS GRANDES - Mantener pequeño */
/* =========================================== */
@media (min-width: 1200px) {
    #bottomBanner {
        max-height: 60px !important;  /* ✅ NUNCA más de 60px */
        height: 60px !important;
    }
}

/* =========================================== */
/* FORCE: Sobrescribir CUALQUIER estilo inline */
/* =========================================== */
#bottomBanner[style] {
    max-height: 60px !important;
    height: 60px !important;
    padding: 3px 0 !important;
}

#bottomBanner ins.adsbygoogle[style] {
    max-height: 55px !important;
    height: 50px !important;
}
