/* style.css - Antigravity 风格 (白底+高级粒子排版) */

:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #5f6368;
    --link-color: #1a73e8;
    --nav-height: 72px;
    --btn-bg: #111111;
    --btn-text: #ffffff;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --bg-color: #0b0f19; /* 稍微带点蓝灰的极?*/
    --text-primary: #ffffff;
    --text-secondary: #9aa0a6;
    --link-color: #8ab4f8;
    --btn-bg: #ffffff;
    --btn-text: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    min-height: 100vh;
    position: relative;
}

/* ================= 粒子背景 Canvas ================= */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* 让鼠标事件穿透到下方的按钮和链接 */
}

/* ================= 顶栏 ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    margin-right: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(128,128,128,0.08);
}

.btn-download-nav {
    display: inline-block;
    background-color: var(--text-primary);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-download-nav:hover {
    background-color: #000000;
    transform: translateY(-1px);
}

/* ================= 主体内容?================= */
.hero {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.hero-brand {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: block;
}

/* 打字机光标：跟在 span 之后，紧贴最后一个字 */
.typewriter-text::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background-color: var(--text-primary);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink-caret 0.75s step-end infinite;
}

/* 光标闪烁动画 */
@keyframes blink-caret {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.highlight-free {
    color: #34A853; /* 绿色 */
    font-weight: 600;
    margin: 0 2px;
}

[data-theme="dark"] .highlight-free {
    color: #81c995;
}

.hero-footer {
    position: fixed;
    bottom: 32px;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    pointer-events: auto;
    letter-spacing: 1px;
    z-index: 20;
}

.copy-hint {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(128, 128, 128, 0.3);
    transition: color 0.2s;
    pointer-events: auto;
}

.copy-hint:hover {
    color: var(--text-primary);
}

/* ================= 新版极简按钮 ================= */
.cta-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.btn-download-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 48px;
    border-radius: 9999px; /* 完美胶囊?*/
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, background-color 0.3s;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
    min-width: 180px; /* 防止加载中文字变化导致元素抖?*/
}

.btn-download-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    opacity: 0.9;
}

.btn-download-main:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-download-main.loading {
    cursor: wait;
    opacity: 0.7;
}

/* ================= 动画特效与揭?================= */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpAnim 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeUpAnim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= 黑白切换开?================= */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ================= 复制成功 Toast ================= */
.copy-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #222;
    color: #fff;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 100;
    white-space: nowrap;
}

[data-theme="dark"] .copy-toast {
    background-color: #e8e8e8;
    color: #111;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================= SVG ͼֽ Modal ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 16px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .modal-content {
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tag-bg);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    user-select: none;
}

.modal-close:hover {
    background: rgba(128,128,128,0.2);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    max-height: calc(90vh - 32px);
}

[data-theme="dark"] .modal-img {
    /* filter: invert(0.88) hue-rotate(180deg); Removed for raster image */
}

.clickable-card {
    cursor: pointer;
}
