/* ========================================
   Coda 官网样式表
   深色主题 | 毛玻璃效果 | 响应式布局
   ======================================== */

/* CSS 变量定义 */
:root {
    /* 背景色 */
    --bg-primary: #0f0f11;
    --bg-secondary: #1a1a1e;
    --bg-tertiary: #232329;
    --bg-card: rgba(35, 35, 41, 0.6);
    --bg-card-hover: rgba(45, 45, 53, 0.8);
    --bg-glass: rgba(26, 26, 30, 0.7);

    /* 文字色 */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-tertiary: #6e6e80;
    --text-muted: #4a4a5a;

    /* 强调色 */
    --accent-primary: #64d68f;
    --accent-secondary: #f1d7a8;
    --accent-gradient: linear-gradient(135deg, #64d68f 0%, #f1d7a8 100%);

    /* 边框 */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(100, 214, 143, 0.15);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* 间距 */
    --container-max: 1200px;
    --container-padding: 24px;
}

/* 基础重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 容器 */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
   按钮组件
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #07130d;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(100, 214, 143, 0.28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(100, 214, 143, 0.36);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-xl {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: var(--radius-xl);
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(15, 15, 17, 0.9);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

.logo-img {
    display: block;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    letter-spacing: -0.5px;
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

#pageBg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -10%;
    right: -5%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: 10%;
    left: -10%;
    opacity: 0.2;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    top: 40%;
    left: 30%;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(100, 214, 143, 0.1);
    border: 1px solid rgba(100, 214, 143, 0.22);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 64px;
    flex-wrap: wrap;
}

/* 应用预览窗口 */
.hero-preview {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.app-window {
    width: 100%;
    max-width: 680px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
    transform: rotateX(5deg);
    transition: transform var(--transition-slow);
}

.app-window:hover {
    transform: rotateX(0deg) translateY(-4px);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.window-title {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin-right: 52px;
}

.window-body {
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 2.2;
}

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.calc-line.empty {
    height: 22px;
}

.calc-input {
    color: var(--text-secondary);
}

.calc-result {
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}

.calc-result.highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ========================================
   通用区域标题
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(100, 214, 143, 0.08);
    border: 1px solid rgba(100, 214, 143, 0.16);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   功能特性区域
   ======================================== */
.features {
    padding: 120px 0;
    background: linear-gradient(180deg, rgba(15, 15, 17, 0) 0%, rgba(26, 26, 30, 0.55) 100%);
}

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

.feature-card {
    padding: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 214, 143, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   演示区域
   ======================================== */
.demo {
    padding: 120px 0;
    background: rgba(26, 26, 30, 0.55);
}

.demo-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.demo-editor {
    position: sticky;
    top: 100px;
}

.demo-window {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.demo-body {
    padding: 0;
    font-family: var(--font-mono);
    font-size: 14px;
}

.demo-line {
    display: flex;
    align-items: center;
    padding: 0 20px;
    min-height: 44px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.demo-line:hover {
    background: rgba(255, 255, 255, 0.02);
}

.demo-line.empty {
    min-height: 44px;
}

.demo-line:last-child {
    border-bottom: none;
}

.line-number {
    width: 28px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-right: 16px;
    flex-shrink: 0;
}

.line-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 16px;
    overflow: hidden;
}

.line-text {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-result {
    color: var(--accent-primary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.demo-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.info-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   技术亮点区域
   ======================================== */
.tech {
    padding: 120px 0;
    background: linear-gradient(180deg, rgba(26, 26, 30, 0.55) 0%, rgba(15, 15, 17, 0) 100%);
}

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

.tech-card {
    padding: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tech-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 214, 143, 0.4), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-number {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 16px;
    opacity: 0.7;
}

.tech-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tech-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tech-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 4px 10px;
    background: rgba(100, 214, 143, 0.08);
    border: 1px solid rgba(100, 214, 143, 0.16);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-primary);
}

/* ========================================
   下载区域
   ======================================== */
.download {
    padding: 120px 0;
    background: transparent;
}

.download-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 56px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100, 214, 143, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-icon {
    margin-bottom: 24px;
}

.download-icon img {
    border-radius: 16px;
}

.download-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.download-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.download-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.install-help {
    max-width: 520px;
    margin: 32px auto 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
    text-align: left;
}

.install-help-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.install-help-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.install-help-body,
.install-help-body * {
    text-align: left;
}

.install-help-body p { margin: 0 0 14px; }
.install-help-body em { font-style: normal; color: var(--text-tertiary); }

.install-method + .install-method { margin-top: 14px; }
.install-method-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.install-help-body ol {
    margin: 0;
    padding-left: 20px;
    list-style-position: outside;
}
.install-help-body ol li {
    margin: 4px 0;
    padding-left: 4px;
}

.install-help-body pre {
    margin: 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    padding: 64px 0 32px;
    background: rgba(26, 26, 30, 0.6);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a,
.footer-col span {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.footer-col a {
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.copyright {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.version {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.github-link {
    display: flex;
    align-items: center;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.github-link:hover {
    color: var(--text-primary);
}

.footer-beian {
    text-align: center;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.footer-beian a {
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-beian a:hover {
    color: var(--text-secondary);
}

/* ========================================
   响应式布局
   ======================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-layout {
        grid-template-columns: 1fr;
    }

    .demo-editor {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta .btn {
        width: 100%;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .download-card {
        padding: 36px 24px;
    }

    .download-meta {
        flex-direction: column;
        gap: 12px;
    }

    .app-window {
        transform: none;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }

    .window-body {
        padding: 16px;
        font-size: 12px;
    }

    .calc-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
    }
}

/* ========================================
   滚动显示动画
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 平滑滚动偏移（固定导航栏高度） */
html {
    scroll-padding-top: 80px;
}

/* ========================================
   语法高亮 Token 颜色
   ======================================== */
.tok-num  { color: #8fd970; }   /* 数字 — site green 系 */
.tok-op   { color: #e8b34f; }   /* 运算符 × ÷ − + % */
.tok-var  { color: #7fb6e8; }   /* 变量引用 */
.tok-unit { color: #d9a06b; }   /* 货币 & 单位 */
.tok-kw   { color: #a78bdb; }   /* 关键词 today / in / to */

/* 光标闪烁 */
@keyframes caret-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.calc-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent-primary);
    border-radius: 1px;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: caret-blink 1.1s steps(1) infinite;
}

/* 活跃行背景 */
.calc-line.active {
    background: rgba(100, 214, 143, 0.06);
    border-radius: var(--radius-sm);
}

.demo-line.active {
    background: rgba(100, 214, 143, 0.06);
}

.demo-line.active .line-result {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Hero 合计条 */
.calc-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(100, 214, 143, 0.08);
    border: 1px solid rgba(100, 214, 143, 0.18);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 13px;
}

.calc-total-label {
    color: var(--accent-primary);
    font-weight: 500;
    opacity: 0.8;
}

.calc-total-value {
    color: var(--accent-primary);
    font-weight: 600;
}

/* 行结果引用 pill（值令牌芯片） */
.calc-pill {
    display: inline-block;
    padding: 0 7px;
    border-radius: 6px;
    background: rgba(143, 217, 112, 0.16);
    color: #b6f397;
    font-weight: 500;
}

/* ========================================
   鼠标光晕效果
   ======================================== */

/* 页面环境光晕 */
#cursorGlow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        420px circle at var(--sx, 50%) var(--sy, 50%),
        rgba(143, 217, 112, 0.07),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s;
}

/* 确保页面主内容层叠在光晕之上 */
.hero,
.features,
.demo,
.tech,
.download,
.footer,
.navbar {
    position: relative;
    z-index: 1;
}

/* 卡片近距光晕（内部填充 + 边框光圈） */
.glow-target {
    position: relative;
    overflow: hidden;
}

.glow-target::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: var(--go, 0);
    background: radial-gradient(
        240px circle at var(--gx, 50%) var(--gy, 50%),
        rgba(143, 217, 112, 0.13),
        transparent 65%
    );
    transition: opacity 0.15s;
    pointer-events: none;
}

.glow-target::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    opacity: var(--go, 0);
    background: radial-gradient(
        260px circle at var(--gx, 50%) var(--gy, 50%),
        rgba(143, 217, 112, 0.5),
        transparent 70%
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: opacity 0.15s;
    pointer-events: none;
}

/* 卡片内部子元素需在伪元素之上 */
.glow-target > * {
    position: relative;
    z-index: 1;
}
