/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Container */
.container {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 90%;
    animation: fadeInUp 1s ease-out;
}

/* Construction icon animation */
.construction-icon {
    margin-bottom: 2rem;
}

.cone {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

/* Main title */
.main-title {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    animation: slideInLeft 1s ease-out 0.3s both;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 2rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4757, #5352ed, #3742fa);
    border-radius: 4px;
    width: 0%;
    animation: progressLoad 3s ease-in-out infinite;
}

/* Subtitle */
.subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: bold;
    animation: slideInRight 1s ease-out 0.6s both;
}

/* Tools animation */
.tools {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.tool {
    font-size: 2rem;
    animation: rotate 2s linear infinite;
}

.hammer {
    animation-delay: 0s;
}

.wrench {
    animation-delay: 0.5s;
}

.gear {
    animation-delay: 1s;
}

/* Coming soon text */
.coming-soon {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.coming-soon span {
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
}

.coming-soon span:nth-child(1) {
    animation-delay: 0.1s;
}

.coming-soon span:nth-child(2) {
    animation-delay: 0.2s;
}

.coming-soon span:nth-child(3) {
    animation-delay: 0.3s;
}

.coming-soon span:nth-child(4) {
    animation-delay: 0.4s;
}

.coming-soon span:nth-child(5) {
    animation-delay: 0.5s;
}

.coming-soon span:nth-child(6) {
    animation-delay: 0.6s;
}

.coming-soon span:nth-child(7) {
    animation-delay: 0.7s;
}

.coming-soon span:nth-child(8) {
    animation-delay: 0.8s;
}

.coming-soon span:nth-child(9) {
    animation-delay: 0.9s;
}

.coming-soon span:nth-child(10) {
    animation-delay: 1.0s;
}

.coming-soon span:nth-child(11) {
    animation-delay: 1.1s;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 1rem;
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }

    50% {
        width: 75%;
    }

    100% {
        width: 100%;
    }
}

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

    20% {
        transform: rotate(180deg);
    }

    50% {
        transform: rotate(180deg);
    }

    70% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tools {
        gap: 1rem;
    }

    .tool {
        font-size: 1.5rem;
    }

    .coming-soon {
        font-size: 1.2rem;
    }

    .cone {
        font-size: 3rem;
    }
}

.footer-link {
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.footer-link:hover,
.footer-link:active {
    text-shadow: 0 0 8px #fff, 0 0 16px #5352ed;
    transition: text-shadow 0.2s;
}

/* Hint text */
.hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Flappy Bird Game Styles */
.game-container {
    width: 100%;
    max-width: 800px;
    height: calc(100vh - 120px);
    /* Account for footer height + some padding */
    margin: 0 auto;
    padding: 1rem;
    animation: fadeInUp 0.5s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    /* Reduced margin for better centering */
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

.game-title {
    color: white;
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1rem;
    /* Reduced margin for better centering */
    flex-wrap: wrap;
    flex-shrink: 0;
}

.score-display,
.best-display {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.best-display {
    cursor: pointer;
    transition: all 0.3s ease;
}

.best-display:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.game-area {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: calc(100vh - 220px);
    /* Adjust height to fit screen minus header, footer and padding */
    max-height: 450px;
    margin: 0 auto;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 70%, #8B4513 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex-shrink: 0;
    /* Prevent game area from shrinking */
}

.game-area.playing {
    cursor: none;
}

.bird {
    position: absolute;
    left: 80px;
    top: 250px;
    display: inline-block;
    font-size: 2.5rem;
    z-index: 10;
    transition: transform 0.1s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transform: scaleX(-1) !important;
}

.pipe {
    position: absolute;
    width: 60px;
    z-index: 5;
}

.pipe-top {
    top: 0;
    background: linear-gradient(180deg, #228B22, #32CD32);
    border-bottom: 5px solid #006400;
    border-radius: 0 0 5px 5px;
}

.pipe-bottom {
    bottom: 100px;
    background: linear-gradient(180deg, #32CD32, #228B22);
    border-top: 5px solid #006400;
    border-radius: 5px 5px 0 0;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(180deg, #8B4513, #654321);
    border-top: 3px solid #A0522D;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: #7ede94;
    border: 2px solid rgba(0, 128, 0, 0.4);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(0px);
    z-index: 20;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 320px;
    width: 90%;
}

.instructions p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    
}

.start-btn,
.restart-btn {
    background: linear-gradient(45deg, #00ff88, #00d4aa);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.start-btn:hover,
.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 0, 0, 0.15);
    border: 2px solid rgba(255, 0, 0, 0.4);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    z-index: 20;
    box-shadow: 0 8px 32px rgba(255, 0, 0, 0.2);
    max-width: 320px;
    width: 90%;
}

.game-over h3 {
    color: #ff4757;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-over p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.controls-info {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    /* Add bottom margin for spacing */
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Game Animations */
@keyframes flap {
    0% {
        transform: rotate(-15deg) scale(1.1);
    }

    50% {
        transform: rotate(-25deg) scale(1.2);
    }

    100% {
        transform: rotate(-15deg) scale(1.1);
    }
}

@keyframes fall {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(90deg) translateY(200px);
    }
}

@keyframes scoreFlash {
    0% {
        transform: scale(1);
        color: white;
    }

    50% {
        transform: scale(1.3);
        color: #00ff88;
    }

    100% {
        transform: scale(1);
        color: white;
    }
}

/* Cloud animations for background */
.game-area::before {
    content: '☁️ ☁️ ☁️';
    position: absolute;
    top: 50px;
    left: -100px;
    font-size: 2rem;
    animation: clouds 15s linear infinite;
    z-index: 1;
}

.game-area::after {
    content: '☁️ ☁️';
    position: absolute;
    top: 120px;
    left: -150px;
    font-size: 1.5rem;
    animation: clouds 20s linear infinite;
    z-index: 1;
}

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

    100% {
        transform: translateX(800px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-stats {
        gap: 1.5rem;
    }

    .score-display,
    .best-display {
        padding: 0.75rem 1.5rem;
    }

    .game-area {
        height: 400px;
    }

    .bird {
        font-size: 2rem;
    }

    .game-title {
        font-size: 1.5rem;
    }

    .instructions,
    .game-over {
        padding: 1.5rem;
        max-width: 90%;
        min-width: 280px;
        margin: 0 1rem;
    }

    .instructions p,
    .game-over p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .game-over h3 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .start-btn,
    .restart-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: 120px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .start-btn:active,
    .restart-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {

    .instructions,
    .game-over {
        padding: 1rem;
        max-width: 95%;
        min-width: 260px;
        border-radius: 12px;
    }

    .instructions p,
    .game-over p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .game-over h3 {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }

    .start-btn,
    .restart-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 8px;
        min-height: 44px;
        /* Better touch target */
    }
}