/* =========================================================
   BM COLLEGE CAMPUS RUNNER
   Complete Responsive Stylesheet
   Font: Hind Siliguri
========================================================= */


/* =========================================================
   01. ROOT & RESET
========================================================= */

:root {
    --green-950: #08251a;
    --green-900: #12372a;
    --green-800: #1b4d38;
    --green-700: #2f6b4f;
    --green-600: #437057;
    --green-500: #5b8d68;
    --green-300: #97b067;

    --cream: #fbf7e9;
    --cream-dark: #eee7d1;

    --gold: #f4c95d;
    --gold-dark: #d9a92f;

    --white: #ffffff;
    --black: #111111;

    --text: #17352a;
    --text-light: #66766e;

    --danger: #d94848;
    --facebook: #1877f2;

    --shadow-small:
        0 8px 25px rgba(8, 37, 26, 0.12);

    --shadow-medium:
        0 18px 50px rgba(8, 37, 26, 0.18);

    --shadow-large:
        0 25px 80px rgba(0, 0, 0, 0.3);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    -webkit-tap-highlight-color: transparent;
}


html,
body {
    width: 100%;
    min-height: 100%;
}


html {
    overflow: hidden;
}


body {
    font-family:
        "Hind Siliguri",
        sans-serif;

    background:
        var(--green-900);

    color:
        var(--text);

    overflow: hidden;

    overscroll-behavior: none;

    -webkit-font-smoothing:
        antialiased;

    -moz-osx-font-smoothing:
        grayscale;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


button,
input,
select {
    outline: none;
}


img {
    display: block;
    max-width: 100%;
}


.screen {
    position: relative;

    display: none;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    min-height: 100vh;
    min-height: 100dvh;

    overflow: hidden;
}


.screen.active {
    display: flex;
}



/* =========================================================
   02. HOME SCREEN
========================================================= */

#homeScreen {
    align-items: center;
    justify-content: center;

    padding:
        max(18px, env(safe-area-inset-top))
        15px
        max(18px, env(safe-area-inset-bottom));

    background:
        linear-gradient(
            180deg,
            #9ed8ef 0%,
            #d8f0ee 50%,
            #91bc7d 50%,
            #3e704b 100%
        );
}


.home-background {
    position: absolute;

    inset: 0;

    overflow: hidden;

    pointer-events: none;
}


.sky-decoration {
    position: absolute;

    inset: 0;
}


.sun {
    position: absolute;

    top: 8%;
    right: 9%;

    width: clamp(65px, 10vw, 110px);
    aspect-ratio: 1;

    border-radius: 50%;

    background:
        rgba(255, 222, 115, 0.88);

    box-shadow:
        0 0 50px
        rgba(255, 222, 115, 0.55);
}


.cloud {
    position: absolute;

    width: 180px;
    height: 45px;

    border-radius: 100px;

    background:
        rgba(255, 255, 255, 0.72);

    filter:
        drop-shadow(
            0 10px 15px
            rgba(0, 0, 0, 0.04)
        );
}


.cloud::before,
.cloud::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    background: inherit;
}


.cloud::before {
    width: 72px;
    height: 72px;

    left: 28px;
    top: -35px;
}


.cloud::after {
    width: 90px;
    height: 90px;

    right: 20px;
    top: -50px;
}


.cloud-one {
    top: 16%;
    left: 6%;

    animation:
        cloudFloatOne
        18s
        ease-in-out
        infinite;
}


.cloud-two {
    top: 28%;
    right: 5%;

    transform:
        scale(0.7);

    animation:
        cloudFloatTwo
        23s
        ease-in-out
        infinite;
}


@keyframes cloudFloatOne {

    0%,
    100% {
        transform:
            translateX(-25px);
    }

    50% {
        transform:
            translateX(65px);
    }

}


@keyframes cloudFloatTwo {

    0%,
    100% {
        transform:
            translateX(25px)
            scale(0.7);
    }

    50% {
        transform:
            translateX(-55px)
            scale(0.7);
    }

}



/* =========================================================
   03. CAMPUS SILHOUETTE
========================================================= */

.campus-silhouette {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 7%;

    height: 270px;
}


.campus-building {
    position: absolute;

    left: 50%;
    bottom: 0;

    width:
        min(
            760px,
            88vw
        );

    height: 230px;

    transform:
        translateX(-50%);

    border:
        10px solid
        rgba(174, 147, 102, 0.65);

    border-bottom: 0;

    background:
        rgba(239, 226, 191, 0.65);

    box-shadow:
        0 -15px 40px
        rgba(18, 55, 42, 0.06);
}


.campus-building::before {
    content: "";

    position: absolute;

    top: -35px;
    left: 50%;

    width: 70%;
    height: 35px;

    transform:
        translateX(-50%);

    background:
        rgba(174, 147, 102, 0.7);

    clip-path:
        polygon(
            8% 100%,
            18% 0,
            82% 0,
            92% 100%
        );
}


.campus-building::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 90px;
    height: 105px;

    transform:
        translateX(-50%);

    border-radius:
        45px
        45px
        0
        0;

    background:
        rgba(55, 86, 65, 0.55);
}


.building-name {
    position: relative;

    z-index: 2;

    margin-top: 28px;

    color:
        rgba(18, 55, 42, 0.65);

    text-align: center;

    font-size:
        clamp(
            14px,
            2vw,
            21px
        );

    font-weight: 700;
}



/* =========================================================
   04. HOME CONTENT
========================================================= */

.home-content {
    position: relative;

    z-index: 10;

    width:
        min(
            94%,
            510px
        );

    max-height:
        calc(
            100dvh -
            30px
        );

    margin: auto;

    overflow-y: auto;

    scrollbar-width: none;

    text-align: center;
}


.home-content::-webkit-scrollbar {
    display: none;
}



/* =========================================================
   05. GAME BRAND
========================================================= */

.game-brand {
    margin-bottom: 18px;
}


.brand-icon {
    font-size:
        clamp(
            40px,
            9vw,
            58px
        );

    line-height: 1;

    animation:
        brandBounce
        2.5s
        ease-in-out
        infinite;
}


@keyframes brandBounce {

    0%,
    100% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(-6px);
    }

}


.college-name {
    margin-top: 7px;

    color:
        var(--green-900);

    font-size:
        clamp(
            13px,
            3vw,
            17px
        );

    font-weight: 700;
}


.game-brand h1 {
    margin-top: 3px;

    color:
        var(--green-900);

    font-size:
        clamp(
            43px,
            10vw,
            74px
        );

    line-height: 0.9;

    font-weight: 700;

    text-shadow:
        0 4px 0
        rgba(255, 255, 255, 0.5);
}


.game-brand h1 span {
    display: block;

    margin-top: 8px;

    color:
        var(--gold-dark);
}


.game-tagline {
    margin:
        14px auto
        0;

    color:
        var(--text);

    font-size:
        clamp(
            14px,
            3.5vw,
            18px
        );

    font-weight: 500;
}



/* =========================================================
   06. PLAYER FORM
========================================================= */

.player-form {
    width: 100%;

    padding:
        clamp(
            16px,
            4vw,
            23px
        );

    border:
        1px solid
        rgba(255, 255, 255, 0.75);

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.78);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

    box-shadow:
        var(--shadow-medium);
}


.form-group {
    margin-bottom: 13px;

    text-align: left;
}


.form-group label {
    display: block;

    margin:
        0 0
        6px
        3px;

    color:
        var(--text);

    font-size: 14px;

    font-weight: 600;
}


.input-wrapper {
    position: relative;

    display: flex;

    align-items: center;
}


.input-icon {
    position: absolute;

    z-index: 2;

    left: 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 22px;

    pointer-events: none;
}


.input-wrapper input,
.input-wrapper select {
    width: 100%;
    height: 49px;

    padding:
        0
        42px
        0
        46px;

    border:
        2px solid
        #dbe6dd;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.95);

    color:
        var(--text);

    font-size: 15px;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.2s;
}


.input-wrapper select {
    cursor: pointer;

    appearance: auto;
}


.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color:
        var(--green-600);

    box-shadow:
        0 0 0 4px
        rgba(67, 112, 87, 0.12);
}


.input-wrapper input::placeholder {
    color: #95a29b;
}


.form-error {
    display: none;

    margin:
        3px 0
        12px;

    padding:
        9px 12px;

    border:
        1px solid
        rgba(217, 72, 72, 0.2);

    border-radius: 9px;

    background:
        rgba(217, 72, 72, 0.08);

    color:
        var(--danger);

    text-align: left;

    font-size: 13px;

    font-weight: 500;
}


.form-error.show {
    display: block;
}



/* =========================================================
   07. BUTTONS
========================================================= */

.primary-btn {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    min-height: 50px;

    padding:
        12px
        18px;

    border: 0;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--green-800),
            var(--green-600)
        );

    color:
        var(--white);

    font-size:
        clamp(
            15px,
            3.5vw,
            18px
        );

    font-weight: 700;

    box-shadow:
        0 6px 0
        var(--green-950);

    transition:
        transform 0.15s,
        box-shadow 0.15s,
        filter 0.2s;
}


.primary-btn:hover {
    filter:
        brightness(1.08);
}


.primary-btn:active {
    transform:
        translateY(4px);

    box-shadow:
        0 2px 0
        var(--green-950);
}


.button-icon {
    font-size: 21px;
}


.home-actions {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 10px;

    margin-top: 14px;
}


.secondary-btn {
    min-height: 46px;

    padding:
        10px
        12px;

    border:
        1px solid
        rgba(255, 255, 255, 0.8);

    border-radius: 11px;

    background:
        rgba(255, 255, 255, 0.8);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    color:
        var(--text);

    font-size:
        clamp(
            13px,
            3vw,
            15px
        );

    font-weight: 600;

    box-shadow:
        var(--shadow-small);

    transition:
        transform 0.2s,
        background 0.2s;
}


.secondary-btn:hover {
    transform:
        translateY(-2px);

    background:
        var(--white);
}


.disclaimer {
    max-width: 450px;

    margin:
        16px auto
        0;

    color:
        rgba(18, 55, 42, 0.7);

    font-size:
        clamp(
            10px,
            2.4vw,
            12px
        );

    line-height: 1.5;
}



/* =========================================================
   08. GAME SCREEN
========================================================= */

#gameScreen {
    align-items: center;
    justify-content: center;

    background:
        #a8dcf1;
}


.game-container {
    position: relative;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    overflow: hidden;

    background:
        #a8dcf1;
}


#gameCanvas {
    position: absolute;

    z-index: 1;

    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    touch-action: none;
}



/* =========================================================
   09. RESPONSIVE HUD
========================================================= */

.game-hud {
    position: absolute;

    z-index: 50;

    top:
        max(
            12px,
            env(safe-area-inset-top)
        );

    left: 50%;

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap:
        clamp(
            5px,
            1vw,
            9px
        );

    width:
        min(
            calc(100% - 30px),
            760px
        );

    transform:
        translateX(-50%);
}


.hud-item {
    display: flex;

    align-items: center;
    justify-content: center;

    gap:
        clamp(
            4px,
            1vw,
            8px
        );

    min-width: 0;

    min-height: 55px;

    padding:
        7px
        10px;

    border:
        1px solid
        rgba(255, 255, 255, 0.13);

    border-radius: 14px;

    background:
        rgba(18, 55, 42, 0.92);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    color:
        var(--white);

    box-shadow:
        0 7px 25px
        rgba(0, 0, 0, 0.16);
}


.hud-icon {
    flex-shrink: 0;

    font-size:
        clamp(
            17px,
            2.5vw,
            24px
        );
}


.hud-item div {
    min-width: 0;
}


.hud-item small {
    display: block;

    color:
        rgba(255, 255, 255, 0.7);

    font-size:
        clamp(
            8px,
            1.5vw,
            11px
        );

    line-height: 1.1;

    white-space: nowrap;
}


.hud-item strong {
    display: block;

    color:
        var(--white);

    font-size:
        clamp(
            11px,
            2vw,
            17px
        );

    line-height: 1.3;

    white-space: nowrap;
}


.timer-item {
    background:
        rgba(112, 59, 30, 0.94);
}



/* =========================================================
   10. LIVES
========================================================= */

.lives {
    position: absolute;

    z-index: 52;

    top:
        clamp(
            78px,
            11vh,
            95px
        );

    left:
        max(
            12px,
            calc(50% - 380px)
        );

    max-width:
        calc(100% - 80px);

    padding:
        7px
        11px;

    border:
        1px solid
        rgba(255, 255, 255, 0.6);

    border-radius: 30px;

    background:
        rgba(255, 255, 255, 0.88);

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

    font-size:
        clamp(
            13px,
            2.5vw,
            17px
        );

    white-space: nowrap;

    box-shadow:
        var(--shadow-small);
}



/* =========================================================
   11. PAUSE BUTTON
========================================================= */

.pause-btn {
    position: absolute;

    z-index: 52;

    top:
        clamp(
            78px,
            11vh,
            95px
        );

    right:
        max(
            12px,
            calc(50% - 380px)
        );

    display: flex;

    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.92);

    color:
        var(--green-900);

    font-size: 18px;

    box-shadow:
        var(--shadow-small);

    transition:
        transform 0.2s;
}


.pause-btn:hover {
    transform:
        scale(1.06);
}



/* =========================================================
   12. CHALLENGE BAR
========================================================= */

.challenge-bar {
    position: absolute;

    z-index: 45;

    top:
        clamp(
            130px,
            18vh,
            155px
        );

    left: 50%;

    display: none;

    align-items: center;

    gap: 10px;

    width:
        min(
            calc(100% - 30px),
            480px
        );

    padding:
        9px
        13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 14px;

    background:
        rgba(12, 44, 32, 0.9);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    color:
        var(--white);

    transform:
        translateX(-50%);

    box-shadow:
        var(--shadow-small);
}


.challenge-bar.active {
    display: flex;

    animation:
        challengeBarIn
        0.35s
        ease;
}


@keyframes challengeBarIn {

    from {
        opacity: 0;

        transform:
            translateX(-50%)
            translateY(-12px);
    }

    to {
        opacity: 1;

        transform:
            translateX(-50%)
            translateY(0);
    }

}


.challenge-icon {
    flex-shrink: 0;

    font-size: 25px;
}


.challenge-info {
    min-width: 0;

    flex: 1;

    text-align: left;
}


.challenge-info small {
    display: block;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 9px;
}


.challenge-info strong {
    display: block;

    overflow: hidden;

    font-size:
        clamp(
            11px,
            2.5vw,
            14px
        );

    text-overflow: ellipsis;

    white-space: nowrap;
}


.challenge-timer {
    flex-shrink: 0;

    min-width: 42px;

    padding:
        5px
        8px;

    border-radius: 20px;

    background:
        var(--gold);

    color:
        #3b2b0b;

    text-align: center;

    font-size: 12px;

    font-weight: 700;
}



/* =========================================================
   13. GAME MESSAGE
========================================================= */

.game-message {
    position: absolute;

    z-index: 70;

    top: 50%;
    left: 50%;

    width: max-content;

    max-width: 88%;

    padding:
        10px
        20px;

    border-radius: 30px;

    background:
        rgba(244, 201, 93, 0.96);

    color:
        #3b2b0b;

    text-align: center;

    font-size:
        clamp(
            12px,
            2.7vw,
            16px
        );

    font-weight: 700;

    line-height: 1.4;

    opacity: 0;

    pointer-events: none;

    transform:
        translate(-50%, -50%)
        translateY(-15px);

    transition:
        opacity 0.3s,
        transform 0.3s;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.16);
}


.game-message.show {
    opacity: 1;

    transform:
        translate(-50%, -50%)
        translateY(0);
}



/* =========================================================
   14. FLOATING SCORE
========================================================= */

.floating-score-container {
    position: absolute;

    z-index: 65;

    inset: 0;

    overflow: hidden;

    pointer-events: none;
}


.floating-score {
    position: absolute;

    color:
        var(--gold);

    font-size: 20px;

    font-weight: 700;

    text-shadow:
        0 2px 5px
        rgba(0, 0, 0, 0.35);

    animation:
        floatingScoreAnimation
        1s
        ease-out
        forwards;
}


@keyframes floatingScoreAnimation {

    0% {
        opacity: 0;

        transform:
            translateY(10px)
            scale(0.7);
    }

    20% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1.1);
    }

    100% {
        opacity: 0;

        transform:
            translateY(-70px)
            scale(1);
    }

}



/* =========================================================
   15. COUNTDOWN
========================================================= */

.countdown {
    position: absolute;

    z-index: 150;

    top: 50%;
    left: 50%;

    color:
        var(--white);

    font-size:
        clamp(
            70px,
            20vw,
            150px
        );

    font-weight: 700;

    line-height: 1;

    text-align: center;

    white-space: nowrap;

    pointer-events: none;

    transform:
        translate(-50%, -50%);

    text-shadow:
        0 8px 0
        rgba(0, 0, 0, 0.2);
}



/* =========================================================
   16. PAUSE OVERLAY
========================================================= */

.pause-overlay {
    position: absolute;

    z-index: 200;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(5, 28, 20, 0.62);

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);
}


.pause-overlay.active {
    display: flex;
}


.pause-card {
    width:
        min(
            100%,
            360px
        );

    padding: 28px;

    border:
        1px solid
        rgba(255, 255, 255, 0.7);

    border-radius: 22px;

    background:
        var(--cream);

    text-align: center;

    box-shadow:
        var(--shadow-large);
}


.pause-icon {
    margin-bottom: 5px;

    font-size: 48px;
}


.pause-card h2 {
    color:
        var(--green-900);

    font-size: 25px;
}


.pause-card p {
    margin:
        5px 0
        20px;

    color:
        var(--text-light);

    font-size: 14px;
}



/* =========================================================
   17. MOBILE CONTROLS
========================================================= */

.mobile-controls {
    position: absolute;

    z-index: 80;

    left: 50%;

    bottom:
        max(
            20px,
            env(safe-area-inset-bottom)
        );

    display: none;

    justify-content: center;

    gap: 18px;

    width:
        min(
            calc(100% - 30px),
            340px
        );

    transform:
        translateX(-50%);
}


.control-btn {
    display: flex;

    flex: 1;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    max-width: 140px;
    height: 68px;

    padding: 5px;

    border:
        1px solid
        rgba(255, 255, 255, 0.15);

    border-radius: 18px;

    background:
        rgba(18, 55, 42, 0.94);

    color:
        var(--white);

    box-shadow:
        0 6px 0
        var(--green-950);

    user-select: none;

    touch-action: manipulation;

    transition:
        transform 0.12s,
        box-shadow 0.12s;
}


.control-btn:active {
    transform:
        translateY(4px);

    box-shadow:
        0 2px 0
        var(--green-950);
}


.control-btn span {
    font-size: 20px;

    line-height: 1;
}


.control-btn strong {
    margin-top: 3px;

    font-size: 13px;
}



/* =========================================================
   18. RESULT SCREEN
========================================================= */

.result-screen {
    align-items: center;
    justify-content: center;

    padding:
        max(18px, env(safe-area-inset-top))
        15px
        max(18px, env(safe-area-inset-bottom));

    overflow-y: auto;

    background:
        radial-gradient(
            circle at top,
            #4f8a69,
            #12372a 70%
        );
}


.result-card {
    width:
        min(
            100%,
            500px
        );

    max-height:
        calc(
            100dvh -
            30px
        );

    padding:
        clamp(
            20px,
            5vw,
            30px
        );

    overflow-y: auto;

    scrollbar-width: none;

    border:
        1px solid
        rgba(255, 255, 255, 0.7);

    border-radius: 25px;

    background:
        var(--cream);

    text-align: center;

    box-shadow:
        var(--shadow-large);
}


.result-card::-webkit-scrollbar {
    display: none;
}


.result-icon {
    font-size:
        clamp(
            45px,
            11vw,
            62px
        );

    line-height: 1;
}


.result-label {
    margin-top: 7px;

    color:
        var(--text-light);

    font-size: 13px;

    font-weight: 500;
}


.result-card h2 {
    margin-top: 2px;

    color:
        var(--green-900);

    font-size:
        clamp(
            25px,
            7vw,
            35px
        );

    line-height: 1.2;
}



/* =========================================================
   19. RESULT PLAYER
========================================================= */

.result-player-info {
    display: flex;

    flex-direction: column;

    align-items: center;

    margin-top: 13px;

    padding:
        10px
        15px;

    border-radius: 13px;

    background:
        rgba(67, 112, 87, 0.08);
}


.result-player-info strong {
    color:
        var(--green-900);

    font-size: 18px;
}


.result-player-info span {
    margin-top: 1px;

    color:
        var(--text);

    font-size: 14px;
}


.result-player-info small {
    color:
        var(--text-light);

    font-size: 12px;
}



/* =========================================================
   20. FINAL SCORE
========================================================= */

.final-score {
    margin:
        16px 0;

    padding:
        14px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--green-900),
            var(--green-700)
        );

    color:
        var(--white);

    box-shadow:
        var(--shadow-small);
}


.final-score span {
    display: block;

    color:
        rgba(255, 255, 255, 0.7);

    font-size: 12px;
}


.final-score strong {
    display: block;

    color:
        var(--gold);

    font-size:
        clamp(
            35px,
            10vw,
            48px
        );

    line-height: 1.1;
}



/* =========================================================
   21. RESULT STATS
========================================================= */

.result-stats {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 7px;
}


.result-stat {
    min-width: 0;

    padding:
        10px
        4px;

    border-radius: 12px;

    background:
        #e8eddf;
}


.result-stat > span {
    display: block;

    font-size:
        clamp(
            18px,
            5vw,
            23px
        );
}


.result-stat strong {
    display: block;

    overflow: hidden;

    margin-top: 2px;

    color:
        var(--green-900);

    font-size:
        clamp(
            11px,
            2.7vw,
            15px
        );

    text-overflow: ellipsis;

    white-space: nowrap;
}


.result-stat small {
    display: block;

    color:
        var(--text-light);

    font-size:
        clamp(
            8px,
            2.2vw,
            11px
        );
}



/* =========================================================
   22. GLOBAL RANK
========================================================= */

.global-rank {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 12px;

    padding:
        11px
        14px;

    border:
        1px solid
        rgba(244, 201, 93, 0.45);

    border-radius: 12px;

    background:
        rgba(244, 201, 93, 0.13);
}


.global-rank span {
    color:
        var(--text);

    font-size: 13px;

    font-weight: 600;
}


.global-rank strong {
    color:
        var(--green-900);

    font-size: 14px;
}


.result-message {
    margin-top: 11px;

    color:
        var(--text-light);

    font-size: 13px;

    line-height: 1.5;
}



/* =========================================================
   23. RESULT ACTIONS
========================================================= */

.result-actions {
    display: grid;

    gap: 9px;

    margin-top: 16px;
}


.facebook-btn {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    min-height: 48px;

    padding:
        10px
        15px;

    border: 0;

    border-radius: 12px;

    background:
        var(--facebook);

    color:
        var(--white);

    font-size: 15px;

    font-weight: 700;

    box-shadow:
        0 5px 0
        #0d56b5;

    transition:
        transform 0.15s,
        box-shadow 0.15s;
}


.facebook-btn span {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 50%;

    background:
        var(--white);

    color:
        var(--facebook);

    font-family: Arial, sans-serif;

    font-size: 18px;

    font-weight: 700;
}


.facebook-btn:active {
    transform:
        translateY(3px);

    box-shadow:
        0 2px 0
        #0d56b5;
}



/* =========================================================
   24. MODALS
========================================================= */

.modal {
    position: fixed;

    z-index: 1000;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding:
        max(18px, env(safe-area-inset-top))
        15px
        max(18px, env(safe-area-inset-bottom));

    background:
        rgba(4, 25, 17, 0.74);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


.modal.active {
    display: flex;

    animation:
        modalBackgroundIn
        0.2s
        ease;
}


@keyframes modalBackgroundIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


.modal-content {
    position: relative;

    width:
        min(
            100%,
            480px
        );

    max-height:
        min(
            88vh,
            750px
        );

    padding:
        clamp(
            20px,
            5vw,
            30px
        );

    overflow-y: auto;

    scrollbar-width: thin;

    border:
        1px solid
        rgba(255, 255, 255, 0.7);

    border-radius: 23px;

    background:
        var(--cream);

    box-shadow:
        var(--shadow-large);

    animation:
        modalContentIn
        0.28s
        ease;
}


@keyframes modalContentIn {

    from {
        opacity: 0;

        transform:
            translateY(20px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


.close-modal {
    position: absolute;

    z-index: 5;

    top: 8px;
    right: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    padding: 0;

    border: 0;

    background:
        transparent;

    color:
        #748078;

    font-size: 31px;

    line-height: 1;
}


.modal-header-icon {
    text-align: center;

    font-size:
        clamp(
            40px,
            10vw,
            52px
        );

    line-height: 1;
}


.modal-content h2 {
    margin-top: 5px;

    color:
        var(--green-900);

    text-align: center;

    font-size:
        clamp(
            23px,
            6vw,
            30px
        );
}



/* =========================================================
   25. HOW TO PLAY
========================================================= */

.instruction-list {
    display: grid;

    gap: 9px;

    margin-top: 18px;
}


.instruction-item {
    display: flex;

    align-items: center;

    gap: 13px;

    padding:
        11px
        12px;

    border:
        1px solid
        rgba(67, 112, 87, 0.08);

    border-radius: 12px;

    background:
        #e9eee4;
}


.instruction-item > span {
    flex-shrink: 0;

    width: 38px;

    font-size:
        clamp(
            25px,
            7vw,
            31px
        );

    text-align: center;
}


.instruction-item div {
    min-width: 0;

    text-align: left;
}


.instruction-item strong {
    color:
        var(--green-900);

    font-size: 14px;
}


.instruction-item p {
    margin-top: 1px;

    color:
        var(--text-light);

    font-size:
        clamp(
            11px,
            2.8vw,
            13px
        );

    line-height: 1.45;
}



/* =========================================================
   26. LEADERBOARD
========================================================= */

.leaderboard-modal-content {
    width:
        min(
            100%,
            560px
        );
}


.leaderboard-subtitle {
    margin-top: 4px;

    color:
        var(--text-light);

    text-align: center;

    font-size: 13px;
}


.leaderboard-filters {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 7px;

    margin-top: 16px;

    padding: 4px;

    border-radius: 12px;

    background:
        #e4e9df;
}


.leaderboard-filter {
    min-height: 39px;

    padding:
        7px
        9px;

    border: 0;

    border-radius: 9px;

    background:
        transparent;

    color:
        var(--text-light);

    font-size: 13px;

    font-weight: 600;

    transition:
        background 0.2s,
        color 0.2s,
        box-shadow 0.2s;
}


.leaderboard-filter.active {
    background:
        var(--white);

    color:
        var(--green-900);

    box-shadow:
        0 4px 12px
        rgba(18, 55, 42, 0.09);
}



/* =========================================================
   27. LEADERBOARD LOADING
========================================================= */

.leaderboard-loading {
    display: none;

    padding:
        35px
        15px;

    text-align: center;
}


.leaderboard-loading.active {
    display: block;
}


.loading-spinner {
    width: 35px;
    height: 35px;

    margin:
        0 auto
        10px;

    border:
        4px solid
        #dfe6dc;

    border-top-color:
        var(--green-600);

    border-radius: 50%;

    animation:
        spinnerRotate
        0.8s
        linear
        infinite;
}


@keyframes spinnerRotate {

    to {
        transform:
            rotate(360deg);
    }

}


.leaderboard-loading p {
    color:
        var(--text-light);

    font-size: 13px;
}


.leaderboard-error {
    display: none;

    margin-top: 14px;

    padding:
        10px
        12px;

    border-radius: 10px;

    background:
        rgba(217, 72, 72, 0.1);

    color:
        var(--danger);

    text-align: center;

    font-size: 13px;
}


.leaderboard-error.show {
    display: block;
}



/* =========================================================
   28. LEADERBOARD LIST
========================================================= */

.leaderboard-list {
    display: grid;

    gap: 7px;

    margin-top: 14px;
}


.leaderboard-row {
    display: grid;

    grid-template-columns:
        40px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 9px;

    padding:
        10px
        12px;

    border:
        1px solid
        rgba(67, 112, 87, 0.08);

    border-radius: 11px;

    background:
        #e9eee4;
}


.leaderboard-row.current-player {
    border-color:
        rgba(244, 201, 93, 0.75);

    background:
        rgba(244, 201, 93, 0.18);
}


.leaderboard-rank {
    text-align: center;

    font-size: 18px;

    font-weight: 700;
}


.leaderboard-player {
    min-width: 0;

    text-align: left;
}


.leaderboard-player strong {
    display: block;

    overflow: hidden;

    color:
        var(--green-900);

    font-size: 14px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.leaderboard-player small {
    display: block;

    overflow: hidden;

    margin-top: 1px;

    color:
        var(--text-light);

    font-size: 10px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.leaderboard-score {
    color:
        var(--green-900);

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;
}


.leaderboard-empty {
    padding:
        35px
        15px;

    color:
        var(--text-light);

    text-align: center;

    font-size: 13px;
}



/* =========================================================
   29. EXTRA LIFE NOTIFICATION
========================================================= */

.extra-life-notification,
.challenge-notification {
    position: fixed;

    z-index: 1500;

    top:
        max(
            20px,
            env(safe-area-inset-top)
        );

    left: 50%;

    display: flex;

    align-items: center;

    gap: 12px;

    width:
        min(
            calc(100% - 30px),
            420px
        );

    padding:
        12px
        15px;

    border:
        1px solid
        rgba(255, 255, 255, 0.35);

    border-radius: 15px;

    background:
        rgba(18, 55, 42, 0.96);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    color:
        var(--white);

    opacity: 0;

    pointer-events: none;

    transform:
        translateX(-50%)
        translateY(-130%);

    transition:
        opacity 0.35s,
        transform 0.35s;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.24);
}


.extra-life-notification.show,
.challenge-notification.show {
    opacity: 1;

    transform:
        translateX(-50%)
        translateY(0);
}


.extra-life-heart,
.challenge-notification-icon {
    flex-shrink: 0;

    font-size: 34px;
}


.extra-life-notification strong,
.challenge-notification strong {
    display: block;

    color:
        var(--gold);

    font-size: 15px;
}


.extra-life-notification p,
.challenge-notification p {
    margin-top: 1px;

    color:
        rgba(255, 255, 255, 0.78);

    font-size: 12px;
}



/* =========================================================
   30. NOSCRIPT
========================================================= */

.noscript-message {
    position: fixed;

    z-index: 9999;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        var(--green-900);

    color:
        var(--white);

    text-align: center;

    font-size: 18px;
}



/* =========================================================
   31. TABLET
========================================================= */

@media (max-width: 900px) {

    .game-hud {
        width:
            calc(
                100% - 20px
            );
    }


    .lives {
        left: 10px;
    }


    .pause-btn {
        right: 10px;
    }

}



/* =========================================================
   32. MOBILE
========================================================= */

@media (max-width: 650px) {

    .mobile-controls {
        display: flex;
    }


    .game-hud {
        top:
            max(
                8px,
                env(safe-area-inset-top)
            );

        width:
            calc(
                100% - 14px
            );

        gap: 4px;
    }


    .hud-item {
        min-height: 47px;

        padding:
            5px
            3px;

        border-radius: 9px;
    }


    .hud-icon {
        display: none;
    }


    .hud-item small {
        font-size: 8px;
    }


    .hud-item strong {
        font-size:
            clamp(
                10px,
                3vw,
                13px
            );
    }


    .lives {
        top: 64px;

        left: 8px;

        padding:
            6px
            8px;
    }


    .pause-btn {
        top: 64px;

        right: 8px;

        width: 39px;
        height: 39px;
    }


    .challenge-bar {
        top: 112px;

        width:
            calc(
                100% - 16px
            );
    }


    .result-stats {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}



/* =========================================================
   33. SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    #homeScreen {
        padding:
            max(10px, env(safe-area-inset-top))
            10px
            max(10px, env(safe-area-inset-bottom));
    }


    .home-content {
        width: 96%;

        max-height:
            calc(
                100dvh - 18px
            );
    }


    .game-brand {
        margin-bottom: 12px;
    }


    .brand-icon {
        font-size: 38px;
    }


    .college-name {
        font-size: 12px;
    }


    .game-brand h1 {
        font-size: 47px;
    }


    .game-tagline {
        margin-top: 10px;

        font-size: 13px;
    }


    .player-form {
        padding: 14px;

        border-radius: 17px;
    }


    .form-group {
        margin-bottom: 9px;
    }


    .input-wrapper input,
    .input-wrapper select {
        height: 44px;

        font-size: 14px;
    }


    .home-actions {
        margin-top: 10px;
    }


    .disclaimer {
        margin-top: 11px;
    }


    .modal-content {
        max-height: 90vh;

        padding:
            20px
            16px;
    }


    .global-rank {
        align-items: flex-start;

        flex-direction: column;

        gap: 2px;
    }

}



/* =========================================================
   34. VERY SMALL MOBILE
========================================================= */

@media (max-width: 360px) {

    .game-hud {
        width:
            calc(
                100% - 8px
            );

        gap: 3px;
    }


    .hud-item {
        min-height: 42px;

        padding:
            3px
            2px;
    }


    .hud-item small {
        font-size: 7px;
    }


    .hud-item strong {
        font-size: 10px;
    }


    .lives {
        top: 56px;

        font-size: 11px;
    }


    .pause-btn {
        top: 55px;

        width: 36px;
        height: 36px;
    }


    .challenge-bar {
        top: 100px;

        padding:
            7px
            9px;
    }


    .challenge-icon {
        font-size: 20px;
    }


    .challenge-info strong {
        font-size: 10px;
    }


    .mobile-controls {
        width: 94%;

        gap: 12px;
    }


    .control-btn {
        height: 60px;
    }

}



/* =========================================================
   35. SHORT PORTRAIT PHONE
========================================================= */

@media
(max-height: 720px)
and
(orientation: portrait) {

    .brand-icon {
        font-size: 32px;
    }


    .game-brand h1 {
        font-size: 41px;
    }


    .game-tagline {
        margin-top: 7px;
    }


    .game-brand {
        margin-bottom: 9px;
    }


    .player-form {
        padding: 12px;
    }


    .form-group {
        margin-bottom: 7px;
    }


    .form-group label {
        margin-bottom: 3px;

        font-size: 12px;
    }


    .input-wrapper input,
    .input-wrapper select {
        height: 40px;
    }


    .primary-btn {
        min-height: 44px;

        padding:
            9px
            14px;
    }


    .home-actions {
        margin-top: 8px;
    }


    .secondary-btn {
        min-height: 40px;
    }


    .disclaimer {
        margin-top: 7px;
    }

}



/* =========================================================
   36. LANDSCAPE MOBILE
========================================================= */

@media
(max-height: 520px)
and
(orientation: landscape) {

    .game-hud {
        top: 5px;

        width:
            min(
                68%,
                620px
            );

        gap: 3px;
    }


    .hud-item {
        min-height: 38px;

        padding:
            3px
            5px;
    }


    .hud-icon {
        display: none;
    }


    .hud-item small {
        font-size: 7px;
    }


    .hud-item strong {
        font-size: 10px;
    }


    .lives {
        top: 7px;
        left: 7px;

        padding:
            5px
            7px;

        font-size: 11px;
    }


    .pause-btn {
        top: 6px;
        right: 7px;

        width: 35px;
        height: 35px;
    }


    .challenge-bar {
        top: 50px;

        width:
            min(
                55%,
                440px
            );

        padding:
            5px
            9px;
    }


    .challenge-icon {
        font-size: 19px;
    }


    .challenge-info small {
        display: none;
    }


    .challenge-info strong {
        font-size: 10px;
    }


    .challenge-timer {
        padding:
            3px
            6px;

        font-size: 10px;
    }


    .mobile-controls {
        left: auto;
        right: 12px;

        bottom: 12px;

        width: auto;

        gap: 9px;

        transform: none;
    }


    .control-btn {
        flex: none;

        width: 68px;
        height: 50px;

        border-radius: 12px;
    }


    .control-btn span {
        font-size: 15px;
    }


    .control-btn strong {
        font-size: 10px;
    }

}



/* =========================================================
   37. DESKTOP
========================================================= */

@media (min-width: 1200px) {

    .game-hud {
        width: 760px;
    }


    .home-content {
        width: 510px;
    }

}



/* =========================================================
   38. TOUCH DEVICES
========================================================= */

@media
(hover: none)
and
(pointer: coarse) {

    .primary-btn:hover,
    .secondary-btn:hover,
    .pause-btn:hover {
        filter: none;

        transform: none;
    }

}



/* =========================================================
   39. REDUCED MOTION
========================================================= */

@media
(prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }

}