* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    font-family: 'Arial', sans-serif;
}

.game-container {
    position: relative;
    width: 900px;
    height: 500px;
    border: 3px solid #333;
    border-radius: 10px;
    overflow: hidden;
    margin: auto;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 50%, #F4E4BC 50%, #D4A574 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Sky Background */
.sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 100%);
    z-index: 1;
}

/* Clouds Container */
.clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 2;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.8;
    z-index: 2;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50px;
}

.cloud:before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud:after {
    width: 60px;
    height: 60px;
    top: -35px;
    right: 10px;
}

.cloud1 {
    width: 80px;
    height: 30px;
    top: 20%;
}

.cloud2 {
    width: 100px;
    height: 35px;
    top: 10%;
}

.cloud3 {
    width: 70px;
    height: 25px;
    top: 30%;
}

/* Ground */
.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, #F4E4BC 0%, #D4A574 100%);
    z-index: 3;
    border-top: 2px solid #B8956A;
}

.ground-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: repeating-linear-gradient(90deg,
            transparent,
            transparent 50px,
            rgba(0, 0, 0, 0.05) 50px,
            rgba(0, 0, 0, 0.05) 52px);
    animation: groundMove 1s linear infinite;
}

@keyframes groundMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Dino */
.dino {
    position: absolute;
    bottom: 40%;
    left: 50px;
    width: 94px;
    height: 94px;
    background-image: url("images/trex.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    transition: bottom 0.1s linear;
    mix-blend-mode: multiply;
}

/* Obstacle */
.obstacle {
    position: absolute;
    bottom: 40%;
    right: 0;
    background-image: url('images/1_Cactus_Chrome_Dino.webp.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    height: 77px;
    width: 77px;
    z-index: 10;
}

/* Score Container */
.score-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    text-align: right;
    color: #333;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.score-container p {
    margin: 5px 0;
}

#highScore {
    color: #FF6B6B;
    font-size: 16px;
}

/* Game Over Overlay */
.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.game-over-overlay.show {
    display: flex;
}

.game-over-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.game-over-content h2 {
    font-size: 36px;
    color: #FF6B6B;
    margin-bottom: 20px;
}

.final-score {
    font-size: 24px;
    color: #333;
    margin: 15px 0;
}

.final-score span {
    color: #4ECDC4;
    font-weight: bold;
}

.high-score-display {
    font-size: 20px;
    color: #666;
    margin: 15px 0;
}

.high-score-display span {
    color: #FF6B6B;
    font-weight: bold;
}

.restart-btn,
.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.restart-btn:hover,
.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.restart-btn:active,
.start-btn:active {
    transform: translateY(0);
}

.instructions-text {
    margin-top: 15px;
    color: #888;
    font-size: 14px;
}

/* Start Screen */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.start-screen.hidden {
    display: none;
}

.start-content {
    background: white;
    padding: 50px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

.start-content h1 {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
}

.start-content p {
    font-size: 18px;
    color: #666;
    margin: 10px 0;
}