﻿/* PLACE AT: WorldScholarArena.Backend/wwwroot/academy/css/games.css   (new file; Alexia Math Arena. Self-contained.) */
:root {
    --bg: #041a14;
    --bg2: #0b3a2c;
    --em: #0f6b52;
    --emL: #35c79b;
    --gold: #e5c765;
    --goldD: #b8891a;
    --ink: #f4f8f6;
    --mut: #a9c2b8;
    --card: rgba(255,255,255,.07);
    --line: rgba(255,255,255,.16);
    --no: #ff7a66;
    --ok: #4be3a4;
    --a: #e2574c;
    --b: #3b82f6;
    --c: #e0a81c;
    --d: #22a06b
}

* {
    box-sizing: border-box
}

html {
    -webkit-text-size-adjust: 100%
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(1200px 700px at 15% -10%,#14614a 0,transparent 60%),radial-gradient(900px 600px at 100% 100%,#3a2a05 0,transparent 55%),var(--bg);
    color: var(--ink);
    font: 17px/1.55 Arial,Helvetica,sans-serif;
    overflow-x: hidden
}

#sky {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none
}

#app {
    position: relative;
    z-index: 1
}

a {
    color: var(--gold)
}

h1, h2, h3 {
    font-family: Georgia,'Times New Roman',serif;
    line-height: 1.15;
    margin: 0 0 10px;
    text-wrap: balance
}

h1 {
    font-size: clamp(34px,6vw,60px)
}

h2 {
    font-size: clamp(22px,3vw,30px)
}

h3 {
    font-size: 19px
}

p {
    margin: 0 0 12px
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px
}

.ga-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 18px
}

.ga-boot {
    padding: 80px 20px;
    text-align: center;
    color: var(--mut)
}

.ga-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(4,26,20,.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line)
}

    .ga-bar .ga-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        padding-top: 9px;
        padding-bottom: 9px
    }

.ga-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font: 700 19px Georgia,serif;
    margin-right: auto
}

    .ga-logo img {
        border-radius: 8px;
        display: block
    }

    .ga-logo small {
        display: block;
        font: 700 10px Arial,sans-serif;
        letter-spacing: .22em;
        color: var(--gold);
        text-transform: uppercase
    }

.ga-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center
}

    .ga-nav a, .ga-nav button {
        color: #e9f1ed;
        text-decoration: none;
        font: 700 14px Arial,sans-serif;
        padding: 8px 11px;
        border-radius: 9px;
        background: none;
        border: 0;
        cursor: pointer
    }

        .ga-nav a:hover, .ga-nav button:hover {
            background: rgba(255,255,255,.12)
        }

.ga-me {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px 5px 5px;
    font: 700 14px Arial,sans-serif
}

.ga-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 14px Georgia,serif;
    color: #06281e;
    background: var(--gold)
}

.ga-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 26px;
    align-items: center;
    padding: 38px 0 26px
}

    .ga-hero h1 em {
        font-style: normal;
        background: linear-gradient(90deg,var(--gold),#fff3c4,var(--gold));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent
    }

    .ga-hero p {
        font-size: 19px;
        color: var(--mut);
        max-width: 58ch
    }

.ga-kick {
    font: 700 12px Arial,sans-serif;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px
}

.ga-art svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 24px 40px rgba(0,0,0,.5));
    animation: gafloat 6s ease-in-out infinite
}

@keyframes gafloat {
    50% {
        transform: translateY(-10px)
    }
}

.ga-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.ga-chip {
    font: 700 13px Arial,sans-serif;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    cursor: pointer
}

    .ga-chip[aria-pressed=true] {
        background: var(--gold);
        border-color: var(--gold);
        color: #1b1503
    }

span.ga-chip {
    cursor: default
}

.ga-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: 700 16px Arial,sans-serif;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    background: var(--gold);
    color: #1b1503;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease,box-shadow .12s ease
}

    .ga-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(229,199,101,.3)
    }

    .ga-btn.line {
        background: transparent;
        color: var(--gold)
    }

    .ga-btn.dark {
        background: var(--em);
        border-color: var(--em);
        color: #fff
    }

    .ga-btn.sm {
        padding: 8px 13px;
        font-size: 14px;
        border-radius: 10px
    }

    .ga-btn.big {
        font-size: 19px;
        padding: 16px 28px
    }

    .ga-btn[disabled] {
        opacity: .5;
        cursor: not-allowed;
        transform: none
    }

    .ga-btn.no {
        background: var(--no);
        border-color: var(--no)
    }

.ga-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    align-items: center
}

.ga-grid {
    display: grid;
    gap: 14px
}

.ga-g2 {
    grid-template-columns: 1fr 1fr
}

.ga-g3 {
    grid-template-columns: repeat(3,1fr)
}

.ga-g4 {
    grid-template-columns: repeat(4,1fr)
}

.ga-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
    backdrop-filter: blur(6px)
}

.ga-mode {
    position: relative;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: transform .15s ease,border-color .15s ease
}

    .ga-mode:hover {
        transform: translateY(-5px);
        border-color: var(--gold)
    }

    .ga-mode b {
        display: block;
        font: 700 21px Georgia,serif;
        margin: 10px 0 4px
    }

    .ga-mode span {
        color: var(--mut);
        font-size: 15px
    }

    .ga-mode .ic {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 30px;
        background: linear-gradient(135deg,var(--gold),var(--goldD));
        color: #1b1503
    }

.ga-sec {
    margin: 30px 0
}

.ga-lead {
    color: var(--mut);
    max-width: 70ch
}

.ga-in {
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px 13px;
    font: 17px Arial,sans-serif;
    background: rgba(0,0,0,.25);
    color: #fff;
    width: 100%
}

    .ga-in::placeholder {
        color: #7f9a8f
    }

select.ga-in option {
    color: #111
}

textarea.ga-in {
    min-height: 90px
}

.ga-form {
    display: grid;
    gap: 12px
}

    .ga-form label {
        display: block;
        font: 700 13.5px Arial,sans-serif;
        margin-bottom: 4px;
        color: var(--mut)
    }

.ga-err {
    color: var(--no);
    font-weight: 700;
    margin: 0;
    min-height: 1em
}

.ga-note {
    background: rgba(229,199,101,.12);
    border: 1px solid rgba(229,199,101,.4);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    margin: 12px 0
}

.ga-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(2,12,9,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px
}

    .ga-modal .ga-card {
        max-width: 480px;
        width: 100%;
        background: #0b2f25;
        max-height: 92vh;
        overflow: auto
    }

.ga-code {
    font: 700 clamp(40px,9vw,84px) 'Courier New',monospace;
    letter-spacing: .14em;
    color: var(--gold);
    text-align: center;
    text-shadow: 0 0 30px rgba(229,199,101,.4)
}

.ga-pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ok);
    animation: gap 1.2s infinite
}

@keyframes gap {
    0% {
        box-shadow: 0 0 0 0 rgba(75,227,164,.7)
    }

    100% {
        box-shadow: 0 0 0 14px rgba(75,227,164,0)
    }
}
/* play */
.ga-play {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 18px 40px
}

.ga-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center
}

.ga-pl {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    min-width: 0
}

    .ga-pl.r {
        text-align: right
    }

    .ga-pl .u {
        font: 700 15px Arial,sans-serif;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .ga-pl .s {
        font: 700 30px Georgia,serif;
        color: var(--gold);
        line-height: 1
    }

    .ga-pl.me {
        border-color: var(--gold)
    }

    .ga-pl .t {
        font-size: 12.5px;
        color: var(--mut)
    }

.ga-ring {
    position: relative;
    width: 86px;
    height: 86px
}

    .ga-ring svg {
        width: 86px;
        height: 86px;
        transform: rotate(-90deg)
    }

    .ga-ring b {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font: 700 26px Georgia,serif
    }

.ga-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0
}

.ga-q {
    background: linear-gradient(160deg,rgba(255,255,255,.12),rgba(255,255,255,.04));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px 18px;
    text-align: center;
    font: 700 clamp(26px,5.4vw,46px)/1.25 Georgia,serif;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gain .35s ease
}

@keyframes gain {
    from {
        opacity: 0;
        transform: scale(.96)
    }
}

.ga-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px
}

.ga-tile {
    position: relative;
    border: 0;
    border-radius: 18px;
    padding: 22px 14px 22px 54px;
    font: 700 clamp(22px,4.4vw,32px) Georgia,serif;
    color: #fff;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 6px 0 rgba(0,0,0,.35);
    transition: transform .08s ease,filter .2s ease,opacity .2s ease;
    min-height: 84px
}

    .ga-tile:active {
        transform: translateY(4px);
        box-shadow: 0 2px 0 rgba(0,0,0,.35)
    }

    .ga-tile .sh {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        opacity: .9
    }

    .ga-tile.t0 {
        background: var(--a)
    }

    .ga-tile.t1 {
        background: var(--b)
    }

    .ga-tile.t2 {
        background: var(--c);
        color: #1b1503
    }

    .ga-tile.t3 {
        background: var(--d)
    }

    .ga-tile[disabled] {
        cursor: default
    }

    .ga-tile.dim {
        opacity: .35;
        filter: grayscale(.5)
    }

    .ga-tile.pick {
        outline: 5px solid #fff;
        outline-offset: -5px
    }

    .ga-tile.key {
        opacity: 1;
        filter: none;
        outline: 5px solid var(--gold);
        outline-offset: -5px;
        animation: gakey .5s ease
    }

        .ga-tile.key:after {
            content: '✓';
            position: absolute;
            right: 14px;
            top: 8px;
            font-size: 22px
        }

@keyframes gakey {
    50% {
        transform: scale(1.05)
    }
}

.ga-fb {
    text-align: center;
    font: 700 22px Georgia,serif;
    min-height: 34px;
    margin-top: 12px
}

    .ga-fb.ok {
        color: var(--ok)
    }

    .ga-fb.no {
        color: var(--no)
    }

.ga-rank {
    display: grid;
    gap: 6px;
    margin-top: 14px
}

.ga-rk {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px
}

    .ga-rk.me {
        border-color: var(--gold);
        background: rgba(229,199,101,.14)
    }

    .ga-rk b {
        font: 700 18px Georgia,serif;
        color: var(--gold)
    }

.ga-big {
    text-align: center;
    font: 700 clamp(60px,16vw,140px) Georgia,serif;
    color: var(--gold);
    animation: gain .4s ease
}

.ga-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin: 18px 0
}

.ga-pod {
    flex: 1;
    max-width: 200px;
    text-align: center
}

    .ga-pod .bx {
        border-radius: 14px 14px 0 0;
        background: linear-gradient(180deg,var(--gold),var(--goldD));
        color: #1b1503;
        font: 700 34px Georgia,serif;
        display: flex;
        align-items: center;
        justify-content: center
    }

    .ga-pod.p1 .bx {
        height: 150px
    }

    .ga-pod.p2 .bx {
        height: 110px;
        background: linear-gradient(180deg,#dfe6e3,#9fb3aa)
    }

    .ga-pod.p3 .bx {
        height: 80px;
        background: linear-gradient(180deg,#e0a877,#a8683a)
    }

    .ga-pod .u {
        font-weight: 700;
        margin-bottom: 6px;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .ga-pod .s {
        color: var(--gold);
        font: 700 18px Georgia,serif
    }

.ga-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
    gap: 10px;
    margin: 14px 0
}

.ga-kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: center
}

    .ga-kpi b {
        display: block;
        font: 700 26px Georgia,serif;
        color: var(--gold)
    }

    .ga-kpi span {
        font-size: 13px;
        color: var(--mut)
    }

.ga-scroll {
    overflow-x: auto
}

.ga-tbl {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
    min-width: 480px
}

    .ga-tbl th, .ga-tbl td {
        text-align: left;
        padding: 9px 10px;
        border-bottom: 1px solid var(--line);
        vertical-align: middle
    }

    .ga-tbl thead th {
        font: 700 12px Arial,sans-serif;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--gold)
    }

    .ga-tbl tr.me td {
        background: rgba(229,199,101,.14)
    }

.ga-cell {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    border-radius: 8px;
    padding: 4px 6px;
    font: 700 13px Arial,sans-serif;
    background: rgba(255,255,255,.08)
}

    .ga-cell.hi {
        background: #1f7a5c
    }

    .ga-cell.mid {
        background: #8a6a12
    }

    .ga-cell.lo {
        background: #a23b2a
    }

.ga-xp {
    height: 8px;
    border-radius: 5px;
    background: rgba(255,255,255,.14);
    overflow: hidden
}

    .ga-xp i {
        display: block;
        height: 100%;
        background: linear-gradient(90deg,var(--emL),var(--gold));
        border-radius: 5px
    }

#toasts {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 80;
    display: grid;
    gap: 8px;
    max-width: min(360px,92vw)
}

.ga-toast {
    background: #0b2f25;
    border: 1px solid var(--gold);
    border-left: 6px solid var(--gold);
    border-radius: 12px;
    padding: 12px 14px;
    font: 700 15px Arial,sans-serif;
    box-shadow: 0 12px 30px rgba(0,0,0,.5);
    animation: gain .3s ease
}

.ga-foot {
    color: var(--mut);
    font-size: 13.5px;
    padding: 24px 0 30px;
    border-top: 1px solid var(--line);
    margin-top: 30px
}

    .ga-foot p {
        margin: 0 0 6px;
        max-width: 95ch
    }

.ga-print {
    display: none
}

body.ga-admin {
    background: #f6f2e4;
    color: #1d2a26
}

.ga-admin .ga-card {
    background: #fffdf6;
    border-color: #d9d0b4;
    backdrop-filter: none
}

.ga-admin h1, .ga-admin h2 {
    color: #0b4a38
}

.ga-admin .ga-tbl th, .ga-admin .ga-tbl td {
    border-color: #e8e2cf
}

.ga-admin .ga-tbl thead th {
    color: #0b4a38
}

.ga-admin .ga-in {
    background: #fff;
    color: #1d2a26;
    border-color: #cfc8b2
}

.ga-admin .ga-kpi {
    background: #f3efe2;
    border-color: #d9d0b4
}

    .ga-admin .ga-kpi b {
        color: #0b4a38
    }

    .ga-admin .ga-kpi span, .ga-admin .ga-form label {
        color: #55645e
    }

.ga-admin .ga-btn.line {
    color: #0b4a38;
    border-color: #0b4a38
}

.ga-admin .ga-bar {
    background: #06281e
}

@media (max-width:860px) {
    .ga-hero, .ga-g2 {
        grid-template-columns: 1fr
    }

    .ga-g3, .ga-g4 {
        grid-template-columns: 1fr 1fr
    }

    .ga-art {
        max-width: 420px;
        margin: 0 auto
    }
}

@media (max-width:520px) {
    .ga-g3, .ga-g4 {
        grid-template-columns: 1fr
    }

    .ga-tiles {
        grid-template-columns: 1fr
    }

    .ga-tile {
        min-height: 64px;
        padding-top: 16px;
        padding-bottom: 16px
    }

    .ga-ring, .ga-ring svg {
        width: 66px;
        height: 66px
    }

        .ga-ring b {
            font-size: 20px
        }

    .ga-pl .s {
        font-size: 24px
    }

    .ga-q {
        min-height: 110px;
        padding: 20px 12px
    }
}

@media (prefers-reduced-motion:reduce) {
    .ga-art svg, .ga-q, .ga-big, .ga-pulse, .ga-tile.key {
        animation: none
    }

    .ga-btn, .ga-mode, .ga-tile {
        transition: none
    }
}

@media print {
    @page {
        margin: 14mm
    }

    #sky, .ga-bar, .ga-foot, .ga-btns, .ga-btn, #toasts, .ga-noprint {
        display: none !important
    }

    body {
        background: #fff;
        color: #1d2a26
    }

    .ga-print {
        display: flex;
        align-items: center;
        gap: 12px;
        border-bottom: 3px solid #b8891a;
        padding-bottom: 10px;
        margin-bottom: 14px
    }

        .ga-print img {
            width: 46px;
            height: 46px;
            border-radius: 8px
        }

        .ga-print b {
            font: 700 16pt Georgia,serif;
            color: #0b4a38
        }

        .ga-print span {
            display: block;
            font-size: 9.5pt;
            color: #55645e
        }

    .ga-card, .ga-kpi, .ga-rk, .ga-pl {
        background: #fbf8f0;
        border-color: #d9d0b4;
        color: #1d2a26
    }

    h1, h2, h3 {
        color: #0b4a38
    }

    .ga-kpi b, .ga-rk b, .ga-pod .s, .ga-tbl thead th {
        color: #0b4a38
    }

    .ga-kpi span, .ga-lead {
        color: #55645e
    }

    .ga-tbl th, .ga-tbl td {
        border-color: #d9d0b4
    }

    .ga-pod .bx, .ga-cell, .ga-kpi, .ga-rk {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact
    }

    .ga-cell {
        color: #fff
    }

    .ga-kick {
        color: #b8891a
    }
}
