/* =========================================
   1. 全局变量定义 (源自你的 SCSS 规范)
   ========================================= */
:root {
    /* Colors - Brand Orange Theme */
    --primary: #f8806f;
    /* Top Color */
    --primary-gradient-start: #f8806f;
    --primary-gradient-end: #fab34c;
    /* Bottom Color */
    --primary-light: #fff5ec;
    /* Very Light Orange */
    --secondary: #fab34c;
    /* Orange 500 */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg-page: #f8fafc;
    --bg-card: #ffffff;

    --text-main: #0f172a;
    --text-body: #334155;
    --text-sub: #94a3b8;
    --text-inverse: #ffffff;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 6px 16px -4px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
    --shadow-blue: 0 20px 40px -10px rgba(248, 128, 111, 0.3);
    /* Primary shadow */

    /* Layout */
    --container-width: 1200px;
    --nav-height: 70px;
}

/* =========================================
   2. 基础重置 & 排版
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   3. 组件样式
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: var(--text-inverse);
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(10, 159, 239, 0.5);
    /* Blue shadow */
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-sub);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* =========================================
   4. 导航栏 (Glassmorphism)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.logo span {
    color: var(--primary);
}

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

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-body);
}

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

/* =========================================
   5. Hero 区域
   ========================================= */
.hero {
    padding-top: calc(var(--nav-height) + 80px);
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰光斑 */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

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

.hero-text h1 {
    font-size: 56px;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* 右侧 UI 演示区 (CSS 绘制) */
.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 320px;
    height: 100%;
    background: var(--bg-card);
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    border: 8px solid #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 模拟小程序头部 */
.app-header {
    padding: 24px 20px 10px;
    background: #fff;
}

.app-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

/* 模拟仪表盘 */
.app-dashboard {
    padding: 20px;
    background: linear-gradient(180deg, #fff 0%, var(--bg-page) 100%);
    flex: 1;
}

/* 修复后的仪表盘卡片样式 */
.score-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    /* 增加垂直内边距 */
    text-align: center;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.05);
    /* 更柔和的投影 */
    margin-bottom: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* SVG 圆环容器 */
.score-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 8px;
}

/* SVG 基础设置 */
.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* 内部文字容器 */
.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.score-number {
    font-size: 36px;
    /* 加大字号 */
    font-weight: 800;
    /* Apple 风格的特粗字体 */
    color: var(--primary);
    letter-spacing: -1px;
}

.score-number span {
    font-size: 16px;
    font-weight: 600;
    margin-left: 2px;
    color: var(--text-sub);
    /* 符号颜色弱化 */
}

.score-label {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
    font-weight: 500;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #fff;
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

.task-item:nth-child(1) {
    animation-delay: 0.2s;
}

.task-item:nth-child(2) {
    animation-delay: 0.4s;
}

.task-item:nth-child(3) {
    animation-delay: 0.6s;
}

.task-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.task-gain {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   6. 核心逻辑展示 (Feature Grid)
   ========================================= */
.features {
    padding: 80px 0;
    background: #fff;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-sub);
}

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

.feature-card {
    background: var(--bg-page);
    padding: 40px 32px;
    border-radius: var(--radius-xl);
    transition: 0.3s;
    border: 1px solid transparent;
}

.feature-card:hover {
    background: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-sub);
}

/* =========================================
   7. 游戏化逻辑可视化 (Gap Analysis)
   ========================================= */
.game-logic {
    padding: 100px 0;
    background: linear-gradient(180deg, #fff 0%, var(--primary-light) 100%);
}

.logic-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.logic-visual {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-blue);
}

.bar-chart {
    display: flex;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.bar-base {
    width: 60%;
    background: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.bar-gap {
    width: 40%;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    position: relative;
}

/* 动态填充块 */
.fill-block {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.fill-1 {
    width: 9%;
    background: #93c5fd;
}

/* 3.6% -> scaled visual */
.fill-2 {
    width: 23%;
    background: #60a5fa;
}

/* 9.1% -> scaled visual */
.fill-3 {
    width: 68%;
    background: #2563eb;
}

/* 27.3% -> scaled visual */

.formula-box {
    background: var(--bg-page);
    padding: 20px;
    border-radius: var(--radius-md);
    font-family: monospace;
    color: var(--text-body);
    font-size: 14px;
    border-left: 4px solid var(--primary);
}

/* =========================================
   8. Footer
   ========================================= */
footer {
    background: #fff;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 16px;
    display: block;
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-sub);
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* =========================================
   9. 响应式适配
   ========================================= */
@media (max-width: 768px) {

    .hero-content,
    .feature-grid,
    .logic-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-visual {
        height: 400px;
    }

    .navbar .nav-links {
        display: none;
    }

    /* 简化移动端导航 */
}

/* =========================================
   10. QR Code Modal
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 360px;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    /* Make sure shadow-2xl is defined or use shadow-lg */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-page);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 18px;
}

.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.qr-code-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.qr-code-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}