/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 橙色系 */
    --primary-orange: #ff6b35;
    --primary-orange-light: #ff8c5a;
    --primary-orange-pale: #fff5f0;

    /* 辅助色 - 柔和蓝色系 */
    --secondary-blue: #4a90e2;
    --secondary-blue-light: #e8f4fd;
    --secondary-blue-dark: #357abd;

    /* 点缀色 - 学习成长 */
    --accent-green: #52c41a;
    --accent-green-light: #f6ffed;

    /* 中性色 - 柔和蓝灰系 */
    --text-color: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-light: #8c9ba5;
    --bg-color: #fafbfc;
    --card-bg: #fff;
    --border-color: #e1e8ed;

    /* 阴影 - 橙色光晕 */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(255, 107, 53, 0.15);
    --shadow-card-hover: 0 12px 32px rgba(255, 107, 53, 0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* 导航栏样式 */
.header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.logo:hover {
    color: inherit;
}

.logo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    padding: 2px 3px;
    border-radius: 8px;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.logo-sub {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-left: 7px;
    letter-spacing: 1px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.3s;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box input:focus~.search-icon,
.search-box:hover .search-icon {
    color: var(--primary-orange);
}

.nav-links {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.nav-link {
    display: none;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 15px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link.visible {
    display: inline-flex;
}

.nav-link:hover {
    background-color: var(--primary-orange-pale);
    color: var(--primary-orange);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

/* 主内容样式 */
.main {
    flex: 1;
    padding: 40px 0;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
    text-align: center;
}

.hero-highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.search-box-large {
    width: 600px;
    margin: 0 auto;
}

.search-box-large input {
    padding: 14px 24px;
    font-size: 16px;
}

/* 分类筛选样式 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-link {
    display: none;
    padding: 8px 18px;
    background-color: #e8e8e8;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
}

.filter-link.visible {
    display: inline-flex;
}

.filter-link:hover {
    background-color: var(--primary-orange-pale);
    color: var(--primary-orange);
    transform: translateY(-2px);
}

.filter-link.active {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 内容网格样式 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.content-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.content-card:hover .card-image img {
    transform: scale(1.05);
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--primary-orange-pale);
    color: var(--primary-orange);
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.card-date {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-guest {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-quote {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--primary-orange-pale) 0%, #fff 100%);
    border-left: 3px solid var(--primary-orange);
    border-radius: 0 8px 8px 0;
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-quote::before {
    content: '"';
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .header-container {
        justify-content: center;
    }

    .logo {
        order: 1;
    }

    .search-box {
        order: 2;
        width: 250px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

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

    .search-box-large {
        width: 100%;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        width: 100%;
        max-width: 400px;
    }

    .nav-links {
        justify-content: center;
    }

    .nav-link {
        font-size: 12px;
        padding: 5px 10px;
    }

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

    .category-filter {
        gap: 8px;
    }

    .filter-link {
        padding: 6px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

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

    .container {
        padding: 0 15px;
    }

    .card-content {
        padding: 15px;
    }

    .card-title {
        font-size: 16px;
    }
}