/* ===== 米教育 · 现代化落地页 ===== */

:root {
    --bg: #f8faff;
    --white: #ffffff;
    --text: #1d2433;
    --text2: #5b6478;
    --text3: #8b94a8;
    --border: #e7ebf3;
    --primary: #4f6ef7;
    --primary-2: #7b5bf7;
    --primary-soft: rgba(79, 110, 247, 0.1);
    --shadow-sm: 0 1px 2px rgba(29, 36, 51, 0.05);
    --shadow-md: 0 8px 30px rgba(29, 36, 51, 0.08);
    --shadow-lg: 0 20px 50px rgba(79, 110, 247, 0.18);
    --radius: 16px;
}

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

html { scroll-behavior: smooth; }

/* 锚点滚动时抵消固定导航高度，避免标题被导航遮挡 */
:target {
    scroll-margin-top: 80px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.grad {
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* 键盘可访问性：焦点可见 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== 导航 ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(248, 250, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(231, 235, 243, 0.8);
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.logo-dot { color: var(--primary); }

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

.nav-links a {
    font-size: 14.5px;
    color: var(--text2);
    padding: 8px 14px;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(79, 110, 247, 0.06); }
.nav-links a.active { color: var(--primary); font-weight: 500; }

.nav-links .nav-btn {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    margin-left: 8px;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.25);
}
.nav-links .nav-btn:hover { background: var(--primary-2); color: #fff; }
.nav-links .nav-btn.active { color: #fff; background: var(--primary-2); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

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

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

.hero-badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 16.5px;
    color: var(--text2);
    line-height: 1.9;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 55px rgba(79, 110, 247, 0.25); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats {
    display: flex;
    gap: 36px;
}
.hero-stats div {
    display: flex;
    flex-direction: column;
}
.hero-stats strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.hero-stats span {
    font-size: 13px;
    color: var(--text3);
}

/* Hero 视觉 */
.hero-visual {
    position: relative;
    min-height: 320px;
}

.code-card {
    position: relative;
    z-index: 2;
    background: #1d2433;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-2deg);
}

.code-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}
.code-dots i {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #ff5f57;
}
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }

.code-card pre {
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 14px;
    color: #a5b4fc;
    margin: 0;
}

.code-bar {
    height: 8px;
    width: 60%;
    margin-top: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    opacity: 0.7;
}

.blob {
    position: absolute;
    top: -40px; right: -20px;
    width: 220px; height: 220px;
    background: linear-gradient(120deg, rgba(79, 110, 247, 0.3), rgba(123, 91, 247, 0.25));
    border-radius: 50%;
    filter: blur(30px);
    z-index: 1;
}

/* ===== 通用区块 ===== */
.section {
    padding: 72px 0;
    scroll-margin-top: 64px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    flex-shrink: 0;
}

.section-lead {
    font-size: 16px;
    color: var(--text2);
    line-height: 1.9;
    margin-bottom: 16px;
    max-width: 720px;
}

/* ===== 关于 · 信息卡片 ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: all 0.25s;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.info-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}
.info-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== 讲师 ===== */
.lecturer-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}

.lecturer-body { flex: 1; }
.lecturer-body h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
}
.lecturer-body p {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.8;
}

.lecturer-tag {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 6px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ===== 特点 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.feature-num {
    display: block;
    font-size: 34px;
    font-weight: 800;
    color: var(--border);
    margin-bottom: 16px;
    line-height: 1;
}

.feature-card h4 {
    font-size: 16.5px;
    font-weight: 600;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== 下载 ===== */
.download-panel {
    background: linear-gradient(120deg, #1d2433, #2a3352);
    border-radius: 24px;
    padding: 52px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 面板顶部装饰光斑，增强层次与立体感 */
.download-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 125, 255, 0.25), transparent 70%);
    pointer-events: none;
}

.download-panel .section-title { color: #fff; }
.download-panel .section-title::before {
    background: linear-gradient(180deg, #8fa3ff, #b39bff);
}
.download-panel .section-lead { color: rgba(255, 255, 255, 0.7); }

.download-panel .btn-primary {
    background: linear-gradient(120deg, #5f7bff, #8a6dff);
    box-shadow: 0 10px 26px rgba(95, 123, 255, 0.4);
}

.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-top: 28px;
}

.dl-info h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}
.dl-info .tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #ffd76a;
    background: rgba(255, 215, 106, 0.15);
    border: 1px solid rgba(255, 215, 106, 0.4);
    border-radius: 999px;
    padding: 1px 8px;
    margin-left: 6px;
    vertical-align: 1px;
}
.dl-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== 鸣谢 ===== */
.credits-list {
    list-style: none;
    max-width: 760px;
}

.credits-list li {
    font-size: 14.5px;
    color: var(--text2);
    line-height: 1.8;
    padding: 12px 0;
    padding-left: 18px;
    border-left: 3px solid var(--primary);
    margin-bottom: 8px;
}

.credits-sign {
    margin-top: 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

/* ===== 页脚 ===== */
footer {
    padding: 36px 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--text3);
    border-top: 1px solid var(--border);
}
footer p { margin: 3px 0; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1d2433;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .nav-links .nav-btn { margin-left: 0; text-align: center; }

    .menu-toggle { display: flex; }

    .hero { padding: 120px 0 60px; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { min-height: 200px; max-width: 340px; }
    .code-card { transform: rotate(0); }
    .blob { width: 160px; height: 160px; top: -24px; right: 0; }
    .hero h1 { font-size: 36px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
    .hero-stats { gap: 24px; }

    .info-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .download-panel { padding: 32px 24px; }
    .download-card { flex-direction: column; align-items: flex-start; }
    .lecturer-card { flex-direction: column; align-items: flex-start; gap: 16px; }
    .lecturer-tag { align-self: flex-start; }
}
