* {
    border: none;
    margin: 0;
}

/*root end*/

#logo {
    width: 50vw;
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
}

#home-choices {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}

.home-choice-header {
    display: flex;
}

.home-choice-title {
    font-size: 1.25rem;
    font-weight: bold;
    flex: 1;
}

.home-choice-inner {
    row-gap: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-choice {
    background-color: var(--pane-background);
    padding: 1.5rem;
    border-radius: 1.3rem;
    overflow: hidden;
    width: min(42.5vw, 35rem);
    height: 59vh;
}

.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

#lobby-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 0.75rem;
    padding: 0.25rem;
    min-height: 10rem;
}

.lobby-list-item {
    background-color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lobby-list-item:hover {
    background-color: #fafafa;
}

.lobby-list-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.lobby-list-row {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.language-flag {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    margin-right: 0.25rem;
}

.lobby-list-item-info-pair {
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
    align-items: center;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.lobby-list-item-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.lobby-list-icon-loading {
    border-radius: 0.75rem;
    background-color: black;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-color: rgb(161, 160, 160);
    }

    50% {
        background-color: rgb(228, 228, 228);
    }

    100% {
        background-color: rgb(161, 160, 160);
    }
}

.lobby-list-placeholder {
    display: flex;
    width: 100%;
    flex: 1;
}

.lobby-list-placeholder > * {
    margin: auto;
    max-width: 80%;
}

.join-button {
    background-color: rgb(38, 187, 38);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    transition:
        background-color 0.2s,
        transform 0.1s;
    height: unset;
    width: unset;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.join-button:hover {
    background-color: rgb(34, 167, 34);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.join-button:active {
    transform: scale(0.96);
}

.custom-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 2rem;
    padding: 0.15rem 0.6rem;
    white-space: nowrap;
}

#lobby-create {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1rem;
    row-gap: 0.5rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-right: 0.5rem;
    flex: 1;
    min-height: 0;
    grid-template-rows: min-content min-content min-content min-content min-content min-content min-content max-content;
}

.lobby-create-label {
    font-weight: 600;
}

.advanced-toggle-checkbox {
    display: none !important;
}

.advanced-section-label {
    display: none !important;
}

.advanced-section-content {
    display: contents !important;
}

#custom_words {
    min-height: 4rem;
}

.lobby-create-errors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #ff6961;
    border-radius: 1rem;
    padding: 0.5rem;
}

.create-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.create-button {
    height: 2rem;
    flex: 1;
}

.number-input {
    display: flex;
    flex-direction: row;
    padding: 0;
    border-radius: var(--component-border-radius);
    border: 2px hidden;
    min-width: 0;
    box-sizing: border-box;
}

.number-input > button {
    width: 1.5rem;
    background-color: color-mix(in srgb, var(--component-base-color), #000 5%);
}

.number-input > button:hover {
    background-color: var(--component-hover-background);
}

.number-input > button:focus {
    background-color: var(--component-focus-background);
}

.number-decrement {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.number-increment {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.number-input > input {
    flex: 1;
    border-radius: 0;
    -webkit-appearance: textfield;
    appearance: textfield;
    min-width: 0;
}

.number-input > input::-webkit-inner-spin-button,
.number-input > input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.reload-spinner {
    animation-name: spin;
    animation-duration: 1000ms;
    animation-iteration-count: infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1000px) or (orientation: portrait) {
    #lobby-create {
        grid-template-columns: 1fr minmax(0, 8.5rem) !important;
        column-gap: 0.5rem;
        scrollbar-gutter: auto;
    }

    textarea.input-item {
        height: 6rem;
    }

    #lobby-join-choice {
        flex: 1;
    }

    .home-choice {
        height: initial;
    }

    #logo {
        width: 95vw;
        max-height: 10vh;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
    }

    #home-choices {
        flex-direction: column;
        flex: 1;
        gap: 1.5rem;
        width: 100%;
        box-sizing: border-box;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }

    .home-choice {
        width: 100%;
        box-sizing: border-box;
        height: auto;
        min-height: 15rem;
        max-height: none;
        flex: none;
        overflow: visible;
    }

    #lobby-create {
        overflow-y: visible;
        flex: none;
    }

    .home-choice-inner {
        height: auto;
        min-height: 0;
    }

    #lobby-list {
        flex: 1;
    }

    .advanced-section-label {
        display: flex !important;
        grid-column: 1 / -1;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        cursor: pointer;
        user-select: none;
        font-weight: 600;
        justify-content: space-between;
        align-items: center;
    }

    .advanced-section-label .toggle-icon {
        transition: transform 0.2s;
        font-size: 0.8rem;
    }

    .advanced-toggle-checkbox:checked + .advanced-section-label .toggle-icon {
        transform: rotate(90deg);
    }

    .advanced-toggle-checkbox:checked ~ .advanced-section-content {
        display: initial !important;
        max-height: 0;
        opacity: 1;
        overflow: hidden;
        pointer-events: none;
    }

    .advanced-section-content label[for="custom_words"],
    .advanced-section-content #custom_words {
        grid-column: 1 / -1;
    }

    .lobby-list-item {
        grid-template-columns: auto 1fr auto !important;
        text-align: left !important;
        gap: 0.6rem !important;
        padding: 0.6rem 0.8rem !important;
    }

    .language-flag {
        font-size: 2.2rem !important;
        margin-right: 0 !important;
    }

    .lobby-list-rows {
        gap: 0.15rem !important;
        justify-content: center;
        display: flex;
        flex-direction: column;
    }

    .lobby-list-row {
        justify-content: flex-start !important;
        gap: 0.35rem !important;
    }

    .lobby-list-item-info-pair {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.8rem !important;
    }

    .join-button {
        width: auto !important;
        margin-top: 0 !important;
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem !important;
        align-self: center !important;
    }
}
