.page-game {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.game-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 3% 2rem;
    gap: 1.25rem;
    box-sizing: border-box;
}

.levels {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    z-index: 1;
}

.whatlevel {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 89, 0, 0.5);
    line-height: 1.2;
    text-align: center;
}

.game-content {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
}

.form-parent {
    flex: 1 1 320px;
    max-width: 460px;
    margin: 0;
    height: auto;
    z-index: 10;
    display: flex;
    justify-content: center;
}

.form {
    width: 100%;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 0 10px 2px rgba(50, 50, 50, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-sizing: border-box;
    background: #fff;
}

.line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgb(200, 200, 200);
    border-radius: 12px 12px 0 0;
}

.label {
    position: static;
    width: 100%;
    font-size: 0.9em;
    display: block;
    line-height: 1.4;
}

#loginwithacc {
    color: rgba(255, 89, 0, 1);
    font-size: 0.85em;
}

.label-password {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.label-error {
    min-height: 1.25rem;
    color: rgb(255, 0, 0);
    font-size: 0.85em;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.input,
.submit {
    position: static;
    width: 100%;
    height: auto;
    background: none;
    outline: none;
    border: none;
    box-sizing: border-box;
}

.input {
    padding: 0.55rem 0.25rem;
    border-bottom: 1px solid rgb(200, 200, 200);
    font-size: 1rem;
}

.submit {
    margin-top: 0.25rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    box-shadow: 0 0 5px 2px rgba(50, 50, 50, 0.1);
    border-radius: 8px;
    font-size: 1em;
    transition: background-color 300ms ease;
    background-color: white;
}

.submit:hover {
    background-color: rgba(255, 89, 0, 0.5);
}

.form-nav {
    margin: 0;
    text-align: center;
}

a.profile-nav-link {
    display: inline-block;
    font-size: 0.92rem;
    color: #4b5563 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a.profile-nav-link:hover {
    color: rgba(255, 89, 0, 1) !important;
}

.form .hints {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 8px;
    font-size: 0.85em;
    background-color: #f8fafc;
    transform: none;
    animation: none;
}

.hints-parent {
    position: static;
    flex: 0 1 300px;
    width: min(300px, 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hints {
    padding: 1rem 1.1rem;
    border: 2px solid rgb(200, 200, 200);
    border-radius: 12px;
    font-size: 0.9em;
    line-height: 1.45;
    background-color: aliceblue;
    transform: scale(0);
    animation-name: popup;
    animation-duration: 0.8s;
    animation-delay: 200ms;
    animation-fill-mode: forwards;
}

@keyframes popup {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

a:hover,
a {
    text-decoration: none;
    color: black;
}

.demo {
    display: inline-flex;
    margin-left: 0;
    vertical-align: middle;
    flex-shrink: 0;
}

.hint-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 2px solid rgba(255, 89, 0, 0.9);
    background: rgba(255, 89, 0, 0.12);
    color: rgba(255, 89, 0, 1) !important;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(255, 89, 0, 0.08);
    transition: transform 120ms ease, background-color 120ms ease;
}

.hint-badge:hover {
    background: rgba(255, 89, 0, 0.2);
    transform: translateY(-1px);
}

[data-tooltip] {
    position: relative;
    z-index: 2;
    cursor: pointer;
}

[data-tooltip]:before,
[data-tooltip]:after {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

[data-tooltip]:before {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 10px;
    width: 180px;
    border-radius: 6px;
    background-color: hsla(0, 0%, 20%, 0.9);
    color: #fff;
    content: attr(data-tooltip);
    text-align: center;
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
}

[data-tooltip]:after {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    margin-left: -5px;
    width: 0;
    border-top: 5px solid hsla(0, 0%, 20%, 0.9);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    content: " ";
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 860px) {
    .game-content {
        flex-direction: column;
        align-items: center;
    }

    .hints-parent {
        order: 2;
        width: 100%;
        max-width: 460px;
    }

    .form-parent {
        order: 1;
        width: 100%;
    }
}
