/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #2e5c8a);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ==================== Banner ==================== */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 100px 20px;
    text-align: center;
    animation: bannerFade 0.8s ease-in;
}

@keyframes bannerFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.banner-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ==================== 按钮 ==================== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #45b06f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ==================== 资讯部分 ==================== */
.news-section {
    padding: 60px 20px;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: cardFade 0.5s ease-in;
}

@keyframes cardFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-color);
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-category.tech {
    background-color: #4a90e2;
}

.news-category.life {
    background-color: #f5a623;
}

.news-category.business {
    background-color: #7ed321;
}

.news-title {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: var(--dark-color);
    font-weight: bold;
}

.news-description {
    color: #666;
    font-size: 0.95rem;
    margin: 1rem 0;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-color);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-read-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.news-read-btn:hover {
    background-color: #2e5c8a;
}

/* ==================== 关于部分 ==================== */
.about-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #555;
}

.skills {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.skills li {
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-weight: 500;
    text-align: center;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 1rem;
}

/* ==================== 联系部分 ==================== */
.contact-section {
    padding: 60px 20px;
    background-color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.2);
}

.contact-form button {
    margin-top: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: linear-gradient(135deg, var(--primary-color), #2e5c8a);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.info-card p {
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ==================== 页脚 ==================== */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .hamburger {
        display: flex;
    }

    .banner-content h2 {
        font-size: 2rem;
    }

    .banner-content p {
        font-size: 1.1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand h1 {
        font-size: 1.3rem;
    }

    .nav-menu {
        display: none;
    }

    .banner-content h2 {
        font-size: 1.5rem;
    }

    .banner {
        padding: 60px 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .skills {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
