/* --- Global Settings --- */
:root {
    --primary-color: #F97316;
    --dark-blue: #1E293B;
    --light-gray: #F1F5F9;
    --white: #FFFFFF;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--dark-blue);
    color: var(--light-gray);
    padding-top: 10vh; /* Give some space at the top */
    text-align: center; /* Center the main container */
}

/* --- Main Container & Content --- */
.container {
    text-align: center;
    padding: 20px;
}

.icon-container {
    margin-bottom: 30px;
}

.gear {
    font-size: 80px;
    line-height: 1;
    color: var(--primary-color);
    /* Animation: Spin */
    animation: spin 20s linear infinite;
}

.brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: -10px 0 20px 0;
    /* Animation: Fade & Slide Up (delayed) */
    opacity: 0;
    animation: fadeInSlideUp 0.8s 0.2s ease-out forwards;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    /* Animation: Fade & Slide Up */
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.tagline {
    font-size: 1.1rem;
    color: #94A3B8; /* A lighter gray for the subtext */
    max-width: 400px;
    margin: 0 auto 40px auto;
    /* Animation: Fade & Slide Up (more delayed) */
    opacity: 0;
    animation: fadeInSlideUp 0.8s 0.4s ease-out forwards;
}

/* --- Telegram Button --- */
.telegram-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease;
    /* Animation: Pulse + Fade & Slide */
    opacity: 0;
    animation: fadeInSlideUp 0.8s 0.6s ease-out forwards, 
                 pulse 2.5s 1.5s infinite;
}

.telegram-btn:hover {
    background-color: #FB923C; /* Lighter orange */
    transform: translateY(-3px);
}


/* --- ANIMATION DEFINITIONS --- */

/* For the spinning gear icon */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* For the text elements fading in and sliding up */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* For the pulsing call-to-action button */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* --- NEW STYLES FOR FLAPPY ROCKET GAME --- */

#game-section {
    margin-top: 50px;
    opacity: 0; /* Will be faded in */
    animation: fadeInSlideUp 1s 1.5s ease-out forwards;
}

.game-intro {
    font-style: italic;
    color: #94A3B8;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Constrain width for a classic feel */
    height: 500px;
    background-color: #0F172A; /* A darker blue for contrast */
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    margin: 15px auto 0 auto;
    overflow: hidden; /* This is crucial! */
    cursor: pointer;
}

#player {
    position: absolute;
    top: 225px; /* Start in the middle */
    left: 50px;
    font-size: 30px;
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease-out; /* Smooth rotation */
}

/* --- Improved Obstacle Styling to Visually Close Gaps --- */
.obstacle {
    position: absolute;
    width: 50px;
    font-size: 30px;
    color: #f87171; /* Reddish color for the main pill */
    
    /* This creates the "pipe" effect */
    background-image: linear-gradient(rgba(248, 113, 113, 0.5) 50%, transparent 50%);
    background-size: 10px 10px; /* Adjust size of "dots" */
    
    /* New: Use Flexbox to position the "cap" emoji */
    display: flex;
    justify-content: center; /* Center the emoji horizontally */
}

/* New: Style for the top obstacle's emoji */
.obstacle-top {
    align-items: flex-end; /* Pushes the 'cap' emoji to the bottom of its container */
}

/* New: Style for the bottom obstacle's emoji */
.obstacle-bottom {
    align-items: flex-start; /* Keeps the 'cap' emoji at the top of its container */
}

#score-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-weight: bold;
    color: var(--white);
    z-index: 10;
    opacity: 0.5;
}

#start-button, #game-over-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    z-index: 20;
}

#start-button {
    cursor: pointer;
}

.hidden {
    display: none;
}

/* --- NEW STYLES FOR SCROLL DOWN INDICATOR --- */

.scroll-down-indicator {
    margin-top: 60px;
    opacity: 0;
    animation: fadeInSlideUp 1s 1.2s ease-out forwards;
    transition: opacity 0.5s ease;
}
.scroll-down-indicator.hidden {
    opacity: 0;
    pointer-events: none; /* Make it unclickable when hidden */
}
.scroll-down-indicator p {
    color: #94A3B8;
    margin-bottom: 5px;
}
.scroll-down-indicator .arrow {
    font-size: 24px;
    color: var(--primary-color);
    animation: bounce 2s infinite;
}

/* Bouncing animation for the arrow */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* --- New High Score Style --- */
#high-score {
    display: block;
    font-size: 18px;
    font-weight: normal;
    opacity: 0.7;
    margin-top: -10px;
}