:root {
    --bg: #f5f7fb;
    --text: #142033;
    --muted: #64748b;
    --blue: #2563eb;
    --purple: #7c3aed;
    --card: #ffffff;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
    height: 72px;
    padding: 0 32px;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand span {
    font-size: 24px;
}

.brand small {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 22px;
    font-weight: 700;
    opacity: 0.86;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 28px;
}

.hero {
    min-height: 430px;
    border-radius: 30px;
    padding: 46px;
    color: white;
    background: radial-gradient(circle at top left, #60a5fa, transparent 35%),
                linear-gradient(135deg, var(--blue), var(--purple));
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 32px;
    align-items: center;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.25);
}

.eyebrow {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.8;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.hero h1 {
    font-size: 52px;
    margin: 12px 0 18px;
    line-height: 1.05;
}

.hero p {
    font-size: 19px;
    line-height: 1.6;
    opacity: 0.94;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
}

.primary-btn,
.secondary-btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
}

.primary-btn {
    background: white;
    color: var(--blue);
}

.secondary-btn {
    background: rgba(255,255,255,0.14);
    color: white;
    border: 1px solid rgba(255,255,255,0.35);
}

.hero-card {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 26px;
}

.hero-card h3 {
    margin-top: 0;
    font-size: 26px;
}

.hero-card li {
    margin: 10px 0;
}

.section {
    margin-top: 34px;
}

.section h1,
.section h2 {
    margin: 0 0 8px;
    font-size: 34px;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 22px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.module-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.module-tag {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 900;
}

.module-card h3 {
    margin: 14px 0 4px;
    font-size: 23px;
}

.module-zh {
    color: var(--muted);
    font-weight: 800;
}

.module-card p {
    color: var(--muted);
    line-height: 1.55;
}

.practice-panel {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.practice-panel h1 {
    margin: 14px 0 4px;
}

.practice-panel h2 {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 22px;
}

.placeholder-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
}

footer {
    max-width: 1180px;
    margin: 20px auto 40px;
    padding: 0 28px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

@media (max-width: 820px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .topbar {
        padding: 0 18px;
    }

    nav a {
        margin-left: 12px;
    }
}

/* ================================
   Mobile UI Optimization
   Target: phones and small tablets
   ================================ */

@media (max-width: 768px) {
    body {
        background: #f7f8fc;
    }

    .topbar {
        height: auto;
        min-height: 64px;
        padding: 14px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .brand span {
        font-size: 22px;
    }

    .brand small {
        font-size: 11px;
    }

    nav {
        width: 100%;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    nav a {
        margin-left: 0;
        white-space: nowrap;
        font-size: 14px;
        padding: 8px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
    }

    main {
        padding: 18px 14px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 28px 20px;
        border-radius: 22px;
        gap: 22px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    .hero h1 {
        font-size: 34px;
        line-height: 1.08;
        margin: 10px 0 14px;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 22px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
        padding: 13px 16px;
        border-radius: 14px;
        font-size: 15px;
    }

    .hero-card {
        padding: 20px;
        border-radius: 18px;
    }

    .hero-card h3 {
        font-size: 22px;
    }

    .hero-card ul {
        padding-left: 20px;
        margin-bottom: 0;
    }

    .hero-card li {
        font-size: 14px;
        line-height: 1.45;
    }

    .section {
        margin-top: 24px;
    }

    .section h1,
    .section h2 {
        font-size: 28px;
        line-height: 1.15;
    }

    .section-subtitle {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 18px;
    }

    .module-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .module-card {
        border-radius: 18px;
        padding: 20px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .module-card:hover {
        transform: none;
    }

    .module-tag {
        font-size: 11px;
        padding: 5px 8px;
    }

    .module-card h3 {
        font-size: 21px;
        margin-top: 12px;
    }

    .module-zh {
        font-size: 15px;
    }

    .module-card p {
        font-size: 15px;
        line-height: 1.5;
    }

    .practice-panel {
        border-radius: 20px;
        padding: 22px;
    }

    .practice-panel h1 {
        font-size: 28px;
    }

    .practice-panel h2 {
        font-size: 19px;
    }

    .placeholder-box {
        padding: 18px;
        border-radius: 14px;
    }

    footer {
        margin: 12px auto 28px;
        padding: 0 16px;
        flex-direction: column;
        gap: 6px;
        font-size: 12px;
        text-align: center;
    }
}

/* Extra-small phones */
@media (max-width: 420px) {
    .topbar {
        padding: 12px 14px;
    }

    main {
        padding: 14px 10px;
    }

    .hero {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-card {
        padding: 18px;
    }

    .section h1,
    .section h2 {
        font-size: 25px;
    }

    .module-card {
        padding: 18px;
    }

    .module-card h3 {
        font-size: 20px;
    }

    .practice-panel {
        padding: 20px;
    }
}
