@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=ZCOOL+KuaiLe&display=swap');

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

:root {
    --primary: #1e3a5f;
    --accent: #ff6b35;
    --bg: #ffffff;
    --bg-light: #f5f7fa;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e6ed;
    --shadow: 0 2px 12px rgba(30, 58, 95, 0.1);
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
    color: var(--primary);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--primary);
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-family: 'ZCOOL KuaiLe', sans-serif;
    font-size: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    display: block;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--accent);
    color: #fff;
}

/* Search Bar */
.search-bar {
    background: var(--bg-light);
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 16px;
    font-family: 'Noto Sans SC', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--accent);
}

.search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #e55a2b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2d5a87 100%);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 42px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Section */
.section {
    padding: 50px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.more-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

.more-link:hover {
    text-decoration: underline;
}

/* Category Navigation */
.category-nav {
    background: var(--bg-light);
    padding: 30px 0;
    border-radius: 12px;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.category-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.category-name {
    font-weight: 500;
    color: var(--primary);
    font-size: 14px;
}

/* Resource Cards Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.resource-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.15);
}

.poster {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: var(--bg-light);
    overflow: hidden;
}

.poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.poster-quality {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.resource-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.resource-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-meta {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 10px;
}

.resource-meta span {
    margin-right: 10px;
}

.rating {
    color: var(--accent);
    font-weight: 500;
}

.download-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: auto;
    text-align: center;
    display: block;
    width: 100%;
}

.download-btn:hover {
    background: var(--accent);
}

/* Ranking List */
.ranking-list {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.3s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    padding-left: 8px;
}

.ranking-num {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.ranking-item:nth-child(1) .ranking-num {
    background: #ffd700;
    color: #fff;
}

.ranking-item:nth-child(2) .ranking-num {
    background: #c0c0c0;
    color: #fff;
}

.ranking-item:nth-child(3) .ranking-num {
    background: #cd7f32;
    color: #fff;
}

.ranking-item:nth-child(n+4) .ranking-num {
    background: var(--primary);
    color: #fff;
}

.ranking-title {
    flex: 1;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
}

.ranking-title:hover {
    color: var(--accent);
}

.ranking-rating {
    color: var(--accent);
    font-weight: 500;
    font-size: 14px;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 500;
    color: var(--primary);
    min-width: 70px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn {
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Content Pages */
.content-page {
    padding: 40px 0;
}

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2d5a87 100%);
    color: #fff;
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    font-size: 16px;
}

/* About Page */
.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.about-section p {
    margin-bottom: 12px;
    color: var(--text-light);
    line-height: 1.8;
}

.about-section ul {
    list-style: none;
    padding-left: 0;
}

.about-section ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
}

.about-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Contact Page */
.contact-form {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Noto Sans SC', sans-serif;
    background: #fff;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background: #e55a2b;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-card .icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.contact-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* New Resources Page */
.date-group {
    margin-bottom: 40px;
}

.date-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.date-badge {
    background: var(--accent);
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
}

.date-count {
    color: var(--text-light);
    font-size: 14px;
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        justify-content: center;
    }

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

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

    .section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 22px;
    }

    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .resource-title {
        font-size: 14px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .footer-grid {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .poster {
        padding-top: 130%;
    }

    .resource-info {
        padding: 10px;
    }

    .main-nav a {
        padding: 8px 14px;
        font-size: 14px;
    }

    .logo {
        font-size: 22px;
    }
}