/* KAWAII RUNNER - Estilos Principales */
:root {
    --pink-light: #FFB6C1;
    --pink-medium: #FF91A4;
    --pink-dark: #FF6B8A;
    --purple-light: #E6E6FA;
    --purple-medium: #DDA0DD;
    --blue-light: #87CEEB;
    --mint-green: #98FB98;
    --cream: #FFF8DC;
    --character-body: #FFE4EC;
    --character-blush: #FFB6C1;
    --character-eyes: #4A3728;
    --ground-color: #98D8A0;
    --text-dark: #5D4E60;
    --text-light: #FFFFFF;
    --shadow-soft: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --font-main: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
    --ground-height: 60px;
    --player-size: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: linear-gradient(135deg, #FFE4EC 0%, #FFF0F5 100%);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.screen.active {
    display: flex;
}

#start-screen {
    background: linear-gradient(180deg, #FFE4EC 0%, #FFF0F5 50%, #E8F5E9 100%);
    flex-direction: column;
}

.start-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-cloud {
    position: absolute;
    font-size: 3rem;
    opacity: 0.6;
    animation: float-cloud 15s ease-in-out infinite;
}

.cloud1 {
    top: 10%;
    left: 10%;
}

.cloud2 {
    top: 20%;
    right: 15%;
    animation-delay: -5s;
    font-size: 2.5rem;
}

.cloud3 {
    top: 35%;
    left: 5%;
    animation-delay: -10s;
    font-size: 2rem;
}

@keyframes float-cloud {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(30px) translateY(-10px);
    }
}

.floating-star {
    position: absolute;
    font-size: 1.5rem;
    animation: twinkle 2s ease-in-out infinite;
}

.star1 {
    top: 15%;
    right: 20%;
}

.star2 {
    top: 40%;
    left: 15%;
    animation-delay: -0.7s;
}

.star3 {
    top: 25%;
    right: 35%;
    animation-delay: -1.4s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.start-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    z-index: 5;
    max-width: 400px;
    width: 90%;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pink-dark);
    text-shadow: 3px 3px 0 var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: title-bounce 2s ease-in-out infinite;
}

.title-emoji {
    animation: spin-flower 4s linear infinite;
}

@keyframes title-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin-flower {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.preview-character {
    width: 130px;
    height: 130px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 240, 245, 0.8), var(--character-body));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 12px 35px var(--shadow-soft),
                inset -3px -3px 8px rgba(0,0,0,0.08),
                inset 2px 2px 4px rgba(255,255,255,0.3);
    animation: character-idle 1.5s ease-in-out infinite;
    border: 4px solid var(--pink-medium);
    position: relative;
    overflow: visible;
}

/* Oreja izquierda preview */
.preview-character::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 18px;
    width: 24px;
    height: 32px;
    background: var(--character-body);
    border: 4px solid var(--pink-medium);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 4px 10px var(--shadow-soft),
                inset -2px -2px 3px rgba(0,0,0,0.1),
                inset 2px 2px 3px rgba(255,255,255,0.2);
}

/* Oreja derecha preview */
.preview-character::after {
    content: '';
    position: absolute;
    top: -10px;
    right: 18px;
    width: 24px;
    height: 32px;
    background: var(--character-body);
    border: 4px solid var(--pink-medium);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 4px 10px var(--shadow-soft),
                inset -2px -2px 3px rgba(0,0,0,0.1),
                inset 2px 2px 3px rgba(255,255,255,0.2);
}

@keyframes character-idle {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05) translateY(-5px);
    }
}

.kawaii-face {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preview-face {
    transform: scale(1.15);
}

.kawaii-eyes {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.kawaii-eye {
    width: 18px;
    height: 22px;
    background: var(--character-eyes);
    border-radius: 60% 60% 50% 50%;
    position: relative;
    animation: blink 3s ease-in-out infinite;
    border: 2px solid var(--pink-medium);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15),
                inset -1px -1px 3px rgba(0,0,0,0.2);
}

.kawaii-eye::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.kawaii-eye::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--pink-medium);
    top: -4px;
    border-radius: 50%;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.1);
}

@keyframes blink {

    0%,
    45%,
    55%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

.kawaii-mouth {
    width: 16px;
    height: 8px;
    border: 2.5px solid var(--character-eyes);
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: 6px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.05) 100%);
    position: relative;
}

.kawaii-mouth::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 3px;
    background: var(--character-eyes);
    left: 50%;
    top: -2px;
    transform: translateX(-50%);
    border-radius: 50%;
}

.kawaii-blush {
    position: absolute;
    width: 26px;
    height: 14px;
    background: radial-gradient(ellipse 15px 10px at 50% 50%, rgba(255, 182, 193, 0.9), rgba(255, 182, 193, 0.2));
    border-radius: 50%;
    opacity: 0.85;
    top: 45%;
    box-shadow: 0 1px 3px rgba(255, 107, 138, 0.15);
}

.kawaii-blush.left {
    left: 2%;
}

.kawaii-blush.right {
    right: 2%;
}

.language-selector {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
}

.lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border: 3px solid transparent;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.lang-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
    border-color: var(--pink-medium);
    background: var(--pink-light);
}

.flag-kawaii {
    width: 60px;
    height: 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-soft);
    border: 3px solid white;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flag-kawaii.spain {
    background: linear-gradient(to bottom, #FF1A1A 0%, #FF1A1A 25%, #FFD700 25%, #FFD700 75%, #FF1A1A 75%, #FF1A1A 100%);
}

.flag-kawaii.uk {
    background: #00247D;
    background-image:
        linear-gradient(135deg, transparent 40%, white 40%, white 60%, transparent 60%),
        linear-gradient(45deg, transparent 40%, white 40%, white 60%, transparent 60%);
}

.flag-kawaii.uk::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 8px;
    background: #CF142B;
    transform: translateX(-50%);
    border-left: 2px solid white;
    border-right: 2px solid white;
    z-index: 1;
}

.flag-kawaii.uk::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: #CF142B;
    transform: translateY(-50%);
    border-top: 2px solid white;
    border-bottom: 2px solid white;
    z-index: 1;
}

.flag-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.flag-eyes {
    display: flex;
    gap: 12px;
    margin-bottom: 2px;
}

.flag-eye {
    width: 6px;
    height: 6px;
    background: #4A3728;
    border-radius: 50%;
    display: block;
    position: relative;
}

.flag-eye::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
}

.flag-smile {
    width: 10px;
    height: 5px;
    border: 2px solid #4A3728;
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: 1px;
}

.flag-blush {
    position: absolute;
    width: 8px;
    height: 4px;
    background: rgba(255, 107, 138, 0.4);
    border-radius: 50%;
    top: 55%;
}

.flag-blush.left {
    left: 20%;
}

.flag-blush.right {
    right: 20%;
}

.lang-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
    text-shadow: 1px 1px 0 white;
}

.sound-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 3px solid var(--purple-medium);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.sound-btn:hover {
    background: var(--purple-light);
    transform: scale(1.05);
}

.sound-btn.muted {
    opacity: 0.6;
    border-color: #ccc;
}

#sound-icon {
    font-size: 1.3rem;
}

.start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem 3rem;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-main);
    color: var(--text-light);
    background: linear-gradient(135deg, var(--pink-medium) 0%, var(--pink-dark) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 138, 0.4), 0 4px 0 #E05A7A;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 138, 0.5), 0 6px 0 #E05A7A;
}

.start-btn:active {
    transform: translateY(2px);
    box-shadow: 0 4px 15px rgba(255, 107, 138, 0.4), 0 2px 0 #E05A7A;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(180deg);
    }
}

.instructions {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    text-align: center;
}

.instructions p {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

/* PANTALLA DE JUEGO */
#game-screen {
    background: linear-gradient(180deg, #FFE4EC 0%, #FFF0F5 50%, #E8F5E9 100%);
}

.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    bottom: var(--ground-height);
    left: 0;
    width: 200%;
    background-repeat: repeat-x;
    will-change: transform;
}

.layer-back {
    height: 60%;
    background: radial-gradient(ellipse 80px 50px at 10% 70%, rgba(255, 255, 255, 0.8) 0%, transparent 70%), radial-gradient(ellipse 100px 60px at 30% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 70%), radial-gradient(ellipse 70px 45px at 50% 65%, rgba(255, 255, 255, 0.8) 0%, transparent 70%), radial-gradient(ellipse 90px 55px at 70% 55%, rgba(255, 255, 255, 0.7) 0%, transparent 70%), radial-gradient(ellipse 75px 48px at 90% 60%, rgba(255, 255, 255, 0.8) 0%, transparent 70%), radial-gradient(ellipse 80px 50px at 110% 70%, rgba(255, 255, 255, 0.8) 0%, transparent 70%), radial-gradient(ellipse 100px 60px at 130% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 70%), radial-gradient(ellipse 70px 45px at 150% 65%, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    animation: parallax-back 30s linear infinite;
}

.layer-mid {
    height: 40%;
    background: radial-gradient(ellipse 150px 120px at 5% 100%, #E6E6FA 0%, transparent 70%), radial-gradient(ellipse 200px 150px at 25% 100%, #DDA0DD 0%, transparent 70%), radial-gradient(ellipse 180px 130px at 45% 100%, #D8BFD8 0%, transparent 70%), radial-gradient(ellipse 160px 140px at 65% 100%, #E6A8D7 0%, transparent 70%), radial-gradient(ellipse 190px 145px at 85% 100%, #E6E6FA 0%, transparent 70%), radial-gradient(ellipse 150px 120px at 105% 100%, #E6E6FA 0%, transparent 70%), radial-gradient(ellipse 200px 150px at 125% 100%, #DDA0DD 0%, transparent 70%), radial-gradient(ellipse 180px 130px at 145% 100%, #D8BFD8 0%, transparent 70%);
    animation: parallax-mid 20s linear infinite;
}

.layer-front {
    height: 25%;
    background: radial-gradient(ellipse 60px 50px at 8% 100%, #7DC88C 0%, transparent 70%), radial-gradient(ellipse 50px 45px at 20% 100%, #98FB98 0%, transparent 70%), radial-gradient(ellipse 55px 48px at 35% 100%, #90EE90 0%, transparent 70%), radial-gradient(ellipse 65px 52px at 52% 100%, #7DC88C 0%, transparent 70%), radial-gradient(ellipse 45px 40px at 68% 100%, #98FB98 0%, transparent 70%), radial-gradient(ellipse 58px 50px at 82% 100%, #90EE90 0%, transparent 70%), radial-gradient(ellipse 52px 46px at 95% 100%, #7DC88C 0%, transparent 70%), radial-gradient(ellipse 60px 50px at 108% 100%, #7DC88C 0%, transparent 70%), radial-gradient(ellipse 50px 45px at 120% 100%, #98FB98 0%, transparent 70%);
    animation: parallax-front 10s linear infinite;
}

@keyframes parallax-back {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes parallax-mid {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes parallax-front {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.score-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px var(--shadow-soft);
    border: 3px solid var(--pink-light);
}

.score-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pink-dark);
    min-width: 40px;
    text-align: center;
}

.hud-buttons {
    display: flex;
    gap: 0.8rem;
}

.hud-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--pink-light);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px var(--shadow-soft);
    transition: all 0.2s ease;
}

.hud-btn:hover {
    transform: scale(1.1);
    background: var(--pink-light);
}

.hud-btn:active {
    transform: scale(0.95);
}

#game-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
}

#ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--ground-height);
    background: linear-gradient(to bottom, var(--ground-color) 0%, #7BC88C 50%, #5BA86C 100%);
    border-top: 4px solid #5BA86C;
}

.player {
    position: absolute;
    bottom: var(--ground-height);
    left: 80px;
    width: var(--player-size);
    height: var(--player-size);
    z-index: 50;
    will-change: transform;
}

.player-body {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 240, 245, 0.8), var(--character-body));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px var(--shadow-medium),
                inset -3px -3px 8px rgba(0,0,0,0.08),
                inset 2px 2px 4px rgba(255,255,255,0.3);
    border: 3px solid var(--pink-medium);
    position: relative;
    overflow: visible;
}

/* Oreja izquierda */
.player-body::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 15px;
    width: 20px;
    height: 26px;
    background: var(--character-body);
    border: 3px solid var(--pink-medium);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 3px 8px var(--shadow-soft),
                inset -1px -1px 2px rgba(0,0,0,0.1),
                inset 1px 1px 2px rgba(255,255,255,0.2);
}

/* Oreja derecha */
.player-body::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 20px;
    height: 26px;
    background: var(--character-body);
    border: 3px solid var(--pink-medium);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 3px 8px var(--shadow-soft),
                inset -1px -1px 2px rgba(0,0,0,0.1),
                inset 1px 1px 2px rgba(255,255,255,0.2);
}

.player-body .kawaii-face {
    transform: scale(0.9);
}

.player-feet {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
}

.foot {
    width: 16px;
    height: 13px;
    background: var(--pink-medium);
    border-radius: 50%;
    animation: walk 0.3s ease-in-out infinite alternate;
    box-shadow: 0 2px 5px var(--shadow-soft);
}

.foot.left {
    animation-delay: 0s;
}

.foot.right {
    animation-delay: 0.15s;
}

@keyframes walk {
    0% {
        transform: translateY(0) rotate(-5deg);
    }

    100% {
        transform: translateY(-3px) rotate(5deg);
    }
}

.player.jumping .foot {
    animation: none;
    transform: rotate(0);
}

.player.jumping .player-body {
    animation: squish 0.3s ease;
}

@keyframes squish {
    0% {
        transform: scaleX(1) scaleY(1);
    }

    30% {
        transform: scaleX(1.1) scaleY(0.85);
    }

    60% {
        transform: scaleX(0.95) scaleY(1.1);
    }

    100% {
        transform: scaleX(1) scaleY(1);
    }
}

#obstacles-container {
    position: absolute;
    bottom: var(--ground-height);
    left: 0;
    right: 0;
    height: calc(100% - var(--ground-height));
    pointer-events: none;
}

.obstacle {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    animation: obstacle-bounce 0.5s ease-in-out infinite;
    will-change: transform;
}

/* Tipo SIMPLE: Un salto, tamaño grande */
.obstacle.height-simple {
    height: 100px;
}

/* Tipo TALL: Alto, doble salto requerido, no se puede pasar */
.obstacle.height-tall {
    height: 200px;
}

/* Tipo SPLIT: Dividido en dos partes */
.obstacle.height-split {
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
}

@keyframes obstacle-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.obstacle-body {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.obstacle.height-simple .obstacle-body {
    width: 80px;
    height: 80px;
}

.obstacle.height-tall .obstacle-body {
    width: 90px;
    height: 180px;
}

.obstacle.height-split .bottom-part {
    width: 90px;
    height: 60px;
}

.obstacle.height-split .top-part {
    width: 90px;
    height: 60px;
}

.obstacle-face {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.obstacle-eyes {
    display: flex;
    gap: 8px;
}

.obstacle-eye {
    width: 6px;
    height: 8px;
    background: #4A3728;
    border-radius: 50%;
    position: relative;
}

.obstacle-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 1px;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
}

.obstacle-mouth {
    width: 10px;
    height: 5px;
    border: 2px solid #4A3728;
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: 2px;
}

.obstacle-blush {
    position: absolute;
    width: 10px;
    height: 5px;
    background: rgba(255, 182, 193, 0.7);
    border-radius: 50%;
    top: 55%;
}

.obstacle-blush.left {
    left: 8%;
}

.obstacle-blush.right {
    right: 8%;
}

/* Altura de los obstáculos */
.obstacle.height-2 {
    bottom: 50px;
}

/* Chucherías coloridas */
/* Lollipop - Rojo y blanco */
.obstacle.lollipop .obstacle-body {
    width: 70px;
    height: 90px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, #FF3344 100%);
    border-radius: 50%;
    border: 5px solid #FF0000;
    box-shadow: 0 0 20px rgba(255, 51, 68, 0.7);
    position: relative;
}

.obstacle.lollipop .obstacle-body::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 30px;
    background: #8B6F47;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
}

/* Candy - Caramelo envuelto */
.obstacle.candy .obstacle-body {
    width: 55px;
    height: 75px;
    background: linear-gradient(45deg, #FF6EC7 0%, #FF6EC7 25%, #FFFFFF 25%, #FFFFFF 50%, #00D4FF 50%, #00D4FF 75%, #FFFFFF 75%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 110, 199, 0.6);
    border: 3px solid #FF4488;
}

/* Cupcake - Pastelito rosa */
.obstacle.cupcake .obstacle-body {
    width: 65px;
    height: 85px;
    background: linear-gradient(to bottom, #FFB6E1 0%, #FF90CC 45%, #D4A574 45%, #C49060 100%);
    border-radius: 20px 20px 15px 15px;
    box-shadow: 0 5px 20px rgba(255, 182, 225, 0.7);
    position: relative;
}

.obstacle.cupcake .obstacle-body::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), #FFB6E1);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 10% 10%;
}

/* Donut - Dona colorida */
.obstacle.donut .obstacle-body {
    width: 75px;
    height: 75px;
    background: #D4A574;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(212, 165, 116, 0.6),
                inset 0 0 0 18px #FFF8DC,
                inset 0 0 0 23px #D4A574;
    border: 4px solid rgba(255, 182, 225, 0.5);
    position: relative;
}

.obstacle.donut .obstacle-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 182, 225, 0.7) 50%, transparent 70%);
    border-radius: 50%;
}

/* Chocolate - Chocolate oscuro brillante */
.obstacle.chocolate .obstacle-body {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #6B4423 0%, #4A2C15 50%, #8B5A3C 100%);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(75, 44, 21, 0.7),
                inset -2px -2px 6px rgba(0,0,0,0.4);
    border: 3px solid #3D2817;
}

.obstacle.chocolate .obstacle-body::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.25), transparent);
    border-radius: 5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Candy Cane - Bastón de caramelo */
.obstacle.candy-cane .obstacle-body {
    width: 55px;
    height: 85px;
    background: repeating-linear-gradient(45deg, #FF0000, #FF0000 12px, #FFFFFF 12px, #FFFFFF 24px);
    border-radius: 0 35px 15px 0;
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.6);
    border: 3px solid #CC0000;
}

/* Ice Cream - Helado */
.obstacle.ice-cream .obstacle-body {
    width: 65px;
    height: 85px;
    background: linear-gradient(to bottom, #FFB6E1 0%, #FF90CC 40%, #D4A574 40%, #C49060 100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 5px 20px rgba(255, 182, 225, 0.7);
    position: relative;
}

.obstacle.ice-cream .obstacle-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.5) 0%, transparent 50%);
    border-radius: 20px 20px 0 0;
    top: 0;
}

.obstacle.ice-cream .obstacle-body::after {
    content: '';
    position: absolute;
    width: 55px;
    height: 20px;
    background: linear-gradient(45deg, #C49060 25%, #A67C52 50%, #9B6D45 75%);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    clip-path: polygon(20% 0%, 80% 0%, 90% 100%, 10% 100%);
}

/* Gummy - Gominola */
.obstacle.gummy .obstacle-body {
    width: 50px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #FF69B4, #FF1493);
    border-radius: 50% 50% 40% 40%;
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.7),
                inset -1px -1px 4px rgba(0,0,0,0.25);
    border: 3px solid rgba(255, 20, 147, 0.9);
}

/* Cake - Pastel */
.obstacle.cake .obstacle-body {
    width: 60px;
    height: 80px;
    background: linear-gradient(to bottom, #FFB6E1 0%, #FF90CC 30%, #FF90CC 100%);
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(255, 182, 225, 0.7);
    border: 3px solid #FF69B4;
    position: relative;
}

.obstacle.cake .obstacle-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background: #FFD700;
    top: 25%;
    left: 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.obstacle.cake .obstacle-body::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 16px;
    background: #FF6347;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 0;
}

/* Cookie - Galleta */
.obstacle.cookie .obstacle-body {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #D4A574, #A0522D);
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(160, 82, 45, 0.7),
                inset -2px -2px 6px rgba(0,0,0,0.35);
    border: 3px solid #8B4513;
    position: relative;
}

.obstacle.cookie .obstacle-body::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #6B4423;
    border-radius: 50%;
    top: 25%;
    left: 20%;
}

.obstacle.cookie .obstacle-body::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #6B4423;
    border-radius: 50%;
    bottom: 25%;
    right: 20%;
}

/* PANTALLA GAME OVER */
#gameover-screen {
    background: linear-gradient(180deg, rgba(255, 228, 236, 0.95) 0%, rgba(255, 240, 245, 0.95) 100%);
    backdrop-filter: blur(5px);
}

.gameover-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    box-shadow: 0 10px 40px var(--shadow-medium);
    border: 4px solid var(--pink-light);
    max-width: 350px;
    width: 90%;
    animation: pop-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop-in {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.gameover-emoji {
    font-size: 4rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-10px);
    }

    80% {
        transform: translateX(10px);
    }
}

#gameover-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pink-dark);
    text-align: center;
}

#gameover-message {
    font-size: 1rem;
    color: var(--text-dark);
    text-align: center;
}

.final-score {
    background: var(--pink-light);
    padding: 1rem 2rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

#final-score-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

#final-score-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pink-dark);
}

.gameover-character {
    width: 80px;
    height: 80px;
    background: var(--character-body);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--pink-medium);
    animation: sad-bounce 1s ease-in-out infinite;
}

@keyframes sad-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

.sad-face .kawaii-eyes.sad .kawaii-eye {
    transform: scaleY(0.5) translateY(3px);
}

.sad-face .kawaii-mouth.sad {
    transform: rotate(180deg);
    margin-top: 8px;
}

.tear {
    position: absolute;
    width: 8px;
    height: 12px;
    background: #87CEEB;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: 48%;
    animation: tear-drop 1.5s ease-in-out infinite;
}

.tear.left {
    left: 20%;
    animation-delay: 0s;
}

.tear.right {
    right: 20%;
    animation-delay: 0.75s;
}

@keyframes tear-drop {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(15px);
    }
}

.menu-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid var(--purple-medium);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: var(--purple-light);
    transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    :root {
        --player-size: 55px;
        --ground-height: 50px;
    }

    .game-title {
        font-size: 1.8rem;
    }

    .preview-character {
        width: 90px;
        height: 90px;
    }

    .start-btn {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }

    .instructions p {
        font-size: 0.9rem;
    }

    .score-container {
        padding: 0.6rem 1rem;
    }

    .score-label {
        font-size: 0.85rem;
    }

    .score-value {
        font-size: 1.2rem;
    }

    .pause-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .player {
        left: 50px;
    }

    .gameover-container {
        padding: 1.5rem;
        gap: 1rem;
    }

    #gameover-title {
        font-size: 1.5rem;
    }

    #final-score-value {
        font-size: 2rem;
    }

    .obstacle-body {
        transform: scale(0.8);
    }
}

@media (max-width: 400px) {
    :root {
        --player-size: 45px;
        --ground-height: 45px;
    }

    .game-title {
        font-size: 1.5rem;
    }

    .start-container {
        gap: 1rem;
    }

    .preview-character {
        width: 70px;
        height: 70px;
    }

    .flag-kawaii {
        width: 40px;
        height: 28px;
    }

    .player {
        left: 30px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .start-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        padding: 1rem;
        gap: 0.8rem;
    }

    .game-title {
        width: 100%;
        font-size: 1.5rem;
        text-align: center;
    }

    .preview-character {
        width: 60px;
        height: 60px;
    }

    .instructions {
        display: none;
    }

    :root {
        --ground-height: 40px;
        --player-size: 50px;
    }
}