#progress {
    color: #f8204f;
}
.input-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-container #answer-input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* Background track */
.timer-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 217, 217, 0.12);
    overflow: hidden;
}

/* Teal countdown fill */
#timer-bar-fill {
    width: 100%;
    height: 100%;
    background-color: #00D9D9;
    transition: width 1s linear, background-color 0.2s ease;
}
#begin-button, #dive-button,
#next-button {
    border: 3px solid #00D9D9;
    background-color: rgba(0, 12, 49, 0.85);
    color: white;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

/* Hover: red border */
#begin-button:hover, #dive-button:hover,
#next-button:hover {
    border-color: #f8204f;
}

/* Click: red border */
#begin-button:active, #dive-button:active,
#next-button:active {
    border-color: #f8204f;
}

/* Focus: red border */
#begin-button:focus, #dive-button:focus,
#next-button:focus {
    border-color: #f8204f;
}
#start-screen,
#question-screen,
#results-screen {
    position: relative;
    z-index: 1;
}
#mute-button {
    position: fixed;
    top: 20px;
    right: 20px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #061b36;
    color: #00FFFF;
    border: 2px #00FFFF;
    border-radius: 4px;

    cursor: pointer;
    z-index: 1000;
}

#mute-button svg {
    width: 24px;
    height: 20px;
}

#mute-button:hover {
    background: #123b65;
}

#mute-button.muted {
    color: lightgrey;
    border-color: lightgrey;
}

@media (max-width: 600px) {
    #mute-button {
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
    }

    #mute-button svg {
        width: 20px;
        height: 16px;
    }
}
#feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    margin: 30px auto;
}

#rarity-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    image-rendering: pixelated;
}

#feedback-title {
    font-size: 30px;
    line-height: 1.5;
    margin: 0;
}

#feedback-answer {
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
    overflow-wrap: anywhere;
}

#feedback-score {
    font-size: 22px;
    line-height: 1.5;
    margin: 0;
}

#next-button {
    margin-top: 15px;
}

.hidden {
    display: none !important;
}

#corner-image {
    position: fixed;
    top: 60px;
    right: 60px;

    width: 160px;
    height: auto;

    image-rendering: pixelated;

    z-index: 2;
    pointer-events: none;
}
.answer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#timer {
    font-size: 14px;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

#answer-input {
    flex: 1;
    min-width: 0;
    width: auto;
}
/* Floating hearts across the entire game */
#hearts-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Each floating heart PNG */
.pixel-heart {
    position: absolute;
    bottom: -80px;

    width: 32px;
    height: auto;

    image-rendering: pixelated;

    animation: floatHeart linear infinite;
}
@keyframes floatHeart {
    0% {
        transform: translateY(0) rotate(-10deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-120vh) rotate(10deg);
        opacity: 0;
    }
}
@font-face {
    font-family: 'Press Start 2P';
    src: url('PressStart2P-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
body, button, input, h1, h2, h3, p {
    font-family: 'Press Start 2P', monospace;
}
body {

    max-width: 800px;
    margin: 100px auto;
    padding: 20px;
    text-align: center;
    color: white;

    background: #061b36;
    min-height: 100vh;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("water-bg.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

input, button {
    padding: 12px;
    margin: 8px;
    font-size: 16px;
}

input {
    width: 70%;
}

button {
    cursor: pointer;
}

.result {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ccc;
}
@media (max-width: 600px) {
    #corner-image {
        top: 15px;
        right: 15px;
        width: 70px;
    }
    body {
        font-size: 16px;
        padding: 12px;
    }

    h1 {
        font-size: 22px;
        line-height: 1.5;
    }

    h2 {
        font-size: 16px;
        line-height: 1.6;
    }

    h3 {
        font-size: 13px;
        line-height: 1.6;
    }

    p {
        font-size: 11px;
        line-height: 1.8;
    }

    button {
        font-size: 11px;
        padding: 12px 14px;
    }

    input {
        font-size: 16px;
        padding: 10px;
    }

    #question-text {
        font-size: 16px;
        line-height: 1.8;
    }

    #feedback-title {
        font-size: 20px;
        line-height: 1.6;
        text-shadow: none !important;
    }

    #feedback-answer {
        font-size: 12px;
        line-height: 1.8;
    }

    #feedback-score {
        font-size: 15px;
    }

    #timer {
        font-size: 11px;
    }

    #results-list {
        font-size: 11px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    #results-list span {
        text-shadow: none !important;
    }
}
/* Red warning vignette */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0;

    background: radial-gradient(
            ellipse at center,
            transparent 35%,
            rgba(255, 40, 80, 0.08) 65%,
            rgba(255, 40, 80, 0.28) 100%
    );
}

/* Pulse during final 5 seconds */
body.timer-warning::after {
    animation: warningPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        opacity: 0.15;
    }

    50% {
        opacity: 0.85;
    }
}