@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #4a7c2e;
    --primary-dark: #2d5016;
    --primary-light: #6ba345;
    --beige: #f5f5dc;
    --beige-light: #faf8f0;
    --beige-dark: #e8e4c9;
    --text-dark: #1a3a0a;
    --text-medium: #3a5a20;
    --text-light: #6b7c5a;
    --white: #ffffff;
    --shadow: rgba(74, 124, 46, 0.12);
    --shadow-hover: rgba(74, 124, 46, 0.22);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--beige);
    color: var(--text-dark);
    line-height: 1.8;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

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

/* ========== Header / Navigation ========== */
.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--beige-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px var(--shadow);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-dark);
}

.main-nav {
    display: flex;
    list-style: none;
    gap: 8px;
}

.main-nav a {
    display: block;
    padding: 8px 18px;
    font-size: 1rem;
    color: var(--text-medium);
    border-radius: 24px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary-dark);
    padding: 14px 40px;
    border-radius: 32px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
}

/* ========== Section Titles ========== */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1rem;
}

.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ========== Category Icons ========== */
.categories-section {
    padding: 72px 24px;
    background: var(--beige-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.category-card {
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px);
}

.category-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.category-card h3 {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ========== Video Grid ========== */
.videos-section {
    padding: 72px 24px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.video-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 32px var(--shadow-hover);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--beige-dark);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.06);
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(74, 124, 46, 0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-play {
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.88rem;
}

.video-meta .views {
    color: var(--primary);
    font-weight: 500;
}

.video-tag {
    display: inline-block;
    background: var(--beige-dark);
    color: var(--primary-dark);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== Filter Buttons ========== */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--white);
    color: var(--text-medium);
    border: 2px solid var(--beige-dark);
    padding: 8px 24px;
    border-radius: 24px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== Page Banner ========== */
.page-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 56px 24px;
    text-align: center;
}

.page-banner h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.page-banner p {
    font-size: 1.1rem;
    opacity: 0.92;
    font-weight: 300;
}

/* ========== Category Detail Cards ========== */
.category-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 72px 24px;
}

.detail-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 40px var(--shadow-hover);
}

.detail-card-img {
    height: 200px;
    overflow: hidden;
}

.detail-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.detail-card:hover .detail-card-img img {
    transform: scale(1.08);
}

.detail-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-card-body h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.detail-card-body p {
    color: var(--text-medium);
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 14px;
}

.detail-card .video-count {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ========== Popular / Ranking ========== */
.popular-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 72px 24px;
}

.ranking-column h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 3px 12px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ranking-item:hover {
    transform: translateX(6px);
    box-shadow: 0 6px 24px var(--shadow-hover);
}

.ranking-num {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem;
    color: var(--primary);
    min-width: 42px;
    text-align: center;
}

.ranking-item:nth-child(1) .ranking-num { color: #d4a017; }
.ranking-item:nth-child(2) .ranking-num { color: #b0b0b0; }
.ranking-item:nth-child(3) .ranking-num { color: #c07840; }

.ranking-thumb {
    width: 100px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-weight: 600;
}

.ranking-info .ranking-stats {
    color: var(--text-light);
    font-size: 0.82rem;
}

/* ========== About Page ========== */
.about-section {
    padding: 72px 24px;
}

.about-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 72px;
}

.about-story-text h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.about-story-text p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 16px;
    line-height: 2;
}

.about-story-img img {
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-hover);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 72px;
}

.value-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 36px var(--shadow-hover);
}

.value-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--beige);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.value-card h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.value-card p {
    color: var(--text-medium);
    font-size: 0.92rem;
    line-height: 1.8;
}

.creators-section {
    background: var(--beige-light);
    padding: 64px 24px;
    margin: 0 -24px;
}

.creators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 36px;
}

.creator-card {
    text-align: center;
}

.creator-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    border: 4px solid var(--white);
    box-shadow: 0 6px 24px var(--shadow);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-card h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.creator-card p {
    color: var(--text-light);
    font-size: 0.88rem;
}

/* ========== Contact Page ========== */
.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    padding: 72px 24px;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 6px 28px var(--shadow);
}

.contact-form h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 28px;
    letter-spacing: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--beige-dark);
    border-radius: 8px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--beige-light);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 40px;
    border-radius: 28px;
    font-family: 'Noto Serif SC', serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px var(--shadow);
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--shadow-hover);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.info-block {
    background: var(--white);
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 4px 20px var(--shadow);
}

.info-block h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 14px;
    font-weight: 700;
}

.info-block p,
.info-block li {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 2;
}

.info-block ul {
    list-style: none;
    padding: 0;
}

.info-block ul li::before {
    content: '✓ ';
    color: var(--primary);
    font-weight: 700;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 48px 24px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: var(--white);
    color: var(--text-medium);
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 3px 10px var(--shadow);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: var(--white);
}

/* ========== Footer ========== */
.site-footer {
    background: var(--primary-dark);
    color: var(--beige);
    padding: 56px 24px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.footer-brand h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.footer-brand p {
    font-size: 0.92rem;
    line-height: 1.9;
    opacity: 0.88;
}

.footer-column h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 18px;
    font-weight: 600;
}

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

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

.footer-column a {
    color: var(--beige);
    opacity: 0.85;
    font-size: 0.92rem;
    transition: opacity 0.3s ease;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px 24px;
    text-align: center;
    font-size: 0.88rem;
    opacity: 0.75;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-layout {
        grid-template-columns: 1fr;
    }

    .creators-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-story {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 8px 24px var(--shadow);
        border-top: 2px solid var(--beige-dark);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 12px 18px;
        border-radius: 12px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-detail-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .page-banner h1 {
        font-size: 1.8rem;
    }

    .ranking-item {
        flex-wrap: wrap;
    }

    .ranking-thumb {
        width: 80px;
        height: 54px;
    }
}