/* ============================================================
   Pipe Link - Color Flow | Landing Page
   ============================================================ */

:root {
    --bg: #07121f;
    --bg-soft: #0b1c2e;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.1);
    --text: #eef6ff;
    --text-dim: #92a9c2;
    --c1: #1fe3e0;   /* cyan-teal (游戏最主要色) */
    --c2: #2e8fff;   /* blue */
    --c3: #ff5ea8;   /* pink / magenta */
    --c4: #ffc83a;   /* gold accent */
    --c5: #34d27e;   /* green */
    --grad: linear-gradient(120deg, #1fe3e0 0%, #2e8fff 48%, #ff5ea8 100%);
    --radius: 20px;
    --maxw: 1180px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Animated background ---------- */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
    animation: float 18s ease-in-out infinite;
}
.glow-1 { width: 480px; height: 480px; background: #1fe3e0; top: -120px; left: -100px; }
.glow-2 { width: 520px; height: 520px; background: #2e8fff; top: 30%; right: -160px; animation-delay: -6s; }
.glow-3 { width: 420px; height: 420px; background: #ff5ea8; bottom: -140px; left: 30%; animation-delay: -12s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled {
    background: rgba(10, 10, 20, 0.72);
    border-bottom-color: var(--border);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
}
.brand-logo { width: 34px; height: 34px; border-radius: 8px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--grad);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(46, 143, 255, 0.45);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
    padding: 80px 0 100px;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
}
.badge {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}
.hero-sub {
    margin: 22px 0 34px;
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 520px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-actions--center { justify-content: center; }

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-radius: 14px;
    background: #000;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}
.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.store-btn--google { background: linear-gradient(135deg, #102b44, #081826); }
.store-btn--apple { background: linear-gradient(135deg, #102b44, #081826); }
.store-ico { width: 26px; height: 26px; fill: #fff; flex-shrink: 0; }
.store-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-txt small { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.store-txt strong { font-size: 1.05rem; font-weight: 600; }

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 44px;
}
.stat { display: flex; flex-direction: column; }
.stat strong {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat span { font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Phone mockup ---------- */
.hero-visual { display: flex; justify-content: center; }
.phone {
    position: relative;
    border-radius: 38px;
    background: linear-gradient(160deg, #14283c, #081420);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}
.phone--hero {
    width: 300px;
    animation: rise 1s ease both, hover 6s ease-in-out infinite 1s;
}
.phone-notch {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 22px;
    background: #000;
    border-radius: 0 0 14px 14px;
    z-index: 2;
}
.phone-screen, .phone img {
    width: 100%;
    border-radius: 28px;
    display: block;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}
.eyebrow {
    display: inline-block;
    color: var(--c1);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}
.section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ---------- Features ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    padding: 32px 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(31, 227, 224, 0.5);
    background: var(--surface-2);
}
.feature-ico {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    border-radius: 16px;
    background: var(--grad);
    margin-bottom: 18px;
    box-shadow: 0 8px 22px rgba(46, 143, 255, 0.35);
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Screenshots ---------- */
.shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.phone--shot {
    padding: 8px;
    border-radius: 28px;
    transition: transform 0.3s;
}
.phone--shot:hover { transform: translateY(-10px) scale(1.02); }
.phone--shot img { border-radius: 22px; }

/* ---------- How to play ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.step {
    position: relative;
    padding: 36px 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
}
.step-no {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 20px;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 8px 22px rgba(31, 227, 224, 0.3);
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- CTA ---------- */
.cta {
    padding: 110px 0;
    text-align: center;
    position: relative;
}
.cta-inner {
    max-width: 720px;
    padding: 56px 32px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(46, 143, 255, 0.20), rgba(31, 227, 224, 0.12));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 14px;
}
.cta p {
    color: var(--text-dim);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 56px 0 28px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.footer-brand p { color: var(--text-dim); margin-top: 12px; max-width: 320px; font-size: 0.95rem; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 22px 24px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { order: 2; }
    .hero-visual { order: 1; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .shots { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 10, 20, 0.96);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .nav-links.open { max-height: 360px; }
    .nav-links a { width: 100%; padding: 16px 24px; border-top: 1px solid var(--border); }
    .nav-cta { border-radius: 0; }
    .nav-toggle { display: flex; }
    .section { padding: 70px 0; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }
}
