html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    min-height: 100%;

    background: #05030a;
}

.flappy-page {
    position: relative;
    width: 100%;
    padding-top: 64px;
    min-height: calc(100vh - 64px);
    margin: 0;
    background: #05030a;
    overflow: hidden;
}

.flappy-game {
    position: relative;
    width: 100%;
    height: calc(100vh - 64px);
    min-height: 500px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #080510;
    border: none;
    border-radius: 0;
    box-shadow: none;
    user-select: none;
    -webkit-user-select: none;
}

#flappyCanvas {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    display: block;

    margin: 0;
    padding: 0;

    cursor: pointer;

    touch-action: none;
}

.flappy-ui {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 60px;
    pointer-events: none;
    z-index: 5;
    color: #ffffff;
}

.flappy-score,
.flappy-highscore {
    display: flex;

    flex-direction: column;

    align-items: center;

    color: #ffffff;

    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(255, 255, 255, 0.4);
}

.flappy-score span,
.flappy-highscore span {
    color: #ffffff;

    font-size: 11px;

    letter-spacing: 2px;

    opacity: 0.95;
}

.flappy-score strong,
.flappy-highscore strong {
    color: #ffffff;

    font-size: 32px;

    line-height: 1;

    opacity: 1;
}

.flappy-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(4, 2, 10, 0.45);

    backdrop-filter: blur(3px);

    z-index: 10;

    color: #ffffff;
}

.flappy-overlay.hidden {
    display: none;
}

.flappy-panel {
    width: min(380px, 80%);

    padding: 40px 30px;

    box-sizing: border-box;

    text-align: center;

    border: 1px solid rgba(174, 93, 255, 0.7);

    border-radius: 16px;

    background: rgba(8, 5, 16, 0.95);

    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(174, 93, 255, 0.2);

    color: #ffffff;
}

.flappy-panel h3 {
    margin: 0 0 18px;

    color: #ffffff;

    font-size: 30px;

    letter-spacing: 3px;

    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.3);
}

.flappy-panel p {
    margin: 0 0 28px;

    color: #ffffff;

    font-size: 15px;

    line-height: 1.6;

    opacity: 0.95;
}

.flappy-panel p strong {
    color: #ffffff;
}

.flappy-panel button {
    border: none;

    padding: 14px 30px;

    border-radius: 8px;

    background: #ae5dff;

    color: #ffffff;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    cursor: pointer;

    box-shadow:
        0 5px 20px rgba(174, 93, 255, 0.25);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease;
}

.flappy-panel button:hover {
    transform: translateY(-2px);

    opacity: 0.95;

    box-shadow:
        0 8px 25px rgba(174, 93, 255, 0.4);
}

.flappy-panel button:active {
    transform: translateY(0);
}

.game-over-score {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin: 10px 0;

    padding: 12px 16px;

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.06);

    color: #ffffff;
}

.game-over-score span {
    color: #ffffff;

    font-size: 11px;

    letter-spacing: 2px;

    opacity: 0.9;
}

.game-over-score strong {
    color: #ffffff;

    font-size: 22px;
}

@media (max-width: 768px) {

    .flappy-page {
        padding-top: 64px;
        min-height: calc(100vh - 64px);
    }

    .flappy-game {
        height: calc(100vh - 64px);
        min-height: 0;
    }

    .flappy-ui {
        top: 70px;
        gap: 40px;
    }

    .flappy-score strong,
    .flappy-highscore strong {
        font-size: 27px;
    }

    .flappy-panel {
        padding: 30px 20px;
    }

}

.difficulty-options {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 24px;
}

.flappy-panel button,
.diff-btn {
    border: 1px solid var(--border-bright, rgba(145, 63, 240, 0.4));
    padding: 12px 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(14, 9, 32, 0.85));
    color: var(--text-primary, #ffffff);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
    transition: all 0.25s ease;
}

.flappy-panel button:hover,
.diff-btn:hover {
    background: linear-gradient(135deg, rgba(145, 63, 240, 0.5), rgba(124, 58, 237, 0.35));
    border-color: var(--purple-glow, #a855f7);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

.flappy-panel button:active,
.diff-btn:active {
    transform: translateY(0);
}

#startButton,
#restartButton {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--purple-core, #7c3aed), #913ff0);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.45);
}

#startButton:hover,
#restartButton:hover {
    background: linear-gradient(135deg, #8b31ff, var(--purple-glow, #a855f7));
    box-shadow: 0 0 32px rgba(180, 125, 255, 0.65);
}

.diff-btn.active {
    background: linear-gradient(135deg, var(--purple-core, #7c3aed), #913ff0);
    border-color: var(--purple-bright, #c084fc);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    position: relative;
}

.diff-btn.active::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    border: 1px solid var(--purple-glow, #a855f7);
    pointer-events: none;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}