/* Slingmoon page: the look of the game (deep purple space, neon cyan orbit frames, yellow buttons, rounded type).
   Only loaded on /games/slingmoon; the site header and footer keep Blurrydream's style. */

body.theme-slingmoon {
    --bg: #0D0820;
    --surface: rgba(32, 20, 66, 0.72);
    --surface-strong: #241650;
    --border: rgba(95, 227, 240, 0.16);
    --sm-cyan: #5FE3F0;
    --sm-cyan-soft: rgba(95, 227, 240, 0.14);
    --sm-yellow: #FFC845;
    --sm-pink: #FF5C8A;
    --sm-orange: #FF8A3D;
    --sm-violet: #B06CFF;
    --sm-ink: #1A0F2E;
    --sm-font: 'Fredoka', var(--font-display);
    --muted: rgba(232, 226, 255, 0.76);
    --faint: rgba(232, 226, 255, 0.52);
    background: var(--bg);
}

/* the purple nebula of the store screenshots, brighter at the bottom */
body.theme-slingmoon::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 70% 45% at 50% 105%, rgba(154, 41, 255, 0.32), transparent 70%),
        radial-gradient(ellipse 50% 35% at 85% 10%, rgba(95, 227, 240, 0.08), transparent 70%),
        linear-gradient(180deg, #0D0820 0%, #160C34 60%, #24124A 100%);
    pointer-events: none;
}

.theme-slingmoon #bg {
    background: transparent;
}

.theme-slingmoon .section-title {
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: clamp(32px, 4.6vw, 50px);
    letter-spacing: 0;
    color: #fff;
}

.theme-slingmoon .section-subtitle {
    color: var(--sm-yellow);
    font-family: var(--sm-font);
    font-weight: 600;
}

.theme-slingmoon .breadcrumb a:hover {
    color: var(--sm-cyan);
}

.theme-slingmoon .btn-ghost {
    color: #fff;
    font-family: var(--sm-font);
    font-weight: 600;
}

.theme-slingmoon .btn-ghost:hover {
    border-color: var(--sm-cyan);
    color: var(--sm-cyan);
}

/* ---------- Hero ---------- */

.sm-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(32px, 6vw, 72px);
    align-items: center;
    margin-top: 18px;
}

.sm-brand-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sm-icon {
    width: clamp(80px, 10vw, 108px);
    height: auto;
    border-radius: 24%;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--sm-cyan), 0 0 40px rgba(95, 227, 240, 0.35);
}

.sm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--sm-cyan-soft);
    border: 2px solid var(--sm-cyan);
    border-radius: 999px;
    color: var(--sm-cyan);
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: 15px;
}

.sm-badge .pulse-dot {
    background: var(--sm-cyan);
}

.sm-logo {
    margin: 20px 0 6px;
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: clamp(58px, 9vw, 104px);
    line-height: 0.95;
    color: #fff;
    text-shadow: 0 0 40px rgba(95, 227, 240, 0.35);
}

.sm-logo span {
    display: block;
    margin-top: 6px;
    color: var(--sm-yellow);
    font-size: 0.42em;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(255, 200, 69, 0.35);
}

.sm-tagline {
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: clamp(24px, 3.2vw, 32px);
    color: var(--sm-cyan);
}

.sm-sub {
    color: #fff;
    font-size: clamp(17px, 2vw, 20px);
}

.sm-text {
    max-width: 560px;
    margin: 16px 0 28px;
    color: var(--muted);
}

.sm-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* the big yellow button of the game */
.sm-appstore {
    background: var(--sm-yellow);
    color: var(--sm-ink);
    font-family: var(--sm-font);
    font-weight: 700;
    box-shadow: 0 6px 0 #C7901C, 0 14px 30px rgba(255, 200, 69, 0.25);
}

.sm-appstore:hover {
    background: #FFD465;
    box-shadow: 0 6px 0 #C7901C, 0 18px 40px rgba(255, 200, 69, 0.4);
}

.sm-appstore:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #C7901C, 0 8px 20px rgba(255, 200, 69, 0.3);
}

.sm-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 18px;
}

.sm-stats div {
    min-width: 96px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.sm-stats dt {
    color: var(--sm-yellow);
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
}

.sm-stats dd {
    color: var(--faint);
    font-size: 13px;
}

.sm-systems {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    list-style: none;
}

.sm-systems li {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--faint);
    font-size: 13px;
}

/* ---------- Playable run (the cyan-framed screen of the store screenshots) ---------- */

.sm-try {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sm-phone {
    position: relative;
    width: min(100%, 320px);
    padding: 10px;
    background: linear-gradient(180deg, #120A2C, #1D1042);
    border: 2px solid var(--sm-cyan);
    border-radius: 32px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 50px rgba(95, 227, 240, 0.2), inset 0 0 30px rgba(95, 227, 240, 0.08);
}

.sm-canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 300 / 520;
    border-radius: 24px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.sm-canvas:focus-visible {
    outline: 2px solid var(--sm-yellow);
    outline-offset: 2px;
}

.sm-hud {
    position: absolute;
    top: 22px;
    right: 22px;
    left: 22px;
    display: grid;
    justify-items: center;
    pointer-events: none;
    color: #fff;
    font-family: var(--sm-font);
}

.sm-hud-best {
    justify-self: start;
    position: absolute;
    top: 6px;
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.sm-hud-best b {
    color: #fff;
}

.sm-hud-score {
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
}

.sm-hud-combo {
    margin-top: 4px;
    padding: 2px 10px;
    border: 1px solid var(--sm-yellow);
    border-radius: 999px;
    color: var(--sm-yellow);
    font-weight: 700;
    font-size: 12px;
}

.sm-hud-combo[hidden] {
    display: none;
}

.sm-status {
    position: absolute;
    right: 24px;
    bottom: 34px;
    left: 24px;
    padding: 8px 12px;
    background: rgba(13, 8, 32, 0.75);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #fff;
    font-family: var(--sm-font);
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    pointer-events: none;
}

.sm-status[hidden] {
    display: none;
}

.sm-try-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--sm-cyan);
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: 18px;
}

.sm-spark svg {
    display: block;
    width: 18px;
    height: 18px;
    color: var(--sm-yellow);
}

/* ---------- How to play ---------- */

.sm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    list-style: none;
}

.sm-step {
    position: relative;
    padding: 18px 22px 24px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.sm-step:hover {
    transform: translateY(-4px);
    border-color: var(--sm-cyan);
}

.sm-step-art {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 6px;
}

.sm-art-orbit {
    fill: none;
    stroke: var(--sm-cyan);
    stroke-width: 2;
    opacity: 0.8;
}

.sm-art-orbit--next {
    stroke: rgba(255, 255, 255, 0.35);
    stroke-dasharray: 4 6;
}

.sm-step--3 .sm-art-orbit--next {
    stroke: var(--sm-cyan);
    stroke-dasharray: none;
}

.sm-step--3 .sm-art-orbit:not(.sm-art-orbit--next) {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-dasharray: 4 6;
}

.sm-art-planet {
    fill: var(--sm-orange);
}

.sm-art-planet--next {
    fill: var(--sm-pink);
}

.sm-art-arc {
    fill: none;
    stroke: rgba(95, 227, 240, 0.45);
    stroke-width: 6;
    stroke-linecap: round;
}

.sm-art-trail {
    fill: none;
    stroke: var(--sm-cyan);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 2 7;
}

.sm-art-moon {
    fill: #fff;
    filter: drop-shadow(0 0 6px #bff6ff);
}

.sm-art-tap {
    fill: none;
    stroke: var(--sm-yellow);
    stroke-width: 2;
    transform-origin: 112px 80px;
    animation: sm-tap 1.6s ease-out infinite;
}

@keyframes sm-tap {
    0%   { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.sm-step-num {
    position: absolute;
    top: 14px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: var(--sm-yellow);
    border-radius: 50%;
    color: var(--sm-ink);
    font-family: var(--sm-font);
    font-weight: 700;
}

.sm-step h3,
.sm-feature h3,
.sm-shop h3 {
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.1;
}

.sm-step p,
.sm-feature p,
.sm-shop p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Features ---------- */

.sm-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    list-style: none;
}

.sm-feature {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sm-feature:hover {
    transform: translateY(-4px);
    border-color: var(--sm-cyan);
    box-shadow: 0 0 30px rgba(95, 227, 240, 0.15);
}

/* each icon sits on a little planet with its orbit, coloured in turn like the planets of the game */
.sm-feature-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--planet, var(--sm-orange)) 40%);
    border-radius: 50%;
    color: var(--sm-ink);
}

.sm-feature-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--planet, var(--sm-orange));
    border-radius: 50%;
    opacity: 0.55;
}

.sm-feature-icon svg {
    width: 24px;
    height: 24px;
}

.sm-feature:nth-child(6n + 2) { --planet: var(--sm-pink); }
.sm-feature:nth-child(6n + 3) { --planet: var(--sm-violet); }
.sm-feature:nth-child(6n + 4) { --planet: var(--sm-cyan); }
.sm-feature:nth-child(6n + 5) { --planet: var(--sm-yellow); }
.sm-feature:nth-child(6n + 6) { --planet: #7BE08A; }

.sm-shop {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 760px;
    margin: 28px auto 0;
    padding: 18px 24px;
    border: 2px dashed rgba(255, 200, 69, 0.45);
    border-radius: 20px;
}

.sm-shop-icon svg {
    display: block;
    width: 36px;
    height: 36px;
    color: var(--sm-yellow);
}

.sm-shop h3 {
    font-size: 20px;
    color: var(--sm-yellow);
}

/* ---------- Gallery ---------- */

.sm-gallery {
    justify-content: safe center;
}

.sm-gallery .gallery-item {
    border-radius: 18px;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sm-gallery .gallery-item:hover {
    transform: translateY(-6px);
    border-color: var(--sm-cyan);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(95, 227, 240, 0.3);
}

/* ---------- CTA ---------- */

.sm-cta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding: clamp(36px, 6vw, 60px) var(--gutter);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px) 0 0 / 90px 90px,
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.6) 0 1px, transparent 2px) 0 0 / 70px 70px,
        radial-gradient(ellipse 80% 70% at 50% 120%, rgba(154, 41, 255, 0.7), transparent 70%),
        #1A0F3D;
    border: 2px solid var(--sm-cyan);
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(95, 227, 240, 0.18);
}

.sm-cta-icon {
    width: 88px;
    height: auto;
    border-radius: 24%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.sm-cta-title {
    margin: 14px 0 4px;
    font-family: var(--sm-font);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1;
    color: var(--sm-yellow);
}

.sm-cta-text {
    margin-bottom: 26px;
    color: #fff;
    font-size: 18px;
}

@media (max-width: 860px) {
    .sm-hero-grid {
        grid-template-columns: 1fr;
    }

    .sm-brand {
        text-align: center;
    }

    .sm-brand-top,
    .sm-actions,
    .sm-stats,
    .sm-systems {
        justify-content: center;
    }

    .sm-text {
        margin-left: auto;
        margin-right: auto;
    }

    .sm-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }

    .sm-stats div {
        min-width: 0;
        padding: 10px 6px;
    }

    .sm-steps,
    .sm-features {
        grid-template-columns: 1fr 1fr;
    }

    .sm-step:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .sm-steps,
    .sm-features {
        grid-template-columns: 1fr;
    }

    .sm-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .sm-shop {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-art-tap {
        animation: none;
    }
}
