/* ============================================================
   LOCAL PASS & PLAY
   ============================================================ */

.lpps-screen {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    font-family: "Poppins", sans-serif;

    color: #cfd8e7;

    background:
        linear-gradient(
            rgba(9, 16, 63, 0.84),
            rgba(9, 16, 63, 0.92)
        ),
        url("/client/assets/images/bg/game_bg_portrait.jpg")
        center / cover no-repeat;
}


/* ============================================================
   TOP BAR
   ============================================================ */

.lpps-topbar {
    position: relative;

    width: 100%;
    min-height: 58px;

    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;

    padding: 5px 10px;

    background:
        linear-gradient(
            135deg,
            #0a2a43,
            #09103f
        );

    border-bottom: 1px solid
        rgba(163, 184, 220, 0.3);

    z-index: 20;
}


/* ============================================================
   BACK BUTTON
   ============================================================ */

.lpps-back-btn,
.lpps-calc-btn {
    width: 42px;
    height: 42px;

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

    border: 1px solid
        rgba(163, 184, 220, 0.35);

    border-radius: 8px;

    background:
        rgba(9, 16, 63, 0.8);

    color: #cfd8e7;

    font-family: "Sora", sans-serif;

    font-size: 1.4rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.lpps-back-btn:hover,
.lpps-calc-btn:hover {
    background:
        rgba(25, 92, 110, 0.85);

    border-color:
        rgba(163, 184, 220, 0.65);
}

.lpps-back-btn:active,
.lpps-calc-btn:active {
    transform: scale(0.94);
}


/* ============================================================
   SCOREBOARD
   ============================================================ */

.lpps-scoreboard-table {
    justify-self: center;

    width: min(430px, 100%);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid
        rgba(101, 214, 173, 0.42);

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            rgba(12, 57, 76, 0.98),
            rgba(8, 37, 58, 0.98)
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(163, 184, 220, 0.08),
        0 3px 12px
        rgba(0, 0, 0, 0.32);
}

.lpps-scoreboard-row {
    width: 100%;

    display: grid;

    grid-auto-flow: column;
    grid-auto-columns:
        minmax(58px, 1fr);
}

.lpps-scoreboard-row
    + .lpps-scoreboard-row {

    border-top: 1px solid
        rgba(163, 184, 220, 0.3);
}

.lpps-score-cell {
    min-width: 58px;

    display: flex;
    flex-direction: column;

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

    gap: 2px;

    padding: 4px 6px;

    border-right: 1px solid
        rgba(163, 184, 220, 0.26);

    background:
        rgba(6, 27, 46, 0.72);

    color: #cfd8e7;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* ============================================================
   PLAYER NUMBER
   ============================================================ */

.lpps-player-label {
    font-family: "Sora", sans-serif;

    font-size: 0.72rem;
    font-weight: 900;

    letter-spacing: 0.08em;

    color: #a3b8dc;

    opacity: 0.9;
}


/* ============================================================
   PLAYER NAME
   ============================================================ */

.lpps-player-name {
    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-family: "Poppins", sans-serif;

    font-size: 0.84rem;
    font-weight: 800;

    color: #ffffff;
}


/* ============================================================
   SCORE LABEL
   ============================================================ */

.lpps-score-label {
    font-family: "Sora", sans-serif;

    font-size: 0.58rem;
    font-weight: 900;

    letter-spacing: 0.1em;

    color: #a3b8dc;

    opacity: 0.8;
}


/* ============================================================
   SCORE
   ============================================================ */

.lpps-score-value {
    font-family: "Oxanium", sans-serif;

    font-size: 1.04rem;
    font-weight: 900;

    line-height: 1;

    color: #ffffff;
}


/* ============================================================
   ACTIVE PLAYER
   ============================================================ */

.lpps-score-cell-active {
    background:
        linear-gradient(
            180deg,
            rgba(29, 151, 108, 0.98),
            rgba(12, 101, 78, 0.98)
        );

    color: #ffffff;

    box-shadow:
        inset 0 0 0 1px
        rgba(130, 255, 210, 0.38);
}

.lpps-score-cell-active
    .lpps-player-label,
.lpps-score-cell-active
    .lpps-score-label {

    color: #ffffff;
    opacity: 0.95;
}


/* ============================================================
   QUESTION / SUBJECT PROGRESS
   ============================================================ */

.lpps-progress {
    width: 100%;

    display: flex;

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

    gap: 10px;

    padding: 7px 14px;

    font-family: "Oxanium", sans-serif;

    font-size: 0.9rem;
    font-weight: 800;

    background:
        rgba(9, 16, 63, 0.8);

    border-bottom: 1px solid
        rgba(163, 184, 220, 0.18);
}

.lpps-question-number {
    font-weight: 900;

    color: #cfd8e7;
}

.lpps-question-subject {
    font-weight: 900;

    color: #65d6ad;

    text-transform: capitalize;
}


/* ============================================================
   TIMER
   ============================================================ */

.lpps-timer {
    width: min(700px, 92%);

    margin: 8px auto 6px;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 5px;
}

.lpps-timer-text {
    font-family: "Sora", sans-serif;

    font-size: 1.08rem;
    font-weight: 900;

    color: #ffffff;
}

.lpps-timer-track {
    width: 100%;
    height: 6px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(163, 184, 220, 0.18);
}

.lpps-timer-bar {
    width: 100%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #27b98a,
            #63d9ae
        );

    transition:
        width 0.9s linear;
}


/* ============================================================
   QUESTION BOX
   ============================================================ */

.lpps-question-box {
    width: min(900px, 94%);

    flex: 1;

    min-height: 0;

    margin: 4px auto 8px;

    padding: 14px;

    overflow: hidden;

    border: 1px solid
        rgba(163, 184, 220, 0.28);

    border-radius: 12px;

    background:
        rgba(9, 16, 63, 0.72);

    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.18);
}

.lpps-question-scroll {
    width: 100%;
    height: 100%;

    overflow-y: auto;

    scrollbar-width: thin;
}

.lpps-question-scroll::-webkit-scrollbar {
    width: 5px;
}

.lpps-question-scroll::-webkit-scrollbar-thumb {
    background:
        rgba(163, 184, 220, 0.35);

    border-radius: 10px;
}

#lpps-question {
    width: 100%;

    text-align: center;

    font-size: 1.14rem;
    font-weight: 600;

    line-height: 1.6;
}

.lpps-question-text-a,
.lpps-question-text-b {
    margin: 5px auto;

    font-family: "Inter", sans-serif;

    font-size: 1em;
    font-weight: 600;

    color: #ffffff;
}

.lpps-question-image {
    display: block;

    max-width: 100%;
    max-height: 230px;

    margin: 12px auto;

    object-fit: contain;

    border-radius: 7px;
}


/* ============================================================
   OPTIONS
   ============================================================ */

.lpps-options {
    width: min(900px, 94%);

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;

    margin: 0 auto 8px;
}

.lpps-option {
    padding: 11px 13px;

    border: 1px solid
        rgba(163, 184, 220, 0.28);

    border-radius: 8px;

    background:
        rgba(10, 42, 67, 0.82);

    color: #cfd8e7;

    font-family: "Poppins", sans-serif;

    font-size: 0.96rem;
    font-weight: 700;

    line-height: 1.45;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.lpps-option:hover {
    background:
        rgba(25, 92, 110, 0.82);

    border-color:
        rgba(163, 184, 220, 0.55);

    transform: translateY(-1px);
}

.lpps-option:active {
    transform: scale(0.99);
}

.lpps-option-correct {
    background:
        rgba(22, 145, 101, 0.9) !important;

    border-color:
        rgba(91, 235, 181, 0.8) !important;

    color: #ffffff !important;
}

.lpps-option-wrong {
    background:
        rgba(155, 50, 60, 0.9) !important;

    border-color:
        rgba(255, 125, 135, 0.75) !important;

    color: #ffffff !important;
}


/* ============================================================
   FEEDBACK
   ============================================================ */

.lpps-feedback {
    width: min(900px, 94%);

    margin: 0 auto 8px;

    padding: 7px 12px;

    text-align: center;

    border-radius: 7px;

    background:
        rgba(9, 16, 63, 0.9);

    color: #ffffff;

    font-family: "Poppins", sans-serif;

    font-size: 0.94rem;
    font-weight: 700;

    line-height: 1.45;
}

.lpps-feedback small {
    color: #cfd8e7;

    font-size: 0.94em;
}

.lpps-feedback-hidden {
    display: none;
}


/* ============================================================
   PASS DEVICE OVERLAY
   ============================================================ */

.lpps-overlay {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;

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

    padding: 20px;

    background:
        rgba(3, 8, 28, 0.82);
}

.lpps-blurred {
    filter: blur(5px);
}

.lpps-modal {
    width: min(420px, 92%);

    padding: 30px 24px;

    text-align: center;

    border: 1px solid
        rgba(163, 184, 220, 0.4);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #0a2a43,
            #09103f
        );

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.4);
}

.lpps-modal h2 {
    margin: 0 0 10px;

    color: #ffffff;

    font-family: "Sora", sans-serif;

    font-size: 1.45rem;
    font-weight: 900;

    line-height: 1.3;
}

.lpps-modal p {
    margin: 0;

    color: #a3b8dc;

    font-family: "Poppins", sans-serif;

    font-size: 0.98rem;
    font-weight: 600;
}


/* ============================================================
   LOADING ERROR
   ============================================================ */

.lpps-loading-error {
    position: absolute;

    top: 50%;
    left: 50%;

    width: min(430px, 90%);

    transform: translate(-50%, -50%);

    padding: 28px;

    text-align: center;

    border: 1px solid
        rgba(163, 184, 220, 0.35);

    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            #0a2a43,
            #09103f
        );
}

.lpps-loading-error h2 {
    margin-top: 0;

    color: #ffffff;

    font-family: "Sora", sans-serif;

    font-size: 1.45rem;
    font-weight: 900;

    line-height: 1.3;
}

.lpps-loading-error p {
    color: #cfd8e7;

    font-family: "Poppins", sans-serif;

    font-size: 0.98rem;
    font-weight: 600;

    line-height: 1.5;
}


/* ============================================================
   HOME / BACK BUTTON
   ============================================================ */

.lpps-home-btn {
    padding: 10px 18px;

    border: 1px solid
        rgba(130, 255, 210, 0.35);

    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #15966f,
            #0c6b52
        );

    color: #ffffff;

    font-family: "Sora", sans-serif;

    font-size: 0.94rem;
    font-weight: 900;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.lpps-home-btn:hover {
    filter: brightness(1.1);
}

.lpps-home-btn:active {
    transform: scale(0.96);
}


/* ============================================================
   RESPONSIVE — TABLET / MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .lpps-topbar {
        grid-template-columns:
            44px 1fr 44px;

        min-height: 54px;

        padding: 4px 7px;
    }

    .lpps-back-btn,
    .lpps-calc-btn {
        width: 38px;
        height: 38px;

        font-size: 1.2rem;
    }

    .lpps-scoreboard-table {
        width: min(260px, 100%);
    }

    .lpps-scoreboard-row {
        grid-auto-columns:
            minmax(44px, 1fr);
    }

    .lpps-score-cell {
        min-width: 44px;

        padding: 3px 4px;
    }

    .lpps-player-name {
        font-size: 0.7rem;
        font-weight: 800;
    }

    .lpps-player-label {
        font-size: 0.62rem;
        font-weight: 900;
    }

    .lpps-score-label {
        font-size: 0.5rem;
        font-weight: 900;
    }

    .lpps-score-value {
        font-size: 0.88rem;
        font-weight: 900;
    }

    .lpps-progress {
        padding: 6px 10px;

        font-size: 0.82rem;
        font-weight: 800;
    }

    #lpps-question {
        font-size: 1.04rem;
        font-weight: 600;
    }

    .lpps-question-box {
        padding: 10px;
    }

    .lpps-options {
        grid-template-columns: 1fr;

        gap: 6px;
    }

    .lpps-option {
        padding: 9px 11px;

        font-size: 0.94rem;
        font-weight: 700;

        line-height: 1.4;
    }
}


/* ============================================================
   VERY SMALL PORTRAIT
   ============================================================ */

@media (max-width: 400px) {

    .lpps-scoreboard-table {
        width: min(215px, 100%);
    }

    .lpps-scoreboard-row {
        grid-auto-columns:
            minmax(36px, 1fr);
    }

    .lpps-score-cell {
        min-width: 36px;

        padding: 2px;
    }

    .lpps-player-name {
        font-size: 0.6rem;
        font-weight: 800;
    }

    .lpps-player-label {
        font-size: 0.53rem;
        font-weight: 900;
    }

    .lpps-score-label {
        font-size: 0.44rem;
        font-weight: 900;
    }

    .lpps-score-value {
        font-size: 0.78rem;
        font-weight: 900;
    }

    .lpps-question-box {
        margin-top: 3px;

        padding: 8px;
    }

    #lpps-question {
        font-size: 0.96rem;
        font-weight: 600;
    }

    .lpps-option {
        padding: 8px 9px;

        font-size: 0.9rem;
        font-weight: 700;
    }
}


/* ============================================================
   LANDSCAPE PHONES
   ============================================================ */

@media (
    max-height: 500px
) and (
    orientation: landscape
) {
    .lpps-screen {
        background:
            linear-gradient(
                rgba(9, 16, 63, 0.84),
                rgba(9, 16, 63, 0.92)
            ),
            url("/client/assets/images/bg/game_bg_landscape.jpg")
            center / cover no-repeat;
    }

    .lpps-topbar {
        min-height: 48px;
    }

    .lpps-back-btn,
    .lpps-calc-btn {
        width: 34px;
        height: 34px;

        font-size: 1.05rem;
    }

    .lpps-score-cell {
        padding: 2px 5px;
    }

    .lpps-player-name {
        font-size: 0.66rem;
        font-weight: 800;
    }

    .lpps-player-label {
        font-size: 0.55rem;
        font-weight: 900;
    }

    .lpps-score-label {
        font-size: 0.45rem;
        font-weight: 900;
    }

    .lpps-score-value {
        font-size: 0.82rem;
        font-weight: 900;
    }

    .lpps-progress {
        font-size: 0.76rem;
        font-weight: 800;
    }

    #lpps-question {
        font-size: 0.98rem;
        font-weight: 600;
    }

    .lpps-question-box {
        margin-top: 2px;
        margin-bottom: 4px;
    }

    .lpps-question-image {
        max-height: 120px;

        margin: 6px auto;
    }

    .lpps-options {
        gap: 5px;

        margin-bottom: 4px;
    }

    .lpps-option {
        padding: 6px 9px;

        font-size: 0.86rem;
        font-weight: 700;
    }

    .lpps-feedback {
        margin-bottom: 4px;

        padding: 4px 8px;

        font-size: 0.86rem;
        font-weight: 700;
    }
}