/* ===== 全局重置与变量 ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --green: #059669;
    --green-light: #34d399;
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --orange: #ea580c;
    --orange-light: #fb923c;
    --red: #dc2626;
    --red-light: #f87171;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-light);
}

.logo {
    font-size: 1.5rem;
    margin-right: 6px;
}

.nav-env {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    padding: 5rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #064e3b 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(5, 150, 105, 0.1) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.05) rotate(2deg); }
}

.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.3s;
}

.tag:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(79, 70, 229, 0.1);
}

/* ===== 主容器 ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ===== 阶段总览 ===== */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
}

.overview {
    margin-bottom: 3rem;
}

.overview-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    text-align: center;
    min-width: 120px;
    transition: all 0.3s;
}

.overview-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.2);
}

.overview-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-light);
}

.overview-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.overview-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* ===== 阶段区块 ===== */
.phase {
    margin-bottom: 3.5rem;
}

.phase-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.phase-header h2 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0.3rem;
}

.phase-time {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.phase-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--primary);
    color: white;
}

.badge-green { background: var(--green); }
.badge-purple { background: var(--purple); }
.badge-orange { background: var(--orange); }
.badge-red { background: var(--red); }

/* ===== 步骤卡片网格 ===== */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s;
    border-top: 3px solid var(--primary);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: var(--bg-card-hover);
}

.card-green { border-top-color: var(--green); }
.card-purple { border-top-color: var(--purple); }
.card-orange { border-top-color: var(--orange); }

.step-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.step-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.step-card ul {
    list-style: none;
    padding: 0;
}

.step-card li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.step-card li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: 700;
}

.card-green li::before { color: var(--green-light); }
.card-purple li::before { color: var(--purple-light); }
.card-orange li::before { color: var(--orange-light); }

/* ===== 项目卡片 ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--purple));
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: var(--bg-card-hover);
}

.project-difficulty {
    font-size: 0.8rem;
    color: var(--orange-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-stack span {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

/* ===== 资源区 ===== */
.resources {
    margin-top: 2rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.resource-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.resource-card h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.resource-card ul {
    list-style: none;
    padding: 0;
}

.resource-card li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.resource-card li:last-child {
    border-bottom: none;
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .overview-grid {
        flex-direction: column;
    }

    .overview-arrow {
        transform: rotate(90deg);
    }

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

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