body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-size: auto;
    background-repeat: repeat-x;
    background-position: 0 0;
    background-color: #f9f0dc;
    text-align: center;
}

#statusText {
    font-size: 18px;
}

#game-container {
    width: 100%;
    max-width: 1500px;
    height: 600px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    background-image: url(./assets/fondo.game.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-color: black;
    transition: none;
}

#start-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    font-family: Arial, Helvetica, sans-serif;
}

.start-section ul {
    margin: 4px 0 0 0;
    padding: 0;
    font-size: 14px;
    list-style: none;
}

.start-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 4px;
}

.start-section ul li::before {
    content: "🐾";
    position: absolute;
    left: 2px;
    top: 0;
    font-size: 14px;
}

.start-cta {
    margin-top: 18px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c4300;
}

.start-cta strong {
    padding: 2px 6px;
    border-radius: 6px;
    background: linear-gradient(to bottom, #a4c76b, #7ed111);
    border: 1px solid #d8b267;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.start-panel {
    background: #e6ce9d;
    padding: 30px;
    border-radius: 26px;
    border: 12px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25),
        inset 0 2px 5px rgba(255, 255, 255, 0.5);
    text-align: center;
}

.start-panel .start-section {
    border-top: 5px solid rgba(218, 128, 44, 0.4);
    padding-top: 20px;
    margin-top: 20px;

}

.start-panel h2 {
    display: inline-block;
    width: 260px;

    margin: 14px auto 8px auto;
    padding: 8px 0;

    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    color: #e9d5b1;
    text-shadow: 0 1px 2px rgba(240, 188, 17, 0.6);

    background: linear-gradient(to bottom, #a4c76b, #7ed111);
    border-radius: 18px;
    border: 1px solid rgba(183, 234, 243, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.controls-list {
    list-style: none;
    padding: 0;
    margin: 10px auto;
    max-width: 260px;
}

.controls-list li {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 6px;
}

.controls-list .key {
    font-weight: bold;
    text-align: right;
}

.controls-list .action {
    text-align: left;
}

.life-row {
    justify-content: center;
}

#replayButton {
    padding: 10px 26px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    color: #ffffff;
    background: linear-gradient(to bottom, #ff9b3b, #e1641a);
    border: 2px solid #fff2d0;
    border-radius: 999px;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;

    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

#replayButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    filter: brightness(1.05);
}

#replayButton:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    filter: brightness(0.97);
}

.start-title {
    display: block;
    width: 260px;
    margin: 0 auto 10px auto;
    padding: 8px 0;

    text-align: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #e9d5b1;
    text-shadow: 0 1px 2px rgba(240, 188, 17, 0.6);

    background: linear-gradient(to bottom, #a4c76b, #7ed111);
    border-radius: 18px;
    border: 1px solid rgba(183, 234, 243, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.start-subtitle {
    margin: 0 0 16px 0;
    font-size: 14px;
    text-align: center;
    color: #f11f1f;
}

.start-section {
    margin-bottom: 14px;
}

.start-section h2 {
    margin: 6px 0;
}

.start-section ul {
    margin: 4px 0 0 18px;
    padding: 0;
    font-size: 14px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    font-size: 14px;
}

.legend-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid #333;
    flex-shrink: 0;
}

.life-icon {
    font-size: 20px;
    margin-right: 4px;
}

.start-cta {
    margin-top: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
}

.game-wrapper {
    max-width: 1500px;
    margin: 40px auto 0 auto;
    padding-top: 10px 0;
}

.game-title {
    display: block;
    width: 300px;
    margin: 0px auto 12px auto;
    padding: 10px 0;

    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e9d5b1;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(240, 188, 17, 0.6);

    background: linear-gradient(to bottom, #a4c76b, #7ed111);
    border-radius: 18px;
    border: 1px solid rgba(183, 234, 243, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.game-score {
    margin-top: 4px;
    margin-bottom: 20px;
}

#scoreText {
    display: block;
    width: 260px;
    margin: 0 auto;
    padding: 8px 0;

    text-align: center;
    color: #664705;
    font-weight: 700;
    letter-spacing: 0.04em;

    background: linear-gradient(to bottom, #eedda4, #f8d870);
    border-radius: 18px;
    border: 1px solid rgba(128, 95, 4, 0.486);
    box-shadow: 0 4px 10px rgba(18, 71, 2, 0.4);
}

.game-header {
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

#gus {
    position: absolute;
    transition: none;
    width: 80px;
    height: 80px;
    background-image: url(./assets/GUSZILLA.png);
    background-size: 80px 80px;
    background-position: center;
    background-repeat: no-repeat;
}

.gus-right {
    transform: scaleX(1);
}

.gus-left {
    transform: scaleX(-1);
}

#livesContainer {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.heart {
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 24px;
    text-align: center;
    color: red;
}

#progressContainer {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

#progressBar {
    width: 200px;
    height: 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ffffff;
}

#progressFill {
    width: 0%;
    height: 100%;
    background: #4caf50;
    transition: width 0.2s linear;
}

.treat {
    height: 40px;
    width: 40px;
    position: absolute;
    pointer-events: none;
    animation: spin 1s linear infinite;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#start-screen .treat {
    animation: none !important;
    transform: none !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.treat--normal {
    background-image: url(./assets/hueso\ normal\ .png);
}

.treat--bonus {
    background-image: url(./assets/hueso\ bonus.png);
}

.treat--fast {
    background-image: url(./assets/hueso\ fast.png);
}

.treat--rare {
    background-image: url(./assets/hueso\ rare.png);
}

.treat--cookie {
    background-image: url(./assets/hueso\ cookie.png);
}

.playing .treat {
    width: 80px !important;
    height: 80px !important;
}

.enemy {
    position: absolute;
    background-size: cover;
    background-repeat: no-repeat;
    height: 30px;
    width: 30px;
}

.enemy1-easy {
    background-image: url(./assets/OREO.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.enemy1-medium {
    background-image: url(./assets/OREO.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.enemy1-hard {
    background-image: url(./assets/OREO.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.enemy2-easy {
    background-image: url(./assets/PAPAYA.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.enemy2-medium {
    background-image: url(./assets/PAPAYA.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.enemy2-hard {
    background-image: url(./assets/PAPAYA.png);
    background-size: contain;
    background-repeat: no-repeat;
}