* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', 'Roboto', 'Microsoft YaHei', sans-serif;
    background: #0c0814;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

:root {
    --cyber: #38bdf8;
    --cyber-deep: #0ea5e9;
    --parchment: #d4a574;
    --magic: #c084fc;
    --bg-card: rgba(20, 12, 32, 0.86);
    --text-muted: #94a3b8;
}

h1, h2, h3, h4 { color: #fff; font-weight: 700; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(12, 8, 20, 0.92);
    backdrop-filter: blur(2px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 14px rgba(56, 189, 248, .5);
}
.nav-logo svg {
    width: 30px; height: 30px;
    fill: var(--cyber);
    filter: drop-shadow(0 0 8px var(--cyber-deep));
}
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--text-muted); transition: .3s; }
.nav-links a:hover { color: #fff; text-shadow: 0 0 10px var(--cyber); }
.btn-download-nav {
    padding: 8px 22px !important;
    background: linear-gradient(135deg, #7c3aed, #38bdf8);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(56, 189, 248, .4);
}
.btn-download-nav:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(56, 189, 248, .55); }

.hero-wrapper {
    position: relative;
    min-height: 110vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 5% 120px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 28%, rgba(192, 132, 252, .18) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 55%, rgba(56, 189, 248, .14) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, #1a1028 0%, #0c0814 70%);
}
.hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 14% 20%, #fff, transparent),
        radial-gradient(1px 1px at 32% 48%, #38bdf8, transparent),
        radial-gradient(1.5px 1.5px at 58% 16%, #c084fc, transparent),
        radial-gradient(1px 1px at 76% 38%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 88% 22%, #38bdf8, transparent);
    opacity: .5;
    pointer-events: none;
    z-index: 0;
}

.magic-stage {
    position: absolute;
    top: 16%;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 90vw);
    height: 320px;
    z-index: 1;
    pointer-events: none;
}
.spellbook {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 100px;
}
.book-base {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    border-radius: 6px 6px 10px 10px;
    background: linear-gradient(180deg, #8b5e3c, #5c3a22);
    box-shadow: 0 10px 28px rgba(0,0,0,.55);
}
.book-page {
    position: absolute;
    bottom: 22px;
    left: 10px;
    right: 10px;
    height: 70px;
    border-radius: 4px 4px 0 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(139, 94, 60, .12) 12px),
        linear-gradient(180deg, #f5e6c8, #d4a574);
    box-shadow: inset 0 0 20px rgba(92, 58, 34, .2);
    border: 1px solid rgba(139, 94, 60, .35);
}
.book-spine {
    position: absolute;
    bottom: 22px;
    left: 50%;
    width: 3px;
    height: 70px;
    margin-left: -1.5px;
    background: rgba(92, 58, 34, .35);
}
.magic-circle {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 180px;
    height: 180px;
    margin-left: -90px;
    border-radius: 50%;
    border: 2px solid rgba(192, 132, 252, .55);
    box-shadow: 0 0 30px rgba(192, 132, 252, .35), inset 0 0 30px rgba(56, 189, 248, .15);
    animation: circleSpin 12s linear infinite;
}
.magic-circle::before,
.magic-circle::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(56, 189, 248, .45);
}
.magic-circle::before { inset: 18px; animation: circleSpin 8s linear infinite reverse; }
.magic-circle::after {
    inset: 40px;
    border-style: solid;
    border-color: rgba(192, 132, 252, .4);
    box-shadow: 0 0 20px rgba(56, 189, 248, .3);
}
.rune {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyber);
    box-shadow: 0 0 10px var(--cyber);
    animation: runePulse 2.4s ease-in-out infinite;
}
.rune.r1 { top: 0; left: 50%; margin-left: -4px; }
.rune.r2 { bottom: 12px; left: 18px; animation-delay: .4s; }
.rune.r3 { bottom: 12px; right: 18px; animation-delay: .8s; }
.cyber-plane {
    position: absolute;
    top: 55px;
    left: 50%;
    width: 64px;
    height: 64px;
    margin-left: -32px;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, .95));
    animation: planeSummon 3.8s ease-in-out infinite;
    z-index: 2;
}
.summon-beam {
    position: absolute;
    top: 100px;
    left: 50%;
    width: 4px;
    height: 90px;
    margin-left: -2px;
    background: linear-gradient(to top, rgba(212, 165, 116, .1), rgba(56, 189, 248, .8));
    filter: blur(1px);
    animation: beamPulse 2.2s ease-in-out infinite;
}

@keyframes circleSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes planeSummon {
    0%, 100% { transform: translateY(8px) scale(.92); opacity: .75; }
    50% { transform: translateY(-14px) scale(1.05); opacity: 1; }
}
@keyframes beamPulse {
    0%, 100% { opacity: .4; height: 80px; }
    50% { opacity: .9; height: 100px; }
}
@keyframes runePulse {
    0%, 100% { opacity: .4; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin-top: 260px;
    padding: 28px 32px;
    background: rgba(20, 12, 32, .62);
    border-radius: 28px;
    border: 1px solid rgba(56, 189, 248, .28);
    backdrop-filter: blur(2px);
    box-shadow: 0 28px 60px rgba(0,0,0,.55), inset 0 0 40px rgba(192, 132, 252, .06);
}
.hero-title {
    font-size: 36px;
    margin-bottom: 18px;
    line-height: 1.35;
    background: linear-gradient(90deg, #fff, #bae6fd, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
p.hero {
    font-size: 17px;
    color: #cbd5e1;
    margin: 0 auto 28px;
    max-width: 720px;
}
.hero-buttons { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-outline, .btn-dl-card, .btn-more {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: .3s;
}
.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #38bdf8);
    color: #fff;
    box-shadow: 0 8px 24px rgba(56, 189, 248, .35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(56, 189, 248, .5); }
.btn-outline {
    border: 1.5px solid rgba(56, 189, 248, .55);
    color: #bae6fd;
    background: rgba(20, 12, 32, .45);
}
.btn-outline:hover { background: rgba(56, 189, 248, .12); border-color: #38bdf8; }

.hero-images {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
    max-width: 1100px;
}
.hero-images img {
    width: min(280px, 88vw);
    border-radius: 18px;
    border: 1px solid rgba(56, 189, 248, .25);
    box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 28px rgba(192, 132, 252, .12);
    transition: .35s;
}
.hero-images img:hover { transform: translateY(-8px); box-shadow: 0 28px 60px rgba(0,0,0,.5), 0 0 40px rgba(56, 189, 248, .25); }

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #fff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features { padding: 80px 5%; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    max-width: 1100px;
    margin: 0 auto;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(56, 189, 248, .16);
    border-radius: 18px;
    padding: 28px 24px;
    transition: .3s;
    backdrop-filter: blur(2px);
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(192, 132, 252, .45);
    box-shadow: 0 16px 40px rgba(56, 189, 248, .15);
}
.feature-card h3 { font-size: 20px; margin-bottom: 12px; color: #bae6fd; }
.feature-card p { color: var(--text-muted); font-size: 14px; }

.blog {
    padding: 80px 5%;
    background: linear-gradient(180deg, #f8f5f0 0%, #ebe4d8 100%);
}
.blog .section-title {
    background: linear-gradient(90deg, #3b1f0e, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto 36px;
}
.blog-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
    transition: .3s;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(15, 23, 42, .12); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog-content { padding: 22px 24px 26px; }
.blog-date { font-size: 13px; color: #64748b; display: block; margin-bottom: 8px; }
.blog-content h3 { font-size: 20px; margin-bottom: 10px; color: #0f172a; }
.blog-content p { color: #475569; font-size: 14px; }
.btn-more {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 28px;
    background: #1e1030;
    color: #fff;
    border-radius: 50px;
}
.btn-more:hover { background: #2a1845; }

.faq { padding: 80px 5%; max-width: 860px; margin: 0 auto; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(56, 189, 248, .14);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
}
.faq-item:hover { border-color: rgba(192, 132, 252, .35); }
.faq-question { font-size: 17px; font-weight: 700; color: #bae6fd; margin-bottom: 10px; }
.faq-answer { color: var(--text-muted); font-size: 14px; line-height: 1.75; }

.page-header {
    padding: 90px 5% 50px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 132, 252, .22) 0%, transparent 55%),
        #0c0814;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    width: 160px; height: 160px;
    top: 12%; right: 12%;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, .28);
    box-shadow: 0 0 30px rgba(192, 132, 252, .2);
    animation: circleSpin 14s linear infinite;
}
.page-header-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.page-header h1 { font-size: 36px; margin-bottom: 14px; }
.page-header p { font-size: 17px; color: var(--text-muted); }

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px 5% 90px;
}
.download-card {
    background: var(--bg-card);
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: 18px;
    padding: 32px 28px;
    transition: .3s;
}
.download-card:hover {
    transform: translateY(-5px);
    border-color: rgba(192, 132, 252, .45);
    box-shadow: 0 16px 40px rgba(56, 189, 248, .12);
}
.download-card h3 { font-size: 22px; margin-bottom: 12px; }
.download-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.btn-dl-card {
    background: linear-gradient(135deg, #7c3aed, #38bdf8);
    color: #fff;
    padding: 12px 26px;
    font-size: 15px;
}

.footer {
    background: #07050c;
    padding: 60px 5% 24px;
    border-top: 1px solid rgba(56, 189, 248, .12);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 36px;
    max-width: 1100px;
    margin: 0 auto 40px;
}
.footer-col h4 { font-size: 16px; margin-bottom: 16px; color: #bae6fd; }
.footer-col p, .footer-col li { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--cyber); }
.footer-bottom {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, .15);
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 900px) {
    .features-grid, .blog-grid, .download-grid, .footer-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 14px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
    .hero-title { font-size: 26px; }
    .hero-content { margin-top: 230px; }
}

/* === perf: reduce motion & lower GPU cost === */
.feature-card,
.blog-card,
.hero-content,
.glass-panel,
.pearl-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* perf: limit decorative infinite layers on mid/low-end devices */
@media (max-width: 768px) {
    .bubble:nth-child(n+3),
    .tiny-plane:nth-child(n+3),
    .bg-shard:nth-child(n+4),
    .orb:nth-child(n+2) {
        display: none !important;
    }
}
