/* LOCAL WIFI SETUP ROOT */

.lwss-root {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;

    font-family: "Segoe UI", sans-serif;

    background-color: #09103f;
    background-image: url("/client/assets/images/bg/game_bg_portrait.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (orientation: landscape) {
    .lwss-root {
        background-image: url("/client/assets/images/bg/game_bg_landscape.jpg");
    }
}

/* HEADER */

.lwss-header {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 14px 16px;

    background: #0a2a43;
    color: white;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);

    z-index: 30;
}

.lwss-title {
    margin: 0;

    font-size: 18px;
    font-weight: 600;
}

.lwss-back-btn {
    position: absolute;

    left: 12px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: #123d5c;
    color: white;

    padding: 6px 10px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;
}

.lwss-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* MODE BODY */

.lwss-body {
    flex: 1;

    min-height: 0;

    padding: 20px;

    display: flex;
    flex-direction: column;

    gap: 16px;

    overflow-y: auto;
}

/* INTRO */

.lwss-intro {
    padding: 13px 14px;

    background: rgba(255, 255, 255, 0.72);

    border: 1px solid rgba(255, 255, 255, 0.9);

    border-radius: 13px;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);

    text-align: center;
}

.lwss-intro h2 {
    margin: 0 0 5px;

    color: #0a2a43;

    font-size: 17px;
    font-weight: 600;
}

.lwss-intro p {
    margin: 0;

    color: #555;

    font-size: 12px;

    line-height: 1.45;
}

/* MODE CARDS */

.lwss-mode-card {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 16px;

    border: 1px solid rgba(255, 255, 255, 0.9);

    border-radius: 13px;

    background: rgba(255, 255, 255, 0.82);

    color: #333;

    text-align: left;

    cursor: pointer;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.lwss-mode-card:hover {
    transform: translateY(-2px);

    background: rgba(255, 255, 255, 0.95);

    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.lwss-mode-card:active {
    transform: scale(0.98);
}

.lwss-mode-icon {
    width: 42px;
    height: 42px;

    display: flex;
    justify-content: center;
    align-items: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #0a2a43;

    font-size: 22px;
}

.lwss-mode-text {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 3px;
}

.lwss-mode-title {
    font-size: 15px;
    font-weight: 600;

    color: #333;
}

.lwss-mode-desc {
    font-size: 12px;

    color: #666;

    line-height: 1.4;
}

/* SETUP */

.lwss-setup {
    flex: 1;

    min-height: 0;

    padding: 16px 20px;

    display: flex;
    flex-direction: column;

    gap: 16px;

    overflow-y: auto;
}

/* CONTROL */

.lwss-control {
    position: relative;

    display: flex;
    flex-direction: row;

    align-items: center;

    gap: 12px;

    padding: 12px;

    background: rgba(255, 255, 255, 0.72);

    border: 1px solid rgba(255, 255, 255, 0.9);

    border-radius: 13px;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.lwss-control > label {
    flex: 0 0 38%;

    font-size: 13px;

    font-weight: 600;

    color: #333;
}

/* INPUT */

.lwss-input {
    flex: 1;

    min-width: 0;

    box-sizing: border-box;

    padding: 10px 12px;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 9px;

    background: #fff;

    color: #333;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    box-shadow:
        0 3px 7px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lwss-input:focus {
    border-color: rgba(74, 108, 247, 0.35);

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.1);
}

/* CUSTOM DROPDOWN */

.lwss-dropdown {
    position: relative;

    flex: 1;

    background: #fff;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 9px;

    padding: 10px 12px;

    cursor: pointer;

    box-shadow:
        0 3px 7px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.lwss-dropdown:hover {
    box-shadow:
        0 5px 11px rgba(0, 0, 0, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lwss-dropdown-selected {
    display: flex;

    align-items: center;

    font-size: 13px;

    color: #333;
}

.lwss-dropdown-selected::after {
    content: "▼";

    margin-left: auto;

    font-size: 9px;

    color: #666;
}

.lwss-dropdown-options {
    position: absolute;

    left: 0;
    right: 0;

    top: calc(100% + 6px);

    background: #fff;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 9px;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.16),
        0 2px 5px rgba(0, 0, 0, 0.06);

    max-height: 200px;

    overflow-y: auto;

    z-index: 40;
}

.lwss-dropdown-options-hidden {
    display: none;
}

.lwss-dropdown-options-open {
    display: block;
}

.lwss-dropdown-option {
    padding: 9px 10px;

    font-size: 13px;

    color: #333;

    transition: background 0.12s ease;
}

.lwss-dropdown-option:hover {
    background: #eef2ff;
}

/* SUBJECT DROPDOWN */

.lwss-control:has(.lwss-subject-dropdown) {
    position: relative;

    display: flex;

    flex-direction: row;

    align-items: center;

    gap: 12px;
}

.lwss-subject-dropdown {
    position: relative;

    flex: 1;

    background: #fff;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 9px;

    box-shadow:
        0 3px 7px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* SELECTED SUBJECTS */

.lwss-subject-selected {
    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    box-sizing: border-box;

    min-height: 16px;

    padding: 10px 12px;

    background: #fff;

    border-radius: 9px;

    cursor: pointer;

    font-size: 13px;

    color: #333;
}

.lwss-dropdown-arrow {
    flex-shrink: 0;

    margin-left: 8px;

    font-size: 9px;

    color: #666;
}

/* SUBJECT OPTIONS */

.lwss-subject-options {
    position: absolute;

    left: 0;
    right: 0;

    top: calc(100% + 6px);

    padding: 5px;

    background: #fff;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 10px;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.16),
        0 2px 5px rgba(0, 0, 0, 0.06);

    z-index: 40;
}

.lwss-subject-options.lwss-dropdown-options-hidden {
    display: none;
}

.lwss-subject-options.lwss-dropdown-options-open {
    display: block;
}

/* SUBJECT OPTION */

.lwss-subject-option {
    display: flex;

    align-items: center;

    gap: 9px;

    padding: 9px 10px;

    border-radius: 7px;

    cursor: pointer;

    font-size: 13px;

    color: #333;

    transition: background 0.12s ease;
}

.lwss-subject-option:hover {
    background: #eef2ff;
}

.lwss-subject-option input {
    width: 16px;
    height: 16px;

    margin: 0;

    flex-shrink: 0;

    cursor: pointer;
}

.lwss-subject-option span {
    user-select: none;
}

/* TOTAL */

.lwss-total {
    margin-top: 2px;

    padding: 11px 12px;

    border-radius: 11px;

    background: rgba(255, 255, 255, 0.8);

    border: 1px solid rgba(255, 255, 255, 0.9);

    font-size: 13px;

    font-weight: 600;

    text-align: center;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.07),
        0 1px 2px rgba(0, 0, 0, 0.04);
}

.lwss-total {
    display: flex;

    justify-content: space-between;

    align-items: center;
}

.lwss-total strong {
    color: #0a2a43;

    font-size: 16px;
}

/* PRIMARY BUTTON */

.lwss-primary-btn {
    margin-top: auto;

    padding: 13px;

    border: none;

    border-radius: 11px;

    background: #0a2a43;

    color: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 5px 14px rgba(74, 108, 247, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.lwss-primary-btn:hover {
    background: #3d5ce0;

    box-shadow:
        0 7px 16px rgba(74, 108, 247, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.lwss-primary-btn:active {
    transform: scale(0.98);
}

.lwss-primary-btn:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    transform: none;
}

/* JOIN BODY */

.lwss-join-body {
    flex: 1;

    min-height: 0;

    width: 100%;

    max-width: 650px;

    box-sizing: border-box;

    margin: 0 auto;

    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 14px;

    overflow-y: auto;
}

.lwss-join-body .lwss-control {
    width: 100%;

    box-sizing: border-box;
}

/* ROOM CODE */

.lwss-room-code-input {
    flex: 1;

    min-width: 0;

    box-sizing: border-box;

    padding: 11px 12px;

    border: 1px solid rgba(74, 108, 247, 0.12);

    border-radius: 9px;

    background: #fff;

    color: #0a2a43;

    font-family: inherit;

    font-size: 18px;

    font-weight: 700;

    letter-spacing: 4px;

    text-align: center;

    text-transform: uppercase;

    outline: none;

    box-shadow:
        0 3px 7px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lwss-room-code-input:focus {
    border-color: rgba(74, 108, 247, 0.35);
}

/* MOBILE */

@media (max-width: 480px) {

    .lwss-body {
        padding: 16px;
    }

    .lwss-setup,
    .lwss-join-body {
        padding: 14px 16px;
    }

    .lwss-control {
        gap: 9px;
    }

    .lwss-control > label {
        flex-basis: 35%;
    }
}

/* LANDSCAPE */

@media (orientation: landscape) {

    .lwss-body,
    .lwss-setup,
    .lwss-join-body {
        max-width: 700px;
    }

    .lwss-setup {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* LOBBY */

.lwss-lobby {
    flex: 1;

    min-height: 0;

    width: 100%;

    max-width: 650px;

    box-sizing: border-box;

    margin: 0 auto;

    padding: 20px;

    display: flex;

    flex-direction: column;

    gap: 14px;

    overflow-y: auto;
}

/* ROOM CARD */

.lwss-room-card {
    padding: 16px;

    background: rgba(255, 255, 255, 0.82);

    border: 1px solid rgba(255, 255, 255, 0.9);

    border-radius: 13px;

    text-align: center;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.lwss-room-label {
    margin-bottom: 6px;

    color: #555;

    font-size: 12px;

    font-weight: 600;
}

.lwss-room-code {
    color: #0a2a43;

    font-size: 28px;

    font-weight: 700;

    letter-spacing: 5px;
}

.lwss-room-hint {
    margin-top: 7px;

    color: #666;

    font-size: 12px;

    line-height: 1.4;
}

/* PLAYERS */

.lwss-players-card,
.lwss-config-card {
    padding: 14px;

    background: rgba(255, 255, 255, 0.82);

    border: 1px solid rgba(255, 255, 255, 0.9);

    border-radius: 13px;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.lwss-section-title {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 10px;

    color: #333;

    font-size: 14px;

    font-weight: 600;
}

.lwss-section-title span {
    color: #0a2a43;

    font-size: 12px;

    font-weight: 600;
}

.lwss-player-list {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.lwss-player {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 9px 10px;

    border-radius: 9px;

    background: rgba(10, 42, 67, 0.06);
}

.lwss-player-number {
    width: 28px;
    height: 28px;

    display: flex;

    justify-content: center;
    align-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #0a2a43;

    color: white;

    font-size: 12px;

    font-weight: 600;
}

.lwss-player-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 2px;
}

.lwss-player-name {
    overflow: hidden;

    color: #333;

    font-size: 13px;

    font-weight: 600;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.lwss-player-status {
    color: #666;

    font-size: 11px;
}

/* CONFIG */

.lwss-config-summary {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.lwss-config-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 12px;

    padding: 7px 0;

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    font-size: 12px;
}

.lwss-config-row:last-child {
    border-bottom: none;
}

.lwss-config-row span {
    color: #666;
}

.lwss-config-row strong {
    color: #333;

    font-weight: 600;

    text-align: right;
}

/* LOBBY STATES */

.lwss-waiting,
.lwss-empty {
    padding: 13px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.72);

    color: #555;

    font-size: 12px;

    line-height: 1.4;

    text-align: center;
}

.lwss-empty {
    padding: 18px;
}