/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --bg-color: #fff;
    --section-padding: 80px 0;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-width: 0;
}

.logo-area {
    white-space: nowrap;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    white-space: nowrap;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.menu-icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
    transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

/* 英雄区域样式 */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    opacity: 0.9;
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.hero-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 40px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.hero-btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 通用section样式 */
.products-section,
.features-section,
.news-section {
    padding: var(--section-padding);
}

.products-section {
    background-color: var(--bg-color);
}

.features-section {
    background-color: var(--light-color);
}

.news-section {
    background-color: var(--bg-color);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: #777;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-img {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 20px 20px 10px;
}

.product-card p {
    font-size: 16px;
    color: #777;
    margin: 0 20px 20px;
}

/* 特色网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 16px;
    color: #777;
    line-height: 1.6;
}

/* 新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-date {
    display: inline-block;
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.news-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.news-card:hover .news-content h3 {
    color: var(--secondary-color);
}

.news-content p {
    font-size: 16px;
    color: #777;
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo {
    max-width: 300px;
    margin-bottom: 30px;
}

.footer-logo .logo {
    color: white;
    font-size: 32px;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.6;
}

.footer-links {
    max-width: 400px;
}

.footer-links h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
}

.friend-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.friend-links a:hover {
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .nav-links {
        gap: 20px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .hero-content h1 {
        font-size: 48px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        max-height: 300px;
    }
    
    .nav-link {
        display: block;
        padding: 15px 20px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        max-width: 100%;
        margin-top: 30px;
    }
    
    .friend-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .hero-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .products-grid,
    .features-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .product-img,
    .news-img {
        height: 200px;
    }
    
    .friend-links {
        gap: 10px 20px;
    }
    
    .friend-links a {
        font-size: 12px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in.visible {
    opacity: 1;
}