/* 全局样式 */
:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #94a3b8;
    --card-bg: #ffffff;
    --body-bg: #f1f5f9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

.dark-mode {
    --primary-color: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #4f46e5;
    --secondary-color: #34d399;
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --gray-color: #cbd5e1;
    --card-bg: #1e293b;
    --body-bg: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* 头部样式 */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

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

nav ul {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    color: var(--dark-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark-color);
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.3s both;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 1s ease 0.6s both;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-box button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

/* 资源部分样式 */
.resource-section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.card p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    display: inline-block;
    background-color: var(--primary-light);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.card-link:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* 高亮效果 */
.card.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0%, 100% {
        box-shadow: var(--shadow);
    }
    50% {
        box-shadow: 0 0 0 3px var(--primary-color);
    }
}

/* 页脚样式 */
footer {
    background-color: var(--card-bg);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

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

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: var(--gray-color);
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    nav ul {
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo, .footer-links, .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .social-icons {
        justify-content: center;
    }
} 