:root {
    --bg: #071018;
    --bg2: #0c1a28;
    --ink: #e8f4ff;
    --muted: #8fb0c9;
    --cyan: #3ecfff;
    --gold: #ffc14a;
    --coral: #ff6b5a;
    --panel: rgba(12, 28, 44, 0.72);
    --stroke: rgba(62, 207, 255, 0.22);
    --glow: 0 0 48px rgba(62, 207, 255, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Ario, Vazir, Tahoma, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(ellipse 80% 50% at 15% -10%, rgba(62, 207, 255, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 193, 74, 0.12), transparent 50%),
        linear-gradient(180deg, var(--bg2), var(--bg) 40%, #050c12);
    line-height: 1.75;
    min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(7, 16, 24, 0.82);
    border-bottom: 1px solid var(--stroke);
}
.site-header .inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 0;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem;
}
.brand img {
    width: 42px; height: 42px; border-radius: 12px;
    box-shadow: var(--glow);
}
.nav-desktop { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-desktop a { color: var(--muted); font-weight: 600; }
.nav-desktop a:hover { color: var(--ink); text-decoration: none; }
.lang-switch { display: inline-flex; gap: 8px; align-items: center; padding: 4px 10px; border: 1px solid var(--stroke); border-radius: 999px; background: rgba(255,255,255,.04); }
.lang-switch a { font-size: .85rem; letter-spacing: .04em; }
.lang-switch a[aria-current="true"] { color: var(--ink); font-weight: 800; }
html[dir="ltr"] body { text-align: left; }
html[dir="rtl"] body { text-align: right; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 20px; border-radius: 14px;
    border: 1px solid var(--stroke); background: var(--panel);
    color: var(--ink); font-weight: 700; text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: var(--glow); }
.btn-gold {
    background: linear-gradient(135deg, #ffd76a, #ff9f2e);
    color: #1a1205; border-color: transparent;
}
.btn-cyan {
    background: linear-gradient(135deg, #4ad8ff, #1a8fd4);
    color: #041018; border-color: transparent;
}

.hero {
    position: relative;
    min-height: min(92vh, 920px);
    display: grid;
    align-items: center;
    overflow: hidden;
    padding: 36px 0 56px;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        linear-gradient(180deg, transparent 35%, rgba(7, 16, 24, 0.92) 78%),
        radial-gradient(circle at 70% 35%, rgba(62, 207, 255, 0.16), transparent 40%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0 88px,
            transparent 88px 96px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 107, 90, 0.14) 0 36px,
            rgba(255, 193, 74, 0.12) 36px 72px,
            rgba(62, 207, 255, 0.12) 72px 108px,
            rgba(123, 108, 255, 0.12) 108px 144px
        );
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    opacity: 0.55;
    animation: brickShift 18s linear infinite;
}
@keyframes brickShift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 0 0, 0 0, 48px 0, 0 72px; }
}
.hero-stack {
    position: relative; z-index: 1;
    display: grid;
    gap: 18px;
    justify-items: center;
    align-items: center;
}
.hero-play {
    position: relative;
    width: min(920px, 100%);
    height: clamp(220px, 34vh, 360px);
    pointer-events: none;
}
.hero-balls {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    opacity: .95;
}
@media (prefers-reduced-motion: reduce) {
    .hero-play { display: none; }
}
.hero-inner {
    position: relative; z-index: 1;
    display: grid; gap: 22px; max-width: 720px;
    width: 100%;
    text-align: center;
    justify-items: center;
}
.brand-hero {
    font-size: clamp(2.6rem, 8vw, 4.6rem);
    line-height: 1.05; margin: 0;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, #fff 20%, var(--cyan) 55%, var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: titleIn .8s ease both;
}
.hero h2 {
    margin: 0; font-size: clamp(1.15rem, 3vw, 1.55rem); font-weight: 700; color: var(--ink);
}
.hero .lead {
    margin: 0 auto; color: var(--muted); font-size: 1.05rem; max-width: 36rem;
}
.hero-actions {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
    justify-content: center;
}
@keyframes titleIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.section { padding: 72px 0; }
.section h2 {
    margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2rem);
}
.section .sub { margin: 0 0 28px; color: var(--muted); max-width: 40rem; }

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feature {
    padding: 22px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--stroke);
    box-shadow: var(--glow);
    animation: rise .7s ease both;
}
.feature:nth-child(2) { animation-delay: .08s; }
.feature:nth-child(3) { animation-delay: .16s; }
.feature h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--gold); }
.feature p { margin: 0; color: var(--muted); }
@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.gallery figure {
    margin: 0; overflow: hidden; border-radius: 16px;
    border: 1px solid var(--stroke); background: #0a1520;
}
.gallery img {
    width: 100%; aspect-ratio: 9/16; object-fit: cover;
    transition: transform .35s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
    padding: 10px 12px; font-size: .85rem; color: var(--muted);
}

.download-panel {
    display: grid; gap: 18px;
    padding: 28px;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    background:
        linear-gradient(135deg, rgba(62, 207, 255, 0.12), rgba(255, 193, 74, 0.08)),
        var(--panel);
}
.download-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge img { height: 54px; width: auto; }

.support-grid {
    display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px;
}
.card {
    padding: 22px; border-radius: 18px;
    background: var(--panel); border: 1px solid var(--stroke);
}
.card label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: .92rem; }
.card input, .card textarea, .card select {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--stroke); background: #07131d; color: var(--ink);
    font: inherit;
}
.card textarea { min-height: 120px; resize: vertical; }
.site-footer {
    padding: 28px 0 40px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: .92rem;
}
.site-footer .inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.nav-toggle, .nav-backdrop, .site-drawer { display: none; }

@media (max-width: 860px) {
    .features { grid-template-columns: 1fr; }
    .support-grid { grid-template-columns: 1fr; }
    .nav-desktop { display: none; }
    .nav-toggle {
        display: flex; flex-direction: column; gap: 5px;
        width: 44px; height: 44px; align-items: center; justify-content: center;
        background: transparent; border: 1px solid var(--stroke); border-radius: 12px; color: var(--ink);
    }
    .nav-toggle span { width: 18px; height: 2px; background: currentColor; display: block; }
    .nav-backdrop {
        position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50;
    }
    .nav-backdrop:not([hidden]) { display: block; }
    .site-drawer {
        position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 88vw);
        background: #0b1824; z-index: 60; padding: 18px;
        border-left: 1px solid var(--stroke);
    }
    .site-drawer:not([hidden]) { display: block; }
    .drawer-links { display: grid; gap: 10px; margin-top: 18px; }
    .drawer-links a { color: var(--ink); font-weight: 700; padding: 10px 0; }
    .drawer-head { display: flex; justify-content: space-between; align-items: center; }
    .drawer-close {
        border: 0; background: transparent; color: var(--ink); font-size: 1.6rem; cursor: pointer;
    }
}
