.center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.right {
    margin-left: auto;
    margin-right: 0;
    display: block;
}

#start-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
    position: fixed;
    inset: 0;
    background-color: black;
    background-image: url("../public/start/title_screen.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    z-index: 10;

    --start-button-x: 50%;
    --start-button-y: 70%;
}

.start-menu {
    position: absolute;
    left: var(--start-button-x);
    top: var(--start-button-y);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn {
    position: static;
    transform: none;
    border: 0.5rem solid black;
    border-radius: 2.5rem;
    background-color: rgba(255, 255, 255, 0.67);
    color: black;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    padding: 1.5rem 4rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.btn-secondary {
    border-width: 0.25rem;
    font-size: 1.3rem;
    padding: 0.8rem 2rem;
}

.btn-danger {
    background-color: rgba(255, 190, 190, 0.8);
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#game-container {
    display: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
    inset: 0;
    background-color: black;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#story-image {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
    transition: opacity 0.3s ease;
}

#fail-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
    pointer-events: none;
}

.story-image--transparent {
    opacity: 0.35;
}

#story-text {
    position: fixed;
    left: 50%;
    bottom: 8rem;
    width: min(80vw, 55rem);
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    font-size: 1.5rem;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.9);
}

#options-container {
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: none;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#options-container.options-container--dual {
    width: min(90vw, 60rem);
    max-height: 85vh;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1.5rem;
}

.option-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.option-group-title {
    margin: 0;
    color: white;
    font-size: 1.4rem;
    text-align: center;
    text-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.8);
}

.option-group-choices {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.option-group-divider {
    width: 100%;
    height: 0.15rem;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.85),
        transparent
    );
}

.option-button {
    border: none;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    min-height: 8rem;
    color: white;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.option-button:hover {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}

.option-button--selected {
    background: rgba(255, 255, 255, 0.25);
    outline: 0.25rem solid white;
    box-shadow: 0 0 1.5rem rgba(255, 255, 255, 0.85);
    transform: scale(1.08);
}

.option-confirm-button {
    border: 0.2rem solid white;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: black;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    padding: 1rem 3rem;
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.option-confirm-button:not(:disabled):hover {
    transform: scale(1.05);
    background: white;
}

.option-confirm-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.option-icon {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    pointer-events: none;
}

.option-label {
    font-size: 1rem;
    text-align: center;
    pointer-events: none;
}

#options-container button {
    cursor: pointer;
}

@media (max-width: 1200px) {
    #story-text {
        bottom: 6rem;
        width: 85vw;
        font-size: 1.35rem;
    }

    #options-container {
        gap: 1.5rem;
    }

    .option-button {
        min-width: 7rem;
        min-height: 7rem;
        padding: 0.85rem;
    }

    .option-icon {
        width: 4.5rem;
        height: 4.5rem;
    }
}

@media (max-width: 768px) {
    #start-screen {
        background-size: contain;
        background-position: center top;
        --start-button-y: 78%
    }

    .start-menu {
        width: 90vw;
        top: var(--start-button-y);
    }

    .btn {
        width: min(90vw, 24rem);
        border-width: 0.3rem;
        border-radius: 2rem;
        font-size: 1.8rem;
        padding: 1rem 2rem;
    }

    .btn-secondary {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    #story-image {
        max-width: 100vw;
        max-height: 100dvh;
    }

    #story-text {
        bottom: 4rem;
        width: 90vw;
        font-size: 1.15rem;
    }

    #options-container.options-container--dual {
        width: 94vw;
        max-height: 88dvh;
        gap: 1rem;
    }

    .option-group {
        gap: 0.75rem;
    }

    .option-group-title {
        font-size: 1.15rem;
    }

    .option-group-choices {
        gap: 1rem;
    }

    .option-button {
        min-width: 6rem;
        min-height: 6rem;
        border-radius: 1rem;
        padding: 0.7rem;
        gap: 0.5rem;
    }

    .option-icon {
        width: 3.8rem;
        height: 3.8rem;
    }

    .option-label {
        font-size: 0.85rem;
    }

    .option-confirm-button {
        border-radius: 1.2rem;
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
}

@media (max-width: 480px) {
    #start-screen {
        background-size: contain;
        background-position: center top;
        --start-button-y: 80%
    }

    .start-menu {
        top: var(--start-button-y);
        gap: 0.75rem;
    }

    .btn {
        width: min(88vw, 20rem);
        font-size: 1.4rem;
        padding: 0.8rem 1.25rem;
    }

    .btn-secondary {
        font-size: 0.9rem;
    }

    #story-text {
        bottom: 2rem;
        width: 92vw;
        font-size: 1rem;
    }

    #options-container {
        top: 52%;
        gap: 0.75rem;
    }

    .option-group-choices {
        gap: 0.75rem;
    }

    .option-button {
        min-width: 5rem;
        min-height: 5rem;
        padding: 0.55rem;
    }

    .option-icon {
        width: 3rem;
        height: 3rem;
    }

    .option-label {
        font-size: 0.75rem;
    }

    .option-confirm-button {
        width: min(80vw, 18rem);
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
    }
}

@media (max-height: 600px) {
    .start-menu {
        top: 68%;
        gap: 0.5rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 0.6rem 1.4rem;
    }

    #story-text {
        bottom: 1rem;
        font-size: 0.95rem;
    }

    #options-container,
    #options-container.options-container--dual {
        max-height: 92dvh;
        overflow-y: auto;
    }

    .option-button {
        min-width: 4.8rem;
        min-height: 4.8rem;
    }

    .option-icon {
        width: 2.8rem;
        height: 2.8rem;
    }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}