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

:root {
    --yellow: #F2D838;
    --purple: #7C33C1;
    --purple-dark: #33125C;
    --purple-light: #a855f7;
    --bg-top: #33125C;
    --bg-bot: #1A0838;
    --bg: #1A0838;
    --glass: rgba(255,255,255,0.10);
    --glass-border: rgba(255,255,255,0.18);
    --text: #f0eeff;
    --text-muted: rgba(240,238,255,0.6);
    --radius: 20px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
    background-attachment: fixed;
    color: var(--text);
    overflow-x: hidden;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(26, 8, 56, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.nav-logo img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--yellow); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.active { color: var(--yellow); }

.lang-sep {
    color: var(--glass-border);
    font-size: 0.7rem;
    pointer-events: none;
}

.nav-cta {
    background: var(--yellow);
    color: #1a0a00;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(242,216,56,0.35);
}

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 80% 35%, rgba(168,85,247,0.4) 0%, transparent 70%),
        radial-gradient(ellipse 40% 35% at 15% 75%, rgba(242,216,56,0.12) 0%, transparent 60%);
}

.hero-inner {
    position: relative;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text { max-width: 520px; position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--yellow);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

h1 span { color: var(--yellow); }

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--yellow);
    color: #1a0a00;
    padding: 15px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(242,216,56,0.4);
}

.btn-primary svg { width: 20px; height: 20px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.30);
    color: var(--text);
    padding: 15px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.45);
}

/* ── BACKGROUND SQUARES ── */
.bg-squares {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bg-sq {
    position: absolute;
    border-radius: 20%;
    will-change: transform;
}

.bg-sq-yellow { background: rgba(242,216,56,0.055); }
.bg-sq-purple { background: rgba(124,51,193,0.085); }

/* ── HERO SQUARES FIELD ── */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.squares-field {
    position: relative;
    width: 460px;
    height: 500px;
    flex-shrink: 0;
    pointer-events: none;
}

.sq {
    position: absolute;
    border-radius: 20%;
    border: 1.5px solid rgba(255,255,255,0.22);
    opacity: 0;
    animation: sqFade 0.9s ease forwards;
    animation-delay: var(--sq-delay, 0s);
    will-change: transform, opacity;
}

.sq::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, transparent 55%);
}

.sq-yellow {
    background: var(--yellow);
    box-shadow: 0 10px 32px rgba(242,216,56,0.45);
}

.sq-purple {
    background: var(--purple);
    box-shadow: 0 10px 32px rgba(124,51,193,0.5);
}

@keyframes sqFade {
    to { opacity: 1; }
}

/* ── SECTION COMMON ── */
section { padding: 100px 40px; }

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    color: var(--yellow);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.15;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 560px;
}

/* ── HOW IT WORKS ── */
#how { background: transparent; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.step-card {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius);
    padding: 36px 28px;
    position: relative;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.step-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.14);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 30px rgba(124,51,193,0.25);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--yellow);
    color: #1a0a00;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── STEP VISUALS ── */
.step-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

.step-grid {
    display: inline-grid;
    gap: 4px;
}

.step-cell {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.25);
}

.cell-a {
    background: var(--yellow);
    box-shadow: 0 2px 6px rgba(242,216,56,0.3);
}

.cell-b {
    background: var(--purple);
    box-shadow: 0 2px 6px rgba(124,51,193,0.3);
}

.step-grid-lg .step-cell {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.step-arrow {
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.step-solved-wrap {
    position: relative;
}

.step-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.step-cell-tap {
    position: relative;
}

.step-cell-tap::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: tapPulse 1.6s ease-in-out infinite;
}

.step-cell-last {
    animation: lastPulse 2s ease-in-out infinite;
}

@keyframes tapPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.4); opacity: 0; }
}

@keyframes lastPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* ── FEATURES ── */
#features { background: transparent; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 56px;
}

.feature-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 30px 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.feature-card:hover {
    border-color: rgba(242,216,56,0.45);
    background: rgba(255,255,255,0.13);
    transform: translateY(-4px);
}

.feature-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ── DIFFICULTY SHOWCASE ── */
#difficulty { background: transparent; }

.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.diff-card {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.diff-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.14);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.diff-card.highlighted {
    border-color: rgba(242,216,56,0.55);
    background: rgba(242,216,56,0.08);
}

.diff-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--yellow);
    color: #1a0a00;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-grid {
    display: inline-grid;
    gap: 3px;
    margin: 0 auto 20px;
}

.mini-cell {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.4);
}

.mini-cell[style*="#F2D838"] {
    box-shadow: 0 2px 6px rgba(242,216,56,0.55);
}

.mini-cell[style*="#7C33C1"] {
    box-shadow: 0 2px 6px rgba(124,51,193,0.55);
}

.diff-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.diff-card .diff-size {
    color: var(--yellow);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.diff-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ── DAILY CHALLENGE BANNER ── */
#daily { padding: 0 40px 100px; }

.daily-banner {
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(51,18,92,0.9) 0%, rgba(124,51,193,0.85) 60%, rgba(168,85,247,0.8) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 28px;
    padding: 56px 60px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.daily-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.daily-banner::after {
    content: '';
    position: absolute;
    bottom: -80px; right: 80px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.daily-text { position: relative; }
.daily-text .section-label { color: var(--yellow); }

.daily-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.daily-text p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 500px;
}

.daily-visual { position: relative; z-index: 1; }

.daily-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 120px;
}

.daily-cell {
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.45);
}

/* ── DOWNLOAD ── */
#download {
    text-align: center;
    padding: 100px 40px;
    position: relative;
    overflow: hidden;
}

#download .hero-bg {
    background:
        radial-gradient(ellipse 60% 60% at 50% 50%, rgba(168,85,247,0.35) 0%, transparent 70%);
}

#download .section-inner { position: relative; }

#download h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}

#download h2 span { color: var(--yellow); }

#download p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.store-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #000;
    padding: 14px 28px;
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.2);
}

.store-btn svg { width: 28px; height: 28px; flex-shrink: 0; }

.store-btn-badge {
    display: inline-block;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 0;
}
.store-btn-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255,255,255,0.2);
}
.store-btn-badge img {
    height: 60px;
    width: auto;
    display: block;
}

.store-btn-web {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 60px;
    padding: 0 22px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: 'Poppins', sans-serif;
}
.store-btn-web:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 12px 32px rgba(255,255,255,0.15);
}
.store-btn-web svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.9;
}
.store-btn-web-text small {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    line-height: 1;
    margin-bottom: 2px;
}
.store-btn-web-text strong {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
}

.store-btn-text strong {
    font-size: 1rem;
    font-weight: 800;
    color: #000;
    line-height: 1;
}

.web-play-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.web-play-link:hover {
    color: var(--yellow);
    border-color: var(--yellow);
}

/* ── CONTACT ── */
#contact { padding: 80px 40px; }

.contact-inner {
    text-align: center;
}

.contact-inner .section-desc {
    margin: 0 auto;
}

.contact-email {
    display: inline-flex;
    gap: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: 0.02em;
    margin-top: 12px;
    user-select: all;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 32px 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

footer a { color: var(--yellow); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    nav { padding: 14px 24px; }
    .nav-links { display: none; }

    #hero { padding: 90px 24px 60px; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-text { max-width: 100%; }
    .hero-actions { justify-content: center; }

    .squares-field { width: 320px; height: 280px; }

    .steps { grid-template-columns: 1fr; gap: 16px; }

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

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

    .daily-banner {
        grid-template-columns: 1fr;
        padding: 36px 28px;
        text-align: center;
    }

    .daily-visual { display: flex; justify-content: center; }

    section { padding: 70px 24px; }

    #daily { padding: 0 24px 70px; }
    #download { padding: 70px 24px; }
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
