body {
    background-color: #000000;

}

#soup-game-wrapper-red {
    position: relative;
    width: 950px;
    height: 750px;
    background-color: transparent;
    justify-content: center;
    align-items: center;
    margin: 0 auto;  
    display: flex;
}

/* sound styling */

#sound-controls {
    position: absolute;
    top: 5%;
    left: 8%;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 6;
    background-color: #ffffff80;
    border: solid 2px #ffffff50;
    border-radius: 20px 20px 20px 20px;
}

#sound-toggle {
    padding: 0;
    border: none;
    background: none;
    display: inline-flex;
    line-height: 0;
    cursor: pointer;
}

#sound-icon {
    width: 24px;
    height: auto;
    display: block;
}

#volume-slider {
    width: 80px;
}
  
/* Start menu screen styling*/

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #4a4a4a 0%, #1a1a1a 60%, #000000 100%);
    z-index: 3;
}

#start-screen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    opacity: 0;
    pointer-events: none;
    animation: screenFlicker 6s infinite;
}

@keyframes screenFlicker {
    0%, 96%, 100% { opacity: 0; }
    97% { opacity: 0.08; }
    98% { opacity: 0; }
    99% { opacity: 0.05; }
}

#play-button {
    font-family: "Caprasimo", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 4rem;
    color: #ffffff;
    padding: 10px 60px;
    cursor: pointer;
    background-color: #000000;
    border: solid 2px #ffffff;
    border-radius: 40px;
    animation: pulseButton 1.5s ease-in-out infinite;
}

#play-button:focus-visible {
    outline: 3px solid #ffea00;
    outline-offset: 3px;
}

@keyframes pulseButton {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* static screen styling */

#static-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    display: none;
}

/* game screen styling */

#game-screen {
    display: none;
}

#soup-game-tv {
    position: relative;
    width: 800px;

}

#soup-game-tv img {
    width: 100%;
    display: block;
    position: relative;
    z-index: 2;
    pointer-events: none;
}


#previous-guesses {
    display: none;
    position: absolute;
    top: -39px;
    left: 75%;
    z-index: 6;
    width: 25%;
}

#previous-guesses-header {
    background-color: #0d0d0d;
    color: #f7f0e1;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 9px 14px;
    border: solid 2px #f7f0e1;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#previous-guesses-header:focus-visible {
    outline: 3px solid #ffea00;
    outline-offset: 3px;
}

#previous-guesses-arrow {
    transition: transform 0.2s ease-out;
}

#previous-guesses-list {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: auto;
    overflow-y: auto;
    background-color: #0d0d0d;
    color: #f7f0e1;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.95rem;
    padding: 8px 12px;
    border: solid 2px #f7f0e1;
    border-radius: 14px;
}

/* level screen: black like the site, with colour in the three cards, the mustard blob and the bowl */
#soup-game-screen {
    position: absolute;
    top: 11%;
    left: 10%;
    width: 63%;
    height: 73%;
    background-color: #0d0d0d;
    background-image: radial-gradient(circle at 50% 30%, #262626, #0d0d0d 70%);
    overflow: hidden;
}

/* mustard circle behind the bowl, centred on it so the same amount shows on each side */
#soup-game-screen::before {
    content: "";
    position: absolute;
    left: 48.9%;
    bottom: -62%;
    width: 112%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    border-radius: 50%;
    background-color: #f4b941;
}


.soup-bowl {
    position: absolute;
    top: 35%;
    left: 3.3%;
    border-radius:50% 50% 40% 40% / 30% 30% 70% 70%;
    border: solid 4px #0d0d0d;
    width: 450px;
    height: 350px;
    background-color: #8a48cf;
    background-image: linear-gradient(165deg, #b06bea 0%, #8a48cf 45%, #6a31a8 100%);
}

.soup-broth {
    position: absolute;
    top: 4%;
    left: -1px;
    bottom: 43px;
    border-radius: 50% 50% 50% 50%;
    border: solid 4px #0d0d0d;
    width: 444px;
    height: 200px;
    background-image: radial-gradient(ellipse at 42% 38%, #f2664c, #cf3a22 72%);
    box-shadow: inset 0 8px 0 #00000024;
    animation: floatInBowl 3s ease-in-out infinite alternate;
    background-color: #cf3a22;
}

/* the three cards along the top share these basics */

#answer-type,
#hint,
#round-counter {
    position: absolute;
    display: grid;
    grid-template-rows: auto 1fr;
    text-align: center;
    align-items: center;
    padding: 5px 8px 4px;
    border: solid 3px #0d0d0d;
    border-radius: 14px;
    box-shadow: 3px 3px 0 #f7f0e1;
    color: #0d0d0d;
    overflow: hidden;
}

#category-label,
#hint-label,
#round-label {
    padding-bottom: 3px;
    border-bottom: solid 2px #0d0d0d;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#category-value,
#hint-value,
#round-value {
    font-family: "Fraunces", "Caprasimo", serif;
    font-weight: 900;
    font-style: normal;
    line-height: 1.02;
    letter-spacing: -0.01em;
}

/* answer-type styling */

#answer-type {
    top: 5%;
    left: 3.5%;
    width: 21%;
    height: 22%;
    background-color: #f06aa6;
    transform: rotate(-2deg);
}

#category-value {
    font-size: 1.35rem;
    text-transform: capitalize;
}

/* hint styling */

#hint {
    top: 4%;
    left: 27.5%;
    width: 44%;
    height: 25%;
    background-color: #f7f0e1;
}

#hint-value {
    font-size: 1.35rem;
}

/* round counter styling */

#round-counter {
    top: 5%;
    left: 74.5%;
    width: 21%;
    height: 22%;
    background-color: #5fd9a0;
    transform: rotate(2deg);
}

#round-value {
    font-size: 2.6rem;
}

/* answer blanks styling */

/* container for answer */
#answer-area {
    position: absolute;
    top: 25%;
    left: 5%;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    white-space: normal;
}

/* blank underscore styling */
.blank-letter {
    height: 30px;
    width: auto;
    transform: rotate(90deg);
    margin: 0 15px;
    transition: transform 0.2s ease-out;

}

.blank-letter-raised {
    transform: translateY(-15px) rotate(90deg) ;
}

.word-group {
    margin: 0 20px;
    display: inline-flex;
}

#answer-area img {
    height: 30px;
    width: auto;

}

.guessed-letter {
    height: 30px;
    width: auto;
    margin: 0 5px;
}

#soup-float {
    bottom: 20%;
    left: 23%;
    animation-delay: 0s;
}

.float {
    position: absolute;
    animation: floatInBowl 3s ease-in-out infinite alternate;
}

@keyframes floatInBowl {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
 }

 /* guess input and submit button styling */

 #guess-input-area {
    position: absolute;
    bottom: 3%;
    left: 50%;

    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    height: 8%;
    display: none;
}

#guess-input {
    min-width: 0;
    color: #f7f0e1;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 5px 24px;
    border: solid 3px #f7f0e1;
    border-radius: 999px;
    background-color: #0d0d0d;
}

#guess-input:focus-visible {
    outline: 3px solid #ffea00;
    outline-offset: 3px;
}


#submit-guess {
    color: #0d0d0d;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 5px 28px;
    cursor: pointer;
    border: solid 3px #0d0d0d;
    border-radius: 999px;
    background-color: #f4b941;
    transition: translate 0.2s ease, box-shadow 0.2s ease;
}

#submit-guess:focus-visible {
    outline: 3px solid #ffea00;
    outline-offset: 3px;
}

@media (hover: hover) {
    #submit-guess:hover {
        translate: -3px -3px;
        box-shadow: 5px 5px 0 #f06aa6;
    }
}


/* game result styling */
#result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 5;
    text-align: center;
    display: none;
}

#colorblock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 4;
}

#results-all {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 90%;
    margin: 0 auto;
    background-color: #00000095;
    border: solid 3px #ffffff50;
    z-index: 5;
}

#result-message {
    width: 90%;
    color: white;
    font-family: "Caprasimo", serif;
    font-size: 2rem;
    z-index: 5;
}

#stars-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
}

.star-icon {
    width: 40px;
    height: 40px;
}

#round-breakdown-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
    margin-block: auto;
    font-size: 1.3rem;
    font-weight: 400;
    font-family: 'Caprasimo', serif;
    color: #ffffff;
    z-index: 5;
    white-space: nowrap;
    width: max-content;

}

#round-win-bonus {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
    margin-block: auto;
    font-size: 1.3rem;
    font-weight: 400;
    font-family: 'Caprasimo', serif;
    color: #ffffff;
    z-index: 5;
    white-space: nowrap;
    width: max-content;
}

#total-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
    margin-block: auto;
    font-size: 1.3rem;
    font-weight: 400;
    font-family: 'Caprasimo', serif;
    color: #ffffff;
    z-index: 5;
    white-space: nowrap;
    width: max-content;
}

#play-again {
    position: flex;
    flex-direction: column;
    background-color: #2277c4;
    color: #ffffff;
    height: 10%;
    width: 17%;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 5;
    border: 2px solid #ffffff;
}

#play-again:focus-visible {
    outline: 3px solid #ffea00;
    outline-offset: 3px;
}
/* hidden from view but still read by screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* guess box placeholder: light enough to read on the black box, dimmer than typed text */
#guess-input::placeholder {
    color: #f7f0e1a6;
    opacity: 1;
}

/* "Too short!" message: a pink sticker that pops up just above the guess box */
.guess-message {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 11;
    margin: 0;
    padding: 6px 18px;
    border: solid 3px #0d0d0d;
    border-radius: 999px;
    background-color: #f06aa6;
    box-shadow: 3px 3px 0 #f7f0e1;
    color: #0d0d0d;
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%) rotate(-2deg);
}
