* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB, #E0F6FF);
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ui-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.score-board {
    background: rgba(0,0,0,0.3);
    padding: 15px 25px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.game-title {
    font-size: 32px;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    letter-spacing: 2px;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}

.menu h1 {
    color: #FFD700;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(255,215,0,0.3);
}

.menu p {
    color: white;
    font-size: 16px;
    margin-bottom: 30px;
}

.menu button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.menu button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.instructions {
    color: #FFD700;
    font-size: 14px;
    margin-top: 20px;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}

.game-over-screen h2 {
    color: #FF6B6B;
    font-size: 48px;
    margin-bottom: 20px;
}

.game-over-screen .final-score {
    color: #FFD700;
    font-size: 32px;
    margin: 20px 0;
}

.game-over-screen button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: bold;
}

.game-over-screen button:hover {
    transform: scale(1.05);
}

/* ===== CONTROLES MÓVILES ===== */
.mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: none; /* Solo visible en móviles */
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
    z-index: 30;
    pointer-events: none;
}

.mobile-controls .left-controls,
.mobile-controls .right-controls {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.control-btn {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 15px rgba(0,0,0,0.35);
    transition: transform 0.1s ease, background 0.2s ease;
}

.control-btn:active {
    transform: scale(0.92);
    background: rgba(102, 126, 234, 0.8);
}

.jump-btn {
    width: 90px;
    height: 90px;
    font-size: 36px;
    background: rgba(255, 107, 157, 0.75);
}

/* Mostrar solo en pantallas pequeñas */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }

    .ui-container {
        font-size: 16px;
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .score-board {
        padding: 10px 15px;
    }

    .game-title {
        font-size: 22px;
    }

    .menu,
    .game-over-screen {
        width: 90%;
        min-width: auto;
        padding: 25px;
    }

    .menu h1,
    .game-over-screen h2 {
        font-size: 32px;
    }
}