body,
html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: "Shadows Into Light", cursive;


}

.main {
    display: flex;
    align-items: stretch;
    height: 100vh;
}

#start-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/table.png');
    background-size: 100% 100%;
    z-index: 20;
}

#start-screen.img-hide {
    display: none;
}

.start-button {
    position: static;
    right: auto;
    bottom: auto;
    width: fit-content;
    transform: none;
    font-size: 3rem;
}

#start-button {
    position: static;
    right: auto;
    bottom: auto;
    display: inline-block;
}

.start-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.start-left {
    min-width: 220px;
}

.start-right {
    max-width: 380px;
    width: 100%;
}

.leaderboard-panel {
    width: 100%;
}

#leaderboard-list {
    margin-top: 12px;
    padding-left: 20px;
}

.start-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 24px;
    gap: 0;
    align-items: stretch;
}

.start-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    height: 100%;
}

.start-right {
    width: 100%;
    height: 100%;
    border: 1px solid black;
    background-image: url('../images/paper_texture.avif');
    background-size: 100% 100%;
    box-sizing: border-box;
    padding: 16px;
}

/* critical override: on start screen, do NOT use absolute button positioning */
.start-layout .next-button,
.start-layout .start-button {
    position: static;
    right: auto;
    bottom: auto;
    width: 260px;
    transform: none;
    font-size: 2.6rem;
}

/* keep leaderboard panel inside right column */
.leaderboard-panel {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.left {
    width: 70%;
    border: 1px solid black;
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-image: url("../images/table.png");
    background-size: 100% 100%;
}

.stopwatch {
    position: absolute;
    z-index: 3;
    background-color: white;
    right: 0;
    top: 0;
    padding: 0.5em 2em 0.5em 2em;
    font-size: xx-large;
    font-weight: bold;
}

.next-button {
    position: absolute;
    z-index: 3;
    background-color: white;
    right: 0;
    bottom: 0;
    padding: 0.2em 1em 0.5em 1em;
    font-size: xx-large;
    font-weight: bold;
}

ul {
    list-style-position: inside;
}

.recipe-text {
    padding-left: 1em;
    font-size: larger;
}

.right {
    width: 30%;
    border: 1px solid black;
    background-image: url('../images/paper_texture.avif');
    background-size: 100% 100%;
}

.recipe-text h2 {
    margin: 0;
    padding: 0;
}

.bowl-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: 30%;
    transform: translate(-50%, -10%);
}

.batter-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30%;
    height: 10%;
    transform: translate(-60%, 55%);
}

.batter-img-mixed {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30%;
    height: 20%;
    transform: translate(-50%, 0%) perspective(700px) scaleX(0.95) scaleY(0.90);
}

.img-hide {
    opacity: 0%;
    display: none;
}

.ingredients-img {
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 130px;
    height: 160px;
    z-index: 3;
    border: 1px dotted black;
    transition: transform 0.3s ease-in-out;
}

.ingredients-img-bowl {
    transform: scale(0.4);

}

#tin {
    width: 200px;
    height: 200px
}


/* spin animation */
@keyframes spinInBowl {
    from {
        transform: translate(-60%, 55%) rotate(0deg);
    }

    to {
        transform: translate(-60%, 55%) rotate(360deg);
    }
}

.rotate-batter {
    transform-origin: 50% 50%;
    animation: spinInBowl 0.8s linear infinite;
}

/* Baking stage */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.oven-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 1s ease-in-out forwards
}


.cake-img {
    position: absolute;
    top: 35%;
    left: 37%;
    width: 25%;
    height: auto;
    transform: translate(-50%, -50%);
    animation: fadeInScale 1s ease-in-out forwards;
}

#done-button {
    top: 80%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: fit-content;
    transform: translateX(-50%);
    animation: fadeIn 0.8s ease-in-out forwards;
}
