/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #333;
    --text-light: #666;
    --text-gray: #999;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 36px;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 35px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: var(--transition);
    border-radius: 2px;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dark);
}

/* 英雄区 */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 160px 30px 100px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 56px;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
}

/* 分类区域 */
.category-section {
    background: var(--white);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 50px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-section:hover {
    box-shadow: var(--shadow-hover);
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 15px;
}

.category-title {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.category-desc {
    font-size: 18px;
    color: var(--text-light);
    margin-top: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

/* 产品卡片 */
.product-card {
    background: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: var(--white);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-detail {
    color: var(--white);
    font-size: 18px;
    font-weight: bold;
    padding: 12px 30px;
    border: 2px solid var(--white);
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.product-info {
    padding: 25px;
}

.product-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.product-specs {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 24px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 28px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.modal-info {
    padding: 20px 0;
}

.modal-info h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

.modal-desc {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--bg-light);
}

.modal-specs {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.modal-specs h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-specs p {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 2;
}

.modal-features {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.modal-features h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-features ul {
    list-style: none;
}

.modal-features li {
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.modal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 页脚 */
.footer {
    background: var(--white);
    padding: 50px 30px;
    margin-top: 60px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 20px;
}

.footer-links a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.copyright {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 2;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image img {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .category-section {
        padding: 30px 20px;
    }
    
    .category-title {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-image img {
        height: 280px;
    }
    
    .modal-info h2 {
        font-size: 26px;
    }
}

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

.category-section {
    animation: fadeInUp 0.6s ease-out;
}

.category-section:nth-child(2) {
    animation-delay: 0.1s;
}

.category-section:nth-child(3) {
    animation-delay: 0.2s;
}

.category-section:nth-child(4) {
    animation-delay: 0.3s;
}

.category-section:nth-child(5) {
    animation-delay: 0.4s;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
