body {
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
}

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.5s ease-in;
}

#transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#transition-overlay.hard-cut {
    transition: opacity 0.15s ease-out;
}

#win-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.55); 
    display: grid;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease forwards;
}

#start-screen.hidden,
#game-screen.hidden,
#win-screen.hidden,
#streak.hidden {
    display: none;
}

.win-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#win-message, #win-bowl {
    width: 80vw;
    max-width: 420px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes squeeze {
    0% { 
        transform: scale(0); 
        opacity: 0; 
    }
    70% { 
        transform: scale(1.15); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.tile.ketchup,
.tile.mustard {
    animation: squeeze 0.35s forwards;
}

#start-screen img {
    width: 100%;
}

#play {
    position: absolute;
    top: 70%;
    left: 36%;
    width: 28%;
    height: 9%;
    cursor: pointer;
    border: none;
    background: none;
}

#turn {
    font-size: 1.25rem;
    font-weight: bold;
}

.grid {
    position: relative;
    width: 90vw;
    max-width: 700px;
    aspect-ratio: 1/1;
    margin: 0 auto;
    background-image: url("../img/aerial_bowl-1_1.svg");
    background-size: 100% 100%;
}

.tile {
    position: absolute;
    cursor: pointer;
    background-size: 90%;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-color 0.15s ease;
    padding: 5%;
    background-clip: content-box;
}

#game-screen {
    position: relative;
    width: 100%;          
    max-width: 100%;    
    margin: 0 auto;  
    background-color: grey;     
}

#game-screen img,
.grid {
    width: 100%;
    height: auto;
}

.tile:nth-child(1) { top: 29%; left: 27%; width: 12%; height: 10%; }
.tile:nth-child(2) { top: 29%; left: 39%; width: 12%; height: 10%; }
.tile:nth-child(3) { top: 29%; left: 49%; width: 12%; height: 10%; }


.tile:nth-child(4) { top: 37%; left: 29%; width: 12%; height: 10%; }
.tile:nth-child(5) { top: 37%; left: 39%; width: 12%; height: 10%; }
.tile:nth-child(6) { top: 37%; left: 49%; width: 12%; height: 10%; }


.tile:nth-child(7) { top: 45%; left: 27%; width: 12%; height: 10%; }
.tile:nth-child(8) { top: 45%; left: 39%; width: 12%; height: 10%; }
.tile:nth-child(9) { top: 45%; left: 49%; width: 12%; height: 10%; }

.ketchup-turn .tile:hover {
    background-color: rgba(196, 50, 42, 0.35);
    background-clip: content-box;
    width: 60px;
    height: 49px;
}

.mustard-turn .tile:hover {
    background-color: rgba(205, 250, 20, 0.25);
    background-clip: content-box;
    width: 60px;
    height: 49px;
}

.tile.taken {
    cursor: default;
}

.tile.ketchup {
    background-image: url("../img/Ketchup.svg");
}

.tile.mustard {
    background-image: url("../img/Mustard.svg");
}

.tile.ketchup,
.tile.mustard {
    animation: squeeze 0.35s forwards;
}
#streak {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#win-message, #win-bowl {
    width: 100%;
    max-width: 500px;
}

button {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 999px;
    background: #E0A426;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

button:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    #play {
        top: 14%;
        left: 33%;
        width: 30%;
        height: 3%;
    }
}
