/* =========================================
   GAMESO - ROCK PAPER SCISSORS
========================================= */

:root {
    --bg: #080b14;
    --card: #121827;
    --card-hover: #171f31;

    --text: #ffffff;
    --muted: #9aa3b5;

    --primary: #6c5ce7;
    --accent: #00d4ff;

    --border: rgba(255, 255, 255, 0.08);
}


/* =========================================
   RESET
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(108, 92, 231, 0.15),
            transparent 38%
        ),
        var(--bg);

    line-height: 1.6;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =========================================
   HEADER
========================================= */

.game-header {
    position: sticky;
    top: 0;
    z-index: 100;

    height: 70px;

    background:
        rgba(8, 11, 20, 0.90);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom:
        1px solid var(--border);
}

.header-inner {
    width:
        min(1100px, calc(100% - 32px));

    height: 100%;

    margin: auto;

    display: flex;

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


/* =========================================
   LOGO
========================================= */

.logo {
    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 20px;

    font-weight: 800;
}

.logo span {
    width: 35px;
    height: 35px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    font-size: 18px;
}

.logo strong {
    background:
        linear-gradient(
            90deg,
            #ffffff,
            #bdb9ff
        );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}


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

.back-button {
    min-height: 40px;

    padding: 0 15px;

    display: inline-flex;

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

    color: var(--muted);

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

    border:
        1px solid var(--border);

    border-radius: 10px;

    font-size: 13px;

    font-weight: 600;

    transition: 0.25s ease;
}

.back-button:hover {
    color: white;

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

    transform: translateX(-2px);
}


/* =========================================
   MAIN
========================================= */

.game-page {
    padding: 55px 0 80px;
}

.game-container {
    width:
        min(900px, calc(100% - 32px));

    margin: auto;
}


/* =========================================
   HEADING
========================================= */

.game-heading {
    text-align: center;

    margin-bottom: 30px;
}

.game-label {
    display: inline-block;

    margin-bottom: 10px;

    color: #9b93ff;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;
}

.game-heading h1 {
    font-size:
        clamp(32px, 5vw, 48px);

    line-height: 1.1;

    letter-spacing: -1.5px;

    font-weight: 800;
}

.game-heading p {
    max-width: 620px;

    margin: 12px auto 0;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================
   GAME BOX
========================================= */

.game-box {
    width:
        min(620px, 100%);

    margin: auto;

    padding: 22px;

    background:
        linear-gradient(
            145deg,
            #141b2b,
            #0e1422
        );

    border:
        1px solid var(--border);

    border-radius: 22px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);
}


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

.score-board {
    width:
        min(360px, 100%);

    margin: auto;

    padding: 12px;

    display: grid;

    grid-template-columns:
        1fr 40px 1fr;

    align-items: center;

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

    border:
        1px solid var(--border);

    border-radius: 15px;
}

.score-item {
    text-align: center;
}

.score-item span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}

.score-item strong {
    display: block;

    margin-top: 2px;

    color: white;

    font-size: 28px;

    line-height: 1.2;
}

.score-divider {
    color:
        rgba(255, 255, 255, 0.25);

    text-align: center;

    font-size: 22px;

    font-weight: 700;
}


/* =========================================
   RESULT
========================================= */

.result-box {
    min-height: 72px;

    margin: 18px 0;

    display: flex;

    flex-direction: column;

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

    text-align: center;

    background:
        rgba(108, 92, 231, 0.07);

    border:
        1px solid rgba(108, 92, 231, 0.13);

    border-radius: 15px;
}

.result-box strong {
    color: white;

    font-size: 17px;
}

.result-box span {
    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================
   BATTLE AREA
========================================= */

.battle-area {
    display: grid;

    grid-template-columns:
        1fr 70px 1fr;

    align-items: center;

    gap: 10px;

    margin: 20px 0 24px;
}

.player-choice,
.computer-choice {
    text-align: center;
}

.choice-label {
    display: block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}

.choice-display {
    width: 110px;
    height: 110px;

    margin: auto;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            #1b2438,
            #11192a
        );

    border:
        1px solid var(--border);

    border-radius: 22px;

    font-size: 54px;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.choice-display.active {
    border-color:
        rgba(0, 212, 255, 0.4);

    transform: scale(1.04);
}

.vs {
    width: 48px;
    height: 48px;

    margin: auto;

    display: grid;
    place-items: center;

    color: white;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #4f43c8
        );

    border-radius: 50%;

    font-size: 11px;

    font-weight: 900;

    box-shadow:
        0 8px 22px rgba(108, 92, 231, 0.25);
}


/* =========================================
   CHOICES TITLE
========================================= */

.choices-title {
    margin-bottom: 11px;

    text-align: center;

    color: var(--muted);

    font-size: 11px;

    font-weight: 600;
}


/* =========================================
   CHOICE BUTTONS
========================================= */

.choices {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 11px;
}

.choice-button {
    min-height: 125px;

    display: flex;

    flex-direction: column;

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

    gap: 9px;

    color: white;

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

    border:
        1px solid var(--border);

    border-radius: 16px;

    cursor: pointer;

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

.choice-button span {
    font-size: 40px;

    line-height: 1;

    transition:
        transform 0.2s ease;
}

.choice-button strong {
    font-size: 12px;
}

.choice-button:hover {
    background:
        rgba(108, 92, 231, 0.09);

    border-color:
        rgba(108, 92, 231, 0.4);

    transform: translateY(-4px);
}

.choice-button:hover span {
    transform: scale(1.12);
}

.choice-button:active {
    transform: translateY(-1px);
}

.choice-button.selected {
    border-color:
        rgba(0, 212, 255, 0.5);

    background:
        rgba(0, 212, 255, 0.08);
}


/* =========================================
   RESET
========================================= */

.reset-button {
    width: 100%;

    min-height: 42px;

    margin-top: 13px;

    color: var(--muted);

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

    border:
        1px solid var(--border);

    border-radius: 11px;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.25s ease;
}

.reset-button:hover {
    color: white;

    background:
        rgba(255, 255, 255, 0.06);
}


/* =========================================
   GAME MESSAGE
========================================= */

.game-message {
    min-height: 32px;

    margin-top: 10px;

    display: flex;

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

    text-align: center;

    color: var(--muted);

    font-size: 12px;
}

.game-message.win {
    color: #5ee7ff;
}

.game-message.lose {
    color: #ff8b9e;
}

.game-message.draw {
    color: #c4bfff;
}


/* =========================================
   INFO
========================================= */

.game-info-section {
    max-width: 760px;

    margin: 65px auto 0;
}

.game-info-section h2,
.related-section h2 {
    margin-bottom: 13px;

    color: white;

    font-size: 23px;

    line-height: 1.3;

    letter-spacing: -0.5px;
}

.game-info-section h2:not(:first-child) {
    margin-top: 38px;
}

.game-info-section p {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.8;
}

.game-info-section ul {
    padding-left: 20px;

    color: var(--muted);

    font-size: 14px;

    line-height: 2;
}


/* =========================================
   RELATED GAMES
========================================= */

.related-section {
    max-width: 760px;

    margin: 65px auto 0;
}

.related-grid {
    display: grid;

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

    gap: 12px;
}

.related-card {
    min-height: 100px;

    display: flex;

    flex-direction: column;

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

    gap: 7px;

    background: var(--card);

    border:
        1px solid var(--border);

    border-radius: 14px;

    transition: 0.25s ease;
}

.related-card:hover {
    transform: translateY(-3px);

    background: var(--card-hover);

    border-color:
        rgba(108, 92, 231, 0.35);
}

.related-card span {
    font-size: 30px;
}

.related-card strong {
    color: white;

    font-size: 12px;
}


/* =========================================
   FOOTER
========================================= */

footer {
    padding: 22px 20px;

    text-align: center;

    background: #060810;

    border-top:
        1px solid var(--border);

    color: #697284;

    font-size: 11px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 700px) {

    .game-page {
        padding: 40px 0 60px;
    }

    .game-heading h1 {
        font-size: 34px;
    }

    .game-box {
        padding: 13px;

        border-radius: 18px;
    }

    .battle-area {
        grid-template-columns:
            1fr 52px 1fr;
    }

    .choice-display {
        width: 95px;
        height: 95px;

        font-size: 45px;
    }

    .choice-button {
        min-height: 110px;
    }

    .game-info-section {
        margin-top: 50px;
    }

    .related-section {
        margin-top: 50px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-card {
        min-height: 70px;

        flex-direction: row;

        justify-content: flex-start;

        padding: 0 18px;
    }

    .related-card span {
        font-size: 25px;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 420px) {

    .game-header {
        height: 62px;
    }

    .header-inner {
        width:
            calc(100% - 24px);
    }

    .logo {
        font-size: 18px;
    }

    .logo span {
        width: 32px;
        height: 32px;

        font-size: 16px;
    }

    .back-button {
        min-height: 36px;

        padding: 0 10px;

        font-size: 11px;
    }

    .game-container {
        width:
            calc(100% - 20px);
    }

    .game-heading h1 {
        font-size: 29px;
    }

    .game-heading p {
        font-size: 12px;
    }

    .game-box {
        padding: 10px;
    }

    .score-board {
        grid-template-columns:
            1fr 30px 1fr;
    }

    .score-item strong {
        font-size: 23px;
    }

    .battle-area {
        grid-template-columns:
            1fr 38px 1fr;

        gap: 5px;
    }

    .choice-display {
        width: 78px;
        height: 78px;

        border-radius: 17px;

        font-size: 36px;
    }

    .vs {
        width: 38px;
        height: 38px;

        font-size: 9px;
    }

    .choice-button {
        min-height: 95px;

        border-radius: 13px;

        gap: 7px;
    }

    .choice-button span {
        font-size: 31px;
    }

    .choice-button strong {
        font-size: 10px;
    }

    .game-info-section h2,
    .related-section h2 {
        font-size: 20px;
    }

    .game-info-section p,
    .game-info-section ul {
        font-size: 13px;
    }
}


/* =========================================
   ACCESSIBILITY
========================================= */

button:focus-visible,
a:focus-visible {
    outline:
        2px solid var(--accent);

    outline-offset: 3px;
}
