/* ============================
   动漫共和国 - styles.css
   主色调：蓝紫渐变 + 金黄点缀
   ============================ */

:root {
    --primary: #4a6cf7;
    --primary-dark: #3651c8;
    --primary-light: #6b85f9;
    --accent: #f4c542;
    --accent-dark: #d9a92a;
    --purple: #6c5ce7;
    --bg-dark: #0f1630;
    --bg-card: #ffffff;
    --text-main: #1a1a2e;
    --text-sub: #5a5a7a;
    --text-light: #9a9ab0;
    --border: #e8e8f0;
    --radius: 16px;
    --shadow-sm: 0 2px 8px rgba(15, 22, 48, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 22, 48, 0.12);
    --shadow-lg: 0 20px 60px rgba(74, 108, 247, 0.25);
    --gradient-main: linear-gradient(135deg, #4a6cf7 0%, #6c5ce7 100%);
    --gradient-accent: linear-gradient(135deg, #f4c542 0%, #ffb547 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--text-main);
    background: #f7f8fc;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img { display: block; max-width: 100%; }

a { text-decoration: none; color: inherit; }

/* ============ 顶部导航 ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232, 232, 240, 0.8);
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(15, 22, 48, 0.08);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
}

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #a8b6fc, #6c5ce7);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 15px;
    color: var(--text-sub);
    position: relative;
    transition: color 0.2s;
}

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

.nav-links a:not(.nav-download)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s;
}

.nav-links a:not(.nav-download):hover::after { width: 100%; }

.nav-download {
    padding: 8px 20px;
    background: var(--gradient-main);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(74, 108, 247, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.5);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
}

/* ============ Hero 首屏 ============ */
.hero {
    position: relative;
    padding: 140px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108, 92, 231, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(74, 108, 247, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(244, 197, 66, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #f0f2ff 0%, #f7f8fc 100%);
    z-index: -1;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 2%),
        radial-gradient(circle at 80% 30%, rgba(74, 108, 247, 0.08) 0%, transparent 1.5%),
        radial-gradient(circle at 60% 70%, rgba(244, 197, 66, 0.1) 0%, transparent 1.5%),
        radial-gradient(circle at 30% 85%, rgba(108, 92, 231, 0.08) 0%, transparent 2%);
    background-size: 600px 600px;
    animation: floatBg 25s linear infinite;
}

@keyframes floatBg {
    from { transform: translate(0, 0); }
    to { transform: translate(-600px, -600px); }
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left { animation: fadeUp 0.8s ease-out; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(244, 197, 66, 0.15);
    color: var(--accent-dark);
    border: 1px solid rgba(244, 197, 66, 0.4);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    display: block;
    font-size: 24px;
    font-weight: 600;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-sub);
    margin-bottom: 28px;
    line-height: 1.8;
}

/* 版本信息 meta */
.meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 140px;
}

.meta-icon {
    font-size: 22px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.12), rgba(108, 92, 231, 0.12));
    border-radius: 10px;
}

.meta-text { display: flex; flex-direction: column; }
.meta-label { font-size: 12px; color: var(--text-light); }
.meta-value { font-size: 15px; font-weight: 700; color: var(--bg-dark); }

/* 按钮 */
.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 108, 247, 0.55);
}

.btn-ghost {
    background: #fff;
    color: var(--primary);
    border: 2px solid rgba(74, 108, 247, 0.3);
}

.btn-ghost:hover {
    background: rgba(74, 108, 247, 0.06);
    border-color: var(--primary);
}

.btn-icon { font-size: 18px; }

.btn-big {
    padding: 18px 48px;
    font-size: 18px;
    border-radius: 14px;
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tags span {
    padding: 6px 14px;
    background: rgba(74, 108, 247, 0.08);
    color: var(--primary);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
}

/* ============ 截图三图叠加 ============ */
.hero-right { animation: fadeUp 0.8s ease-out 0.2s backwards; }

.screenshot-wrap {
    position: relative;
    width: 100%;
    height: 540px;
    perspective: 1000px;
}

.screen {
    position: absolute;
    width: 62%;
    aspect-ratio: 9 / 16;
    border-radius: 28px;
    background: linear-gradient(145deg, #c9d4ff 0%, #a8b6fc 50%, #6c5ce7 100%);
    box-shadow:
        0 30px 60px rgba(15, 22, 48, 0.25),
        0 10px 20px rgba(108, 92, 231, 0.2);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.5s,
                filter 0.5s,
                z-index 0s;
    border: 6px solid #fff;
}

.screen::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        url(""); /* 图片地址由 img src 承载，此处留空占位 */
    background-size: cover;
    background-position: center;
}

.screen-1 {
    left: 18%;
    top: 0;
    z-index: 3;
    transform: rotate(-8deg) scale(1);
    animation: float1 6s ease-in-out infinite;
}

.screen-2 {
    left: 0;
    top: 40px;
    z-index: 2;
    transform: rotate(-20deg) scale(0.85);
    filter: brightness(0.85);
    animation: float2 7s ease-in-out infinite;
}

.screen-3 {
    right: 0;
    top: 40px;
    z-index: 1;
    transform: rotate(14deg) scale(0.85);
    filter: brightness(0.85);
    animation: float3 8s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50% { transform: rotate(-6deg) translateY(-12px); }
}

@keyframes float2 {
    0%, 100% { transform: rotate(-20deg) translateY(0) scale(0.85); }
    50% { transform: rotate(-22deg) translateY(-10px) scale(0.85); }
}

@keyframes float3 {
    0%, 100% { transform: rotate(14deg) translateY(0) scale(0.85); }
    50% { transform: rotate(16deg) translateY(-8px) scale(0.85); }
}

/* 鼠标悬停交互 - 由 JS 控制 */
.screenshot-wrap[data-active="1"] .screen-1 {
    z-index: 10;
    transform: rotate(0deg) scale(1.15) !important;
    filter: brightness(1);
    box-shadow: 0 40px 80px rgba(74, 108, 247, 0.45);
    animation: none !important;
}
.screenshot-wrap[data-active="1"] .screen-2,
.screenshot-wrap[data-active="1"] .screen-3 {
    filter: brightness(0.6) blur(1px);
    animation: none !important;
}

.screenshot-wrap[data-active="2"] .screen-2 {
    z-index: 10;
    transform: rotate(0deg) scale(1.15) !important;
    filter: brightness(1);
    box-shadow: 0 40px 80px rgba(108, 92, 231, 0.45);
    animation: none !important;
}
.screenshot-wrap[data-active="2"] .screen-1,
.screenshot-wrap[data-active="2"] .screen-3 {
    filter: brightness(0.6) blur(1px);
    animation: none !important;
}

.screenshot-wrap[data-active="3"] .screen-3 {
    z-index: 10;
    transform: rotate(0deg) scale(1.15) !important;
    filter: brightness(1);
    box-shadow: 0 40px 80px rgba(244, 197, 66, 0.35);
    animation: none !important;
}
.screenshot-wrap[data-active="3"] .screen-1,
.screenshot-wrap[data-active="3"] .screen-2 {
    filter: brightness(0.6) blur(1px);
    animation: none !important;
}

.screen-tip {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ============ Section 通用 ============ */
.section {
    padding: 100px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(74, 108, 247, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--bg-dark);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-sub);
}

/* ============ 功能特色 ============ */
.features {
    background: linear-gradient(180deg, #f7f8fc 0%, #ffffff 100%);
}

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

.feature-card {
    padding: 36px 28px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.12), rgba(108, 92, 231, 0.12));
    border-radius: 14px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--bg-dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.8;
}

/* ============ 用户评价 ============ */
.reviews { background: #f7f8fc; }

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

.review-card {
    padding: 32px 28px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.review-card::before {
    content: "\201C";
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 72px;
    line-height: 1;
    color: rgba(74, 108, 247, 0.1);
    font-family: Georgia, serif;
    font-weight: bold;
}

.review-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.review-stars {
    color: var(--accent-dark);
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.review-text {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-main);
}

.user-name {
    font-weight: 600;
    color: var(--bg-dark);
    font-size: 15px;
}

.user-from {
    font-size: 12px;
    color: var(--text-light);
}

/* ============ FAQ ============ */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.faq-item.active {
    border-color: rgba(74, 108, 247, 0.4);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.12);
}

.faq-q {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-q:hover { color: var(--primary); }

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.active .faq-a {
    max-height: 400px;
}

.faq-a p {
    padding: 0 24px 20px;
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.9;
}

/* ============ 下载区域 ============ */
.download {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f4a 50%, #2d2868 100%);
    position: relative;
    overflow: hidden;
}

.download::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(244, 197, 66, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 60% 30%, rgba(74, 108, 247, 0.2) 0%, transparent 30%);
}

.download-card {
    position: relative;
    text-align: center;
    padding: 60px 40px;
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
}

.download-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    border-radius: 24px;
    background: var(--gradient-main);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
    padding: 8px;
}

.download-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.download-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.download-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.download-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.download-meta span {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
}

.download .btn-primary {
    background: var(--gradient-accent);
    color: var(--bg-dark);
    box-shadow: 0 8px 30px rgba(244, 197, 66, 0.45);
    font-weight: 700;
}

.download .btn-primary:hover {
    box-shadow: 0 12px 40px rgba(244, 197, 66, 0.6);
}

.download-tip {
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============ 页脚 ============ */
.footer {
    background: #0a0f24;
    padding: 48px 0 32px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--gradient-main);
}

.footer-name {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.footer-slogan {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 20px; }
    .features-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .screenshot-wrap { height: 480px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(15, 22, 48, 0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 14px 24px;
        width: 100%;
    }
    .nav-links a:not(.nav-download)::after { display: none; }
    .nav-download {
        margin: 8px 24px;
        display: inline-block;
        text-align: center;
    }
    .nav-toggle { display: block; }

    .hero { padding: 120px 0 60px; }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-title { font-size: 34px; }
    .hero-subtitle { font-size: 18px; }
    .screenshot-wrap {
        height: 440px;
        margin: 0 auto;
        max-width: 340px;
    }
    .screen { width: 60%; }

    .section { padding: 70px 0; }
    .section-title { font-size: 28px; }
    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .meta-row { gap: 10px; }
    .meta-item { min-width: 120px; padding: 10px 14px; }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-links { flex-wrap: wrap; justify-content: center; }

    .download-card { padding: 40px 24px; }
    .download-title { font-size: 26px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 28px; }
    .hero-desc { font-size: 15px; }
    .btn { padding: 12px 24px; font-size: 15px; }
    .screenshot-wrap { height: 380px; }
    .section-title { font-size: 24px; }
}

/* 图片占位 - src 为空时显示渐变背景，隐藏浏览器破损图标 */
img[src=""] {
    background: linear-gradient(145deg, #c9d4ff 0%, #a8b6fc 50%, #6c5ce7 100%);
    border-radius: 14px;
    font-size: 0;
    line-height: 0;
    object-fit: cover;
    display: block;
    /* 去掉图片容器自带的 alt 文本占位 */
    color: transparent;
}

.logo-img[src=""] {
    border-radius: 10px;
    min-height: 38px;
}

.footer-logo[src=""] {
    border-radius: 10px;
    min-height: 44px;
}

.download-logo-img[src=""] {
    border-radius: 16px;
}

.user-avatar[src=""] {
    border-radius: 50%;
    min-height: 44px;
}
