/* SanskritPlayground arcade: a bright, tactile cabinet wall. */
body.arcade-center {
    --arcade-ink: #17384f;
    --arcade-deep: #172349;
    --arcade-coral: #ff685b;
    --arcade-gold: #ffd34e;
    --arcade-teal: #00a7ad;
    min-height: 100dvh;
    color: var(--arcade-ink);
    background:
        radial-gradient(ellipse at 8% 16%, rgba(255, 211, 78, .85), transparent 28rem),
        radial-gradient(ellipse at 92% 20%, rgba(255, 104, 91, .8), transparent 30rem),
        radial-gradient(ellipse at 78% 82%, rgba(42, 218, 203, .72), transparent 32rem),
        linear-gradient(135deg, #f58765 0%, #ffbd4a 34%, #66d8c5 70%, #62cde3 100%);
    background-attachment: fixed;
}

body.arcade-center .arcade-container {
    width: min(1420px, 100%);
    padding: 76px clamp(14px, 3vw, 38px) 30px;
}

body.arcade-center .arcade-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0 0 18px;
    padding: clamp(14px, 2vw, 24px) 20px;
    border: 3px solid rgba(255,255,255,.82);
    border-radius: 24px;
    color: #fffdf2;
    background:
        radial-gradient(circle at 82% 15%, rgba(255,211,78,.35), transparent 10rem),
        linear-gradient(115deg, #17384f, #245b76 56%, #3b4a83);
    box-shadow: 0 7px 0 rgba(23,56,79,.22), 0 16px 32px rgba(23,56,79,.2);
}

body.arcade-center .arcade-header::after {
    position: absolute;
    z-index: -1;
    right: 7%;
    bottom: -58px;
    width: 180px;
    height: 110px;
    content: "";
    border: 18px solid rgba(255,211,78,.7);
    border-radius: 50%;
    transform: rotate(-18deg);
}

body.arcade-center .arcade-title {
    margin: 0 0 2px;
    color: #fffdf2;
    font-family: "Fredoka", "Noto Sans Devanagari", sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 3px 0 rgba(13,32,56,.35);
}

body.arcade-center .arcade-subtitle {
    margin: 0;
    color: #ffe58a;
    font-family: "Nunito", "Noto Sans Devanagari", sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 900;
}

body.arcade-center .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr));
    gap: clamp(10px, 1.25vw, 16px);
    margin-bottom: 22px;
}

body.arcade-center .arcade-game-card {
    min-height: 184px;
    padding: 14px 15px 15px;
    border: 2px solid rgba(255,255,255,.92);
    border-top: 6px solid #0aa7af;
    border-radius: 19px;
    color: var(--arcade-ink);
    text-align: left;
    background: #b9f3e6;
    box-shadow: 0 5px 0 rgba(23,56,79,.2), 0 11px 22px rgba(23,56,79,.15);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

body.arcade-center .arcade-game-card:nth-child(6n + 1) { background: #aeeef1; border-top-color: #078f9c; }
body.arcade-center .arcade-game-card:nth-child(6n + 2) { background: #ffe18a; border-top-color: #e3a722; }
body.arcade-center .arcade-game-card:nth-child(6n + 3) { background: #bce99c; border-top-color: #599b49; }
body.arcade-center .arcade-game-card:nth-child(6n + 4) { background: #ffb4a0; border-top-color: #d34e45; }
body.arcade-center .arcade-game-card:nth-child(6n + 5) { background: #d4b9fa; border-top-color: #7451b5; }
body.arcade-center .arcade-game-card:nth-child(6n + 6) { background: #a9ddff; border-top-color: #387bb6; }

body.arcade-center .arcade-game-card::before {
    background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 58%);
}

body.arcade-center .arcade-game-card:hover {
    z-index: 2;
    transform: translateY(-4px);
    filter: saturate(1.08);
    box-shadow: 0 8px 0 rgba(23,56,79,.19), 0 17px 27px rgba(23,56,79,.21);
}

body.arcade-center .arcade-game-card:focus-visible,
body.arcade-center .wave4-stat-card:focus-visible {
    outline: 4px solid #17384f;
    outline-offset: 3px;
}

body.arcade-center .game-icon-large {
    float: left;
    width: 48px;
    margin: 0 11px 6px 0;
    font-size: 2.5rem;
    line-height: 1.05;
    filter: drop-shadow(0 2px 0 rgba(23,56,79,.16));
}

body.arcade-center .arcade-game-card h3 {
    min-height: 2.35em;
    margin: 2px 0 5px;
    color: #17384f;
    font-family: "Fredoka", "Noto Sans Devanagari", sans-serif;
    font-size: 1.13rem;
    font-weight: 700;
    line-height: 1.14;
}

body.arcade-center .arcade-game-card p {
    clear: both;
    min-height: 2.7em;
    margin: 8px 0 10px;
    color: #25465a;
    font-size: .87rem;
    font-weight: 700;
    line-height: 1.35;
}

body.arcade-center .game-badge-arcade {
    padding: 5px 10px;
    border: 1px solid rgba(23,56,79,.18);
    color: #fffdf2;
    background: #17384f;
    box-shadow: 0 2px 0 rgba(23,56,79,.18);
    font-size: .72rem;
    font-weight: 900;
}

body.arcade-center .stats-section,
body.arcade-center .my-stats-section {
    padding: clamp(15px, 2vw, 24px);
    border: 3px solid rgba(255,255,255,.82);
    border-radius: 22px;
    color: #fffdf2;
    background: linear-gradient(120deg, #17384f, #275e72);
    box-shadow: 0 7px 0 rgba(23,56,79,.2), 0 14px 30px rgba(23,56,79,.16);
}

body.arcade-center .stats-section h2,
body.arcade-center .my-stats-heading h2 {
    color: #fffdf2 !important;
    font-family: "Fredoka", "Noto Sans Devanagari", sans-serif;
}

body.arcade-center .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

body.arcade-center .stat-box {
    padding: 12px;
    border: 2px solid #fff2b2;
    border-radius: 15px;
    background: #fff0b3;
    box-shadow: 0 4px 0 #d99d24;
}

body.arcade-center .stat-number {
    color: #17384f;
    background: none;
    -webkit-text-fill-color: #17384f;
    font-family: "Fredoka", sans-serif;
    font-size: 2rem;
}

body.arcade-center .stat-label {
    color: #25465a;
    font-size: .9rem;
    font-weight: 900;
}

body.arcade-center .my-stats-intro { color: #e4f8f6; }
body.arcade-center .wave4-summary { color: #17384f; background: #ffe18a; border-color: #fff2b2; }
body.arcade-center .wave4-stat-card { min-height: 174px; padding: 13px; }
body.arcade-center .wave4-stat-name,
body.arcade-center .wave4-stat-value,
body.arcade-center .wave4-stat-label,
body.arcade-center .wave4-stat-detail,
body.arcade-center .wave4-stat-link { color: #17384f !important; }
body.arcade-center .wave4-stat-label,
body.arcade-center .wave4-stat-detail { font-weight: 800; }

@media (max-width: 700px) {
    body.arcade-center .arcade-container { padding: 68px 12px 20px; }
    body.arcade-center .arcade-header { margin-bottom: 12px; padding: 13px 15px; border-radius: 18px; }
    body.arcade-center .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    body.arcade-center .arcade-game-card { min-height: 170px; padding: 11px; border-radius: 15px; }
    body.arcade-center .game-icon-large { width: 39px; font-size: 2rem; margin-right: 7px; }
    body.arcade-center .arcade-game-card h3 { font-size: 1rem; }
    body.arcade-center .arcade-game-card p { font-size: .78rem; }
    body.arcade-center .stats-grid { gap: 8px; }
    body.arcade-center .stat-box { padding: 9px 5px; }
}

@media (max-width: 380px) {
    body.arcade-center .games-grid { grid-template-columns: 1fr; }
    body.arcade-center .arcade-game-card { min-height: 0; }
    body.arcade-center .arcade-game-card p { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    body.arcade-center *,
    body.arcade-center *::before,
    body.arcade-center *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* site-theme uses :has(#homepage), so match its ID-level specificity on this page. */
body.arcade-center:not(#homepage) {
    background:
        radial-gradient(ellipse at 8% 16%, rgba(255, 211, 78, .85), transparent 28rem),
        radial-gradient(ellipse at 92% 20%, rgba(255, 104, 91, .8), transparent 30rem),
        radial-gradient(ellipse at 78% 82%, rgba(42, 218, 203, .72), transparent 32rem),
        linear-gradient(135deg, #f58765 0%, #ffbd4a 34%, #66d8c5 70%, #62cde3 100%);
}

body.arcade-center:not(#homepage) .arcade-header {
    background:
        radial-gradient(circle at 82% 15%, rgba(255,211,78,.35), transparent 10rem),
        linear-gradient(115deg, #17384f, #245b76 56%, #3b4a83) !important;
}

body.arcade-center:not(#homepage) .arcade-header .arcade-title {
    color: #fffdf2 !important;
    -webkit-text-fill-color: #fffdf2 !important;
}

body.arcade-center:not(#homepage) .arcade-header .arcade-subtitle {
    color: #ffe58a !important;
    -webkit-text-fill-color: #ffe58a !important;
}

body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 1) { background: #aeeef1 !important; }
body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 2) { background: #ffe18a !important; }
body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 3) { background: #bce99c !important; }
body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 4) { background: #ffb4a0 !important; }
body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 5) { background: #d4b9fa !important; }
body.arcade-center:not(#homepage) .arcade-game-card:nth-child(6n + 6) { background: #a9ddff !important; }

@media (max-width: 700px) {
    body.arcade-center .arcade-container { padding-top: 150px !important; }
}
