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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f8ff;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links li a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-links li a:hover, .nav-links li a.active {
    background-color: #3498db;
    color: white;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #3498db;
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 搜索框 */
.search-container {
    display: flex;
    gap: 10px;
}

.search-container input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 200px;
    transition: width 0.3s ease;
}

.search-container input:focus {
    width: 250px;
    outline: none;
    border-color: #3498db;
}

.search-container button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: #2980b9;
}

/* 主内容区域 */
main {
    padding: 40px 0;
}

/* 横幅样式 */
.banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 40px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.btn-read-more:hover {
    color: #2980b9;
}

/* 取消收藏按钮样式 */
.btn-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-remove:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 核心模块样式 */
.core-modules {
    margin-bottom: 40px;
}

.core-modules h2 {
    text-align: center;
    color: white;
    font-size: 36px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.module-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.module-card h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
}

.module-card p {
    color: #666;
    margin-bottom: 20px;
}

/* 最新资源样式 */
.latest-resources {
    margin-bottom: 40px;
}

.latest-resources h2 {
    text-align: center;
    color: white;
    font-size: 36px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.resource-card {
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.resource-type {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
}

.resource-card h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 10px;
}

.resource-card p {
    color: #666;
    margin-bottom: 15px;
}

.resource-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 统一资源卡片按钮样式 */
.resource-actions .btn-read-more {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.resource-actions .btn-read-more:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 取消收藏按钮样式优化 */
.btn-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    text-decoration: none;
    line-height: 1.6;
}

.btn-remove:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 页脚样式 */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 40px 0;
    margin-top: 40px;
}

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

.footer-section h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 20px;
}

.footer-section p, .footer-section li {
    color: #ccc;
    margin-bottom: 10px;
}

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

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

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

    .search-container input {
        width: 150px;
    }

    .search-container input:focus {
        width: 200px;
    }

    .banner-content h2 {
        font-size: 36px;
    }

    .banner-content p {
        font-size: 18px;
    }

    .modules-grid, .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .banner-content h2 {
        font-size: 28px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .btn-primary {
        padding: 12px 25px;
        font-size: 16px;
    }
}

/* 页面特定样式 */
.page-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
}

.page-content h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.page-content h3 {
    color: #3498db;
    font-size: 24px;
    margin: 30px 0 15px;
}

.page-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.page-content ul {
    color: #666;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 筛选器样式 */
.filter-section {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-options label {
    color: #2c3e50;
    font-weight: 500;
}

.filter-options select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    color: #2c3e50;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #2c3e50;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.submit-btn {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}