﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 全宽导航条 */
.nav-wrapper {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #d9e5f0;
    position: relative;
}

.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.site-logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(145deg, #0f2b4b, #1e4a6f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1.2rem;
}

    .nav-links a {
        text-decoration: none;
        color: #1f4a73;
        font-weight: 500;
        font-size: 1rem;
        padding: 0.3rem 0;
        border-bottom: 2px solid transparent;
        transition: 0.1s;
    }

        .nav-links a:hover {
            border-bottom-color: #1f4a73;
            color: #0a2b44;
        }

.nav-right {
    display: flex;
    gap: 1.2rem;
}

    .nav-right a {
        text-decoration: none;
        color: #1f4a73;
        font-weight: 500;
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
        border-radius: 30px;
        transition: 0.1s;
    }

        .nav-right a:hover {
            background: #dbeafe;
        }

/* 主内容容器（与导航内部对齐） */
.main-wrapper {
    max-width: 1300px;
    width: 100%;
    padding: 0 1rem 2rem 1rem;
}

/* 搜索行：居中，加宽 */
.search-row {
    display: flex;
    align-items: center;
    max-width: 800px;
    width: 100%;
    margin: 1.5rem auto 2rem auto;
    background: #ffffff;
    border-radius: 60px;
    border: 1px solid #d4e2f0;
    box-shadow: 0 4px 10px rgba(0, 20, 30, 0.04);
    transition: 0.15s;
}

    .search-row:focus-within {
        border-color: #7ca9d9;
        box-shadow: 0 0 0 3px rgba(46, 115, 182, 0.15);
    }

    .search-row input {
        flex: 1;
        background: transparent;
        border: none;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        color: #1f3d5c;
        outline: none;
    }

        .search-row input::placeholder {
            color: #7f9bb9;
            font-weight: 400;
        }

    .search-row button {
        background: transparent;
        border: none;
        padding: 0 1.8rem 0 0.8rem;
        font-size: 1.1rem;
        font-weight: 500;
        color: #336699;
        cursor: pointer;
        transition: color 0.1s;
        white-space: nowrap;
    }

        .search-row button:hover {
            color: #0a2d4e;
        }

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(105deg, #e7f0fd 0%, #d9e9fa 100%);
    border-radius: 36px;
    padding: 2rem 2.5rem;
    margin: 1.5rem 0 2rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #c5dbef;
    box-shadow: 0 6px 14px rgba(0,40,70,0.06);
}

.welcome-text h2 {
    font-size: 2rem;
    font-weight: 650;
    color: #103a5c;
    line-height: 1.2;
}

.welcome-text p {
    font-size: 1.1rem;
    color: #2c577d;
    margin-top: 0.4rem;
    max-width: 600px;
}

.stats-badge {
    background: white;
    padding: 0.8rem 1.8rem;
    border-radius: 60px;
    color: #123f64;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid #b7d3ed;
    font-size: 1.1rem;
}

/* 快速入口 */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.2rem;
    margin: 1.8rem 0 1.5rem;
}

.quick-item {
    background: white;
    border-radius: 40px;
    padding: 0.5rem 1.5rem;
    border: 1px solid #cfdbe9;
    color: #1b4b79;
    font-weight: 500;
    transition: 0.1s;
    cursor: default;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

    .quick-item:hover {
        background: #e4effa;
        border-color: #99bbdf;
    }

/* 分类头部 */
.subhead {
    color: #2c3e50;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    background: #dbeafe;
    color: #1e3a8a;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 年级折叠卡片 */
.grades-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

details {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    border: 1px solid #e9eef3;
    overflow: hidden;
}

    details:hover {
        box-shadow: 0 20px 30px -10px rgba(0, 55, 100, 0.15);
        border-color: #b9d4f0;
    }

summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.8rem;
    background: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0b3550;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

details[open] summary {
    border-bottom-color: #dde7f0;
    background: #fafdff;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "▶";
    font-size: 1.2rem;
    color: #2c6996;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

details[open] summary::after {
    content: "🔽";
    transform: rotate(0deg);
    opacity: 1;
}

.subjects-container {
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    background: #f9fcff;
}

.subject-item {
    background: #ffffff;
    border-radius: 40px;
    padding: 0.4rem 1rem 0.4rem 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 6px rgba(0,20,40,0.04);
    border: 1px solid #e2edf7;
}

    .subject-item:hover {
        border-color: #9bc0df;
        background: #f6fbff;
    }

.subject-name {
    font-weight: 650;
    color: #1c4e7c;
    font-size: 1.05rem;
}

.links {
    display: flex;
    gap: 0.5rem;
}

.paper-link {
    background: #e6f0fa;
    padding: 0.25rem 0.9rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0a3e66;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    display: inline-block;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
}

    .paper-link:hover {
        background: #c6dfff;
        border-color: #7ea6cc;
        color: #022b49;
        transform: scale(1.02);
    }

/* 底部样式（类似导航条，全宽） */
.footer-wrapper {
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #d9e5f0;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #5e6f88;
    font-size: 0.9rem;
}

    .footer-inner a {
        color: #1f4a73;
        text-decoration: none;
    }

        .footer-inner a:hover {
            text-decoration: underline;
        }

@media (max-width: 700px) {
    .nav-left {
        gap: 1rem;
    }

    .site-logo {
        font-size: 1.6rem;
    }

    .nav-links {
        gap: 0.8rem;
    }
}

@media (max-width: 600px) {
    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-left {
        flex-wrap: wrap;
    }

    .nav-right {
        margin-left: 0;
    }

    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-text h2 {
        font-size: 1.6rem;
    }

    .stats-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
    }

    .search-row {
        max-width: 100%;
    }

    .main-wrapper{
        padding:0;
    }
    .subjects-container {
        padding: 0.2rem;
    }
    .subject-item {
        padding: 0.5rem ;
    }
}