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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    position: relative;
}

/* 背景容器 */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#background-container canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主内容 */
.main-content {
    position: relative;
    z-index: 1;
}

/* 英雄区域 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hero-content {
    margin-bottom: auto;
    margin-top: auto;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 滚动查看更多 */
.scroll-down {
    margin-top: auto;
    margin-bottom: 40px;
}

.scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #fff;
    text-decoration: none;
    animation: bounce 2s infinite;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator i {
    font-size: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

.btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 通用部分样式 */
section {
    padding: 100px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #1a73e8;
    margin: 20px auto;
    border-radius: 2px;
}

/* 关于我们 */
.about {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* 服务区域 */
.services {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* TAB菜单 */
.tab-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(26, 115, 232, 0.2);
    transform: translateY(-2px);
}

.tab-button.active {
    background: rgba(26, 115, 232, 0.9);
    color: #fff;
    border-color: rgba(26, 115, 232, 0.9);
}

.tab-button i {
    font-size: 1.2rem;
}

/* TAB内容 */
.tab-content {
    width: 100%;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

/* 确保单个卡片时也保持相同宽度并居中显示 */
.tab-panel:has(.products-grid > .product-card:only-child) .products-grid {
    justify-content: center;
}

.tab-panel:has(.products-grid > .product-card:only-child) .product-card {
    max-width: 350px;
}

/* 产品卡片 */
.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-btn {
    display: inline-block;
    background: rgba(26, 115, 232, 0.9);
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: rgba(21, 87, 176, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
}

/* 联系我们 */
.contact {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    justify-content: center;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.contact-item i {
    font-size: 1.5rem;
    color: #1a73e8;
    margin-right: 15px;
    min-width: 30px;
}

.contact-item p {
    color: #666;
    margin: 0;
}

.qrcode-section {
    flex: 1;
    min-width: 300px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.qrcode-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.qrcode-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.qrcode-item {
    text-align: center;
}

.qrcode-item h4 {
    margin-bottom: 10px;
    color: #666;
    font-size: 1rem;
}

.qrcode-item img {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .qrcode-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .qrcode-item img {
        width: 160px;
        height: 160px;
    }
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}



/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .contact-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-chat {
        width: 300px;
        right: -20px;
    }
}

/* 顶部导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 5px 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

.navbar-left {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 80px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

.navbar-center {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.navbar-right {
    display: flex;
    align-items: center;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 移动端导航菜单 */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    animation: slideDown 0.3s ease;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-nav-links a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover {
    background: rgba(26, 115, 232, 0.1);
    color: #1a73e8;
}

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

/* 调整主内容区域，避免被导航栏遮挡 */
.main-content {
    padding-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(26, 115, 232, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 115, 232, 0.8);
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .navbar .container {
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    .navbar-center {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-content {
        padding-top: 100px;
    }
}