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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2C3E50;
    background-color: #FEFEFE;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(93, 173, 226, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5DADE2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #3498DB;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #2C3E50;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(93, 173, 226, 0.1);
    color: #5DADE2;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.theme-toggle,
.search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.theme-toggle:hover,
.search-toggle:hover {
    background-color: rgba(93, 173, 226, 0.1);
}

/* 英雄区样式 */
.hero-section {
    height: 500px;
    background: linear-gradient(135deg, #E3F2FD 0%, #F0F8FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: #5D6D7E;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.search-box {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #5DADE2;
    box-shadow: 0 4px 20px rgba(93, 173, 226, 0.3);
}

.search-btn {
    padding: 12px 24px;
    background: #5DADE2;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #3498DB;
    transform: translateY(-1px);
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(93, 173, 226, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

/* 主要内容区域 */
.main-content {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 2rem;
    text-align: center;
}

/* 文章网格布局 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 文章卡片样式 */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-card.featured {
    border: 2px solid #5DADE2;
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.article-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-tech {
    background: rgba(52, 152, 219, 0.15);
    color: #3498DB;
}

.tag-life {
    background: rgba(102, 187, 106, 0.15);
    color: #66BB6A;
}

.article-date {
    font-size: 0.875rem;
    color: #95A5A6;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: #5DADE2;
}

.article-excerpt {
    color: #5D6D7E;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #95A5A6;
    padding-top: 1rem;
    border-top: 1px solid #F8F9FA;
}

.read-time,
.read-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 页脚样式 */
.footer {
    background: #2C3E50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #5DADE2;
}

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

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

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

.footer-section a:hover {
    color: #5DADE2;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495E;
    color: #95A5A6;
}

/* 响应式设计 */
@media (max-width: 1199px) {
    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 767px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-section {
        height: 400px;
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-btn {
        align-self: center;
        width: fit-content;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F8F9FA;
}

::-webkit-scrollbar-thumb {
    background: #5DADE2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3498DB;
}

