:root {
    --bg: #fff8ef;
    --panel: #fffdf7;
    --text: #2b2a35;
    --muted: #6a667a;
    --peach: #ffb88c;
    --mint: #8fd3b0;
    --coral: #ff7b78;
    --line: #f1d9c9;
    --shadow: 0 16px 36px rgba(59, 42, 31, 0.12);
}

* {
    box-sizing: border-box;
}

body#mainPage {
    margin: 0;
    color: var(--text);
    font-family: "M PLUS Rounded 1c", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 14% 10%, rgba(255, 184, 140, 0.38) 0, rgba(255, 184, 140, 0) 42%),
        radial-gradient(circle at 92% 24%, rgba(143, 211, 176, 0.35) 0, rgba(143, 211, 176, 0) 40%),
        linear-gradient(180deg, #fffaf2 0%, #fff7ee 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
}

.bg-shape {
    position: fixed;
    border-radius: 999px;
    filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

.shape-a {
    width: 280px;
    height: 280px;
    left: -90px;
    top: 60px;
    background: rgba(255, 123, 120, 0.2);
}

.shape-b {
    width: 220px;
    height: 220px;
    right: -80px;
    top: 380px;
    background: rgba(143, 211, 176, 0.25);
}

.hero {
    padding: 3rem 0 1rem;
    animation: fade-up 0.7s ease-out both;
}

.tag {
    margin: 0;
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 184, 140, 0.32);
    color: #9b3f2f;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#PageTitle {
    margin: 0.8rem 0 0.6rem;
    font-family: "ZCOOL XiaoWei", serif;
    font-size: clamp(2rem, 5.2vw, 3rem);
    line-height: 1.15;
}

.subtitle {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.8;
}

.card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 248, 240, 0.98));
    box-shadow: var(--shadow);
    margin: 1.2rem 0;
    padding: 1.4rem;
    animation: fade-up 0.7s ease-out both;
}

.about-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.4rem;
    align-items: center;
}

#Avatar {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 22px;
    border: 4px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 18px rgba(78, 57, 44, 0.2);
}

h2 {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
}

p {
    line-height: 1.85;
}

.link-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

#GithubLink,
#GiteeLink {
    text-decoration: none;
    color: #183442;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(24, 52, 66, 0.18);
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#GithubLink:hover,
#GiteeLink:hover {
    transform: translateY(-2px);
    background: #ffffff;
}

.timeline ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 0.2rem 0 0.8rem 1.1rem;
    border-left: 2px dashed #f2ba9e;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--coral), var(--peach));
    position: absolute;
    left: -0.38rem;
    top: 0.35rem;
}

.timeline span {
    display: inline-block;
    font-weight: 800;
    font-size: 0.92rem;
    color: #83433e;
    margin-bottom: 0.25rem;
}

.timeline p {
    margin: 0;
    color: #544e63;
}

.note-link {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    color: #7a3041;
    font-weight: 700;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 184, 140, 0.35);
    border: 1px solid rgba(122, 48, 65, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.note-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 184, 140, 0.55);
}

.lesson-page main {
    padding-bottom: 1.5rem;
}

.lesson-meta {
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.lesson-content h3 {
    margin: 0 0 0.6rem;
    font-size: 1.12rem;
}

.lesson-content p {
    margin: 0;
}

.footer {
    padding: 0.9rem 0 2.1rem;
    color: #6d6779;
    text-align: center;
    font-size: 0.95rem;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    .hero {
        padding-top: 2rem;
    }

    .about-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: left;
    }

    #Avatar {
        max-width: 170px;
    }
}