/* 主样式表：组件与布局 */

/* ---------------- 动态背景 ---------------- */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

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

.orb-1 { width: 60vw; height: 60vw; background: var(--orb-color-1); top: -20vh; left: -10vw; animation: drift 20s infinite alternate ease-in-out; }
.orb-2 { width: 50vw; height: 50vw; background: var(--orb-color-2); bottom: -10vh; right: -10vw; animation: drift 25s infinite alternate-reverse ease-in-out; }
.orb-3 { width: 40vw; height: 40vw; background: var(--orb-color-3); top: 30vh; left: 40vw; animation: drift 22s infinite alternate ease-in-out; }

/* ---------------- 玻璃组件 ---------------- */
.glass-nav, .glass-card, .glass-badge, .glass-mockup, .glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: all 0.3s ease;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 0.95rem; font-weight: 500; position: relative; color: var(--text-primary); transition: color 0.3s ease; }
.nav-links a.active { color: var(--accent-primary); font-weight: 600; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--accent-gradient); transition: width 0.3s ease; border-radius: 2px;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--accent-primary); }

.nav-actions { display: flex; align-items: center; gap: 16px; }

/* 按钮样式 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 20px; border-radius: var(--radius-sm); font-weight: 500;
    cursor: pointer; transition: all 0.3s ease; border: none; text-decoration: none;
}
.btn-lg { padding: 12px 32px; font-size: 1.1rem; border-radius: var(--radius-md); }
.btn-primary {
    background: var(--accent-gradient); color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5); }
.btn-glass {
    background: var(--glass-bg); color: var(--text-primary);
    border: 1px solid var(--glass-border); backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.icon-btn {
    background: transparent; border: none; color: var(--text-primary); cursor: pointer;
    padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.3s ease;
}
.icon-btn:hover { background: var(--glass-border); }

/* ---------------- Hero 首屏 ---------------- */
.hero-section {
    min-height: 100vh; padding-top: 80px;
    max-width: 1300px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
    display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center;
}
.hero-section > *,
.mockup-body > * {
    min-width: 0;
}

.glass-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 24px; border: 1px solid var(--accent-primary); color: var(--accent-primary);
}
[data-theme="dark"] .glass-badge { border: 1px solid rgba(96, 165, 250, 0.5); color: #60a5fa; }

.hero-title { font-size: clamp(2.5rem, 5vw, 3.8rem); margin-bottom: 24px; letter-spacing: -1px; line-height: 1.2; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 40px; max-width: 500px; }
.hero-buttons { display: flex; gap: 16px; }
.hero-content,
.hero-visual {
    min-width: 0;
}
.page-title {
    font-size: 3rem;
    margin-bottom: 24px;
    line-height: 1.2;
}
.page-title-xl {
    font-size: 2.5rem;
    margin-bottom: 24px;
    line-height: 1.2;
}
.page-title-md {
    font-size: 2.2rem;
    margin-bottom: 16px;
    line-height: 1.25;
}
.page-title-sm {
    font-size: 1.8rem;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Mockup */
.glass-mockup {
    border-radius: var(--radius-lg); overflow: hidden;
    transform: perspective(1200px) rotateY(-8deg) rotateX(1deg); transition: transform 0.5s ease;
}
.glass-mockup:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(0deg) translateY(-10px); }
.mockup-header {
    height: 40px; background: rgba(0, 0, 0, 0.1); border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; padding: 0 16px; gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.mockup-body { display: flex; height: 400px; }
.mockup-sidebar { width: 30%; border-right: 1px solid var(--glass-border); background: rgba(0, 0, 0, 0.05); }
.mockup-content { flex: 1; padding: 32px; background: rgba(255,255,255,0.02); }
.skeleton-line { height: 12px; background: var(--glass-border); border-radius: 6px; margin-bottom: 16px; }
.w-80 { width: 80%; } .w-60 { width: 60%; } .w-full { width: 100%; } .w-90 { width: 90%; }

/* ---------------- 痛点对比区 ---------------- */
.pain-points-container {
    max-width: 1000px;
    margin: 0 auto;
}
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px var(--glass-shadow);
}
.comparison-column {
    padding: 40px;
    backdrop-filter: blur(var(--blur-strength));
}
.comparison-column.pain {
    background: rgba(239, 68, 68, 0.05);
    border-right: 1px solid var(--glass-border);
}
.comparison-column.solution {
    background: rgba(16, 185, 129, 0.05);
}
.column-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    margin-bottom: 24px;
}
.comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comparison-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.comparison-list li strong { color: var(--text-primary); }
.comparison-list li:last-child { border-bottom: none; }

/* ---------------- 特性区块 ---------------- */
.features-section { padding: 80px 0; }
.section-title { font-size: 2.5rem; margin-bottom: 48px; }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px;
}
.feature-card {
    padding: 40px 32px; border-radius: var(--radius-md); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px var(--glass-shadow); }
.card-icon { font-size: 2.5rem; margin-bottom: 24px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 16px; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------------- 工作流展示区 (Workflow) ---------------- */
.workflow-diagram {
    display: flex; justify-content: space-between; align-items: center;
    padding: 40px 32px; border-radius: var(--radius-lg); flex-wrap: wrap; gap: 16px;
}
.flow-step {
    display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
    flex: 1; min-width: 100px;
}
.flow-circle {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--glass-bg); border: 1px solid var(--accent-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: var(--accent-primary);
    box-shadow: 0 8px 16px var(--glass-shadow);
}
.flow-arrow {
    font-size: 2rem; color: var(--glass-border); opacity: 0.5;
}
@media (max-width: 768px) {
    .workflow-diagram { flex-direction: column; align-items: center; }
    .flow-arrow { transform: rotate(90deg); margin: 8px 0; }
}

/* ---------------- 场景卡片 (Scenarios) ---------------- */
.scenarios-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px;
}
.scenario-card {
    padding: 0; overflow: hidden; display: flex; flex-direction: column;
}
.scenario-img {
    height: 120px; width: 100%; opacity: 0.8;
}
.scenario-content {
    padding: 32px; flex: 1;
}
.scenario-content h3 { font-size: 1.25rem; margin-bottom: 16px; }
.scenario-content p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------------- 页脚 ---------------- */
.glass-footer { padding: 64px 0 32px; margin-top: 50px; }
.footer-content { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-secondary); margin-top: 16px; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.link-group h4 { margin-bottom: 24px; font-size: 1.1rem; }
.link-group a { display: block; color: var(--text-secondary); margin-bottom: 12px; }
.link-group a:hover { color: var(--accent-primary); }
.footer-bottom {
    text-align: center; color: var(--text-secondary); border-top: 1px solid var(--glass-border);
    padding-top: 32px; font-size: 0.9rem;
}

/* ---------------- 交互组件：Code Tabs ---------------- */
.code-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 16px;
}
.code-tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}
.code-tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}
.code-tab-content {
    display: none;
}
.code-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------------- 交互组件：Before/After Slider ---------------- */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px var(--glass-shadow);
    background: var(--bg-base);
}
.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
}
.slider-before {
    background: rgba(239, 68, 68, 0.05); /* 红色调背景代表散乱 */
    display: flex;
    flex-direction: column;
    padding: 40px;
    color: var(--text-secondary);
    height: 100%;
}
.slider-after {
    background: var(--bg-base); /* 修复滑块透视问题：改用实体底色，完全遮挡底层 */
    display: flex;
    flex-direction: column;
    width: 50%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}
.slider-after-content {
    min-width: 900px;
    height: 100%;
    padding: 40px;
}
.slider-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.slider-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.badge-before {
    background: rgba(239, 68, 68, 0.14);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.18);
}
.badge-after {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.18);
}
.slider-panel-note {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: right;
}
.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-handle::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--accent-primary);
    transform: translateX(-50%);
}
.slider-handle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    color: white;
    position: relative;
    z-index: 4;
}
@media (max-width: 768px) {
    .slider-container { height: 500px; }
    .slider-before,
    .slider-after-content { padding: 32px 24px; }
    .slider-after-content { min-width: calc(100vw - 48px); }
    .slider-panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }
    .slider-panel-note {
        text-align: left;
    }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
    .hero-section { grid-template-columns: 1fr; text-align: center; padding-top: 120px; gap: 40px; }
    .hero-subtitle { margin: 0 auto 40px; max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .glass-mockup { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); margin-top: 48px; width: 100%; }
    .comparison-grid { grid-template-columns: 1fr; }
    .comparison-column.pain { border-right: none; border-bottom: 1px solid var(--glass-border); }
}
