* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 15px;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7f2;
    color: #333;
    user-select: none;
}

.game-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}


/* ============================
   HEADER
============================ */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.game-header h1 {
    margin: 0 0 5px;
    font-size: 30px;
}

.game-header p {
    margin: 0;
    color: #666;
}

.score-board {
    display: flex;
    gap: 12px;
}

.score-board > div {
    min-width: 75px;
    padding: 10px 15px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.score-label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
}

.score-board strong {
    font-size: 22px;
}


/* ============================
   GAME CONTAINER
============================ */

.game-container {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 20px;
    background:
        linear-gradient(
            to bottom,
            #dff3ff 0%,
            #eaf8ff 65%,
            #dff0cf 65%,
            #dff0cf 100%
        );
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}


/* ============================
   BACKGROUND CLOUDS
============================ */

.sky-cloud {
    position: absolute;
    font-size: 55px;
    opacity: 0.8;
    pointer-events: none;
}

.cloud-one {
    top: 30px;
    left: 10%;
}

.cloud-two {
    top: 80px;
    left: 55%;
    font-size: 40px;
}

.cloud-three {
    top: 35px;
    right: 10%;
    font-size: 45px;
}


/* ============================
   RABBIT
============================ */

.rabbit {
    position: absolute;
    left: 12%;
    bottom: 70px;

    font-size: 65px;
    line-height: 1;

    z-index: 10;

    transform: scaleX(-1);
}


/* ============================
   GROUND
============================ */

.ground {
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 75px;

    background:
        repeating-linear-gradient(
            90deg,
            #b8d8a6 0,
            #b8d8a6 30px,
            #a9cd94 30px,
            #a9cd94 60px
        );

    border-top: 5px solid #8dbf76;
}


/* ============================
   OBSTACLES
============================ */

.obstacle {
    position: absolute;
    bottom: 75px;
    right: -300px;

    min-width: 110px;
    max-width: 180px;

    padding: 8px 14px;

    text-align: center;

    background: white;
    border-radius: 30px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    font-size: 13px;
    font-weight: bold;

    z-index: 5;
}

.obstacle::before {
    content: "☁️";
    display: inline-block;
    font-size: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ============================
   START SCREEN
============================ */

.start-screen {
    position: absolute;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 30;

    background: rgba(255, 255, 255, 0.35);
}

.start-screen.hidden {
    display: none;
}

.start-card {
    width: 90%;
    max-width: 360px;

    padding: 30px;

    text-align: center;

    background: white;
    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.rabbit-preview {
    font-size: 70px;
    margin-bottom: 10px;
}

.start-card h2 {
    margin: 0 0 10px;
}

.start-card p {
    color: #666;
    line-height: 1.5;
}

.start-card button,
.game-over-card button {
    border: none;
    border-radius: 10px;

    padding: 13px 28px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    background: #333;
    color: white;

    transition: transform 0.2s ease;
}

.start-card button:hover,
.game-over-card button:hover {
    transform: translateY(-2px);
}


/* ============================
   GAME OVER
============================ */

.game-over-screen {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 100;

    background: rgba(0, 0, 0, 0.35);

    justify-content: center;
    align-items: center;

    padding: 20px;
}

.game-over-screen.show {
    display: flex;
}

.game-over-card {
    width: 100%;
    max-width: 400px;

    padding: 35px 25px;

    text-align: center;

    background: white;
    border-radius: 22px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.game-over-rabbit {
    font-size: 70px;
}

.game-over-card h2 {
    margin: 10px 0;
}

.game-over-message {
    color: #666;
    line-height: 1.5;
}

.final-score {
    margin-top: 20px;
    font-size: 20px;
}

.final-best {
    margin: 8px 0 25px;
    color: #666;
}


/* ============================
   FOOTER
============================ */

.game-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;

    padding: 15px;

    color: #666;
    font-size: 14px;
}


/* ============================
   MOBILE
============================ */

@media (max-width: 650px) {

    body {
        padding: 8px;
    }

    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-header h1 {
        font-size: 25px;
    }

    .score-board {
        width: 100%;
    }

    .score-board > div {
        flex: 1;
    }

    .game-container {
        height: 380px;
    }

    .rabbit {
        font-size: 55px;
        left: 8%;
    }

    .obstacle {
        min-width: 110px;
        max-width: 170px;
        font-size: 13px;
        padding: 10px;
    }

}