/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #222;
    --white: #ffffff;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 50px;
    --spacing-2xl: 80px; /* 新增更大的间距变量 */
    --spacing-3xl: 120px; /* 最大间距变量，用于增加产品区域与页脚间距 */
    --max-width: 1300px;
    
    /* Typography */
    --font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 32px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--white);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background-color: transparent;
    transition: all var(--transition-normal);
}

.main-header.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: var(--spacing-sm) 0;
}

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

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

/* Logo图片样式 */
.logo-img {
    height: 36px;
    width: auto;
    display: block;
    cursor: pointer;
    transition: all var(--transition-normal);
}

/* 白色logo在深色背景上的阴影效果 - 更强更明显 */
.main-header:not(.scrolled) .logo-img {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* 导航栏滚动时调整logo样式和阴影效果 */
.main-header.scrolled .logo-img {
    height: 24px;
    /* filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)); */
}

/* Language Selector Styles */
.language-selector {
    display: flex;
    align-items: center;
}

.language-btn {
    background: transparent;
    border: none;
    font-size: var(--font-size-sm);
    color: var(--white);
    cursor: pointer;
    padding: 2px 4px;
    transition: all var(--transition-fast);
}

/* 添加分隔符 */
.language-btn:not(:last-child)::after {
    content: '/';
    margin: 0 0 0 7px;
    opacity: 0.5;
}

.main-header.scrolled .language-btn {
    color: var(--primary-color);
}

.language-btn:not(.active) {
    opacity: 0.5;
}

.language-btn.active {
    opacity: 1;
    color: #FFFFFF;
}

.main-header.scrolled .language-btn.active {
    color: #222222;
}

/* Banner Section Styles */
.banner-section {
    position: relative;
    height: 700px;
    overflow: hidden;
    border-bottom: 1px solid #eaeaea;
}

/* Stars Effect */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    /* clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); */
    clip-path: polygon(
    50% 0%,     /* 顶部尖角 */
    61.8% 35.3%,  /* 右上内凹点 */
    100% 50%,    /* 右侧尖角 */
    61.8% 64.7%,  /* 右下内凹点 */
    50% 100%,    /* 底部尖角 */
    38.2% 64.7%,  /* 左下内凹点 */
    0% 50%,      /* 左侧尖角 */
    38.2% 35.3%   /* 左上内凹点 */
  );
    filter: blur(0.8px);
    animation: twinkle 2s ease-in-out infinite;
}

/* Create 24 stars with random positions and sizes (20% more), size range 8-20px */
.star:nth-child(1) { top: 10%; left: 15%; width: 15px; height: 15px; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 30%; width: 8px; height: 8px; animation-delay: 0.2s; }
.star:nth-child(3) { top: 40%; left: 60%; width: 20px; height: 20px; animation-delay: 0.4s; }
.star:nth-child(4) { top: 60%; left: 20%; width: 8px; height: 8px; animation-delay: 0.6s; }
.star:nth-child(5) { top: 30%; left: 75%; width: 14px; height: 14px; animation-delay: 0.8s; }
.star:nth-child(6) { top: 70%; left: 40%; width: 16px; height: 16px; animation-delay: 1s; }
.star:nth-child(7) { top: 50%; left: 10%; width: 9px; height: 9px; animation-delay: 1.2s; }
.star:nth-child(8) { top: 80%; left: 80%; width: 18px; height: 18px; animation-delay: 1.4s; }
.star:nth-child(9) { top: 25%; left: 45%; width: 14px; height: 14px; animation-delay: 1.6s; }
.star:nth-child(10) { top: 65%; left: 90%; width: 16px; height: 16px; animation-delay: 1.8s; }
.star:nth-child(11) { top: 15%; left: 85%; width: 10px; height: 10px; animation-delay: 0.1s; }
.star:nth-child(12) { top: 35%; left: 50%; width: 8px; height: 8px; animation-delay: 0.3s; }
.star:nth-child(13) { top: 45%; left: 25%; width: 16px; height: 16px; animation-delay: 0.5s; }
.star:nth-child(14) { top: 55%; left: 70%; width: 12px; height: 12px; animation-delay: 0.7s; }
.star:nth-child(15) { top: 75%; left: 15%; width: 18px; height: 18px; animation-delay: 0.9s; }
.star:nth-child(16) { top: 5%; left: 65%; width: 9px; height: 9px; animation-delay: 1.1s; }
.star:nth-child(17) { top: 85%; left: 35%; width: 16px; height: 16px; animation-delay: 1.3s; }
.star:nth-child(18) { top: 15%; left: 40%; width: 11px; height: 11px; animation-delay: 1.5s; }
.star:nth-child(19) { top: 30%; left: 10%; width: 19px; height: 19px; animation-delay: 1.7s; }
.star:nth-child(20) { top: 60%; left: 55%; width: 8px; height: 8px; animation-delay: 1.9s; }
.star:nth-child(21) { top: 20%; left: 18%; width: 12px; height: 12px; animation-delay: 0.25s; }
.star:nth-child(22) { top: 45%; left: 85%; width: 17px; height: 17px; animation-delay: 0.75s; }
.star:nth-child(23) { top: 10%; left: 60%; width: 14px; height: 14px; animation-delay: 1.25s; }
.star:nth-child(24) { top: 70%; left: 25%; width: 10px; height: 10px; animation-delay: 1.75s; }

/* Twinkle animation */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Banner背景图片 - 调整后的滚动效果 */
.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 130%;
    height: 130%;
    object-fit: cover;
    object-position: 35% 35%; /* 调整初始位置 */
    animation: scrollBackground 20s linear infinite;
}

/* 从右下往左上滚动动画 */
@keyframes scrollBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-23%, -23%); /* 移动相应比例确保循环 */
    }
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 3.25rem;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); /* 添加阴影效果 */
}

/* Vision Section Styles */
.vision-section {
    padding: var(--spacing-lg) 0;
    background-color: #fbfbfb;
    border-radius: 12px;
    margin: 100px auto var(--spacing-lg);
    max-width: var(--max-width);
    border: 1px solid #eaeaea;
    position: relative;
}

.mission-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    height: 200px;
    width: 100%;
    margin: 0 auto;
}

.mission-title {
    font-size: var(--font-size-xxl);
    font-weight: 500;
    color: var(--primary-color);
    width: 340px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: right;
    padding-right: 5rem;
    border-right: 1px solid #999;
}

.mission-divider {
    display: none;
}

.mission-text {
    flex: 1;
    text-align: left;
    padding-left: 5rem;
}

.mission-text p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-md);
    line-height: 1.8;
    color: #333;
}

.mission-text p:last-child {
    margin-bottom: 0;
}

/* Highlight the first paragraph in mission text */
.mission-text .mission-main {
    font-size: var(--font-size-xl);
    font-weight: bold;
    margin-bottom: var(--spacing-md);
}

/* Style for the following paragraphs with smaller line spacing */
.mission-desc p {
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.mission-desc p:last-child {
    margin-bottom: 0;
}

/* Product Section Styles */
.product-title-section {
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    text-align: center;
    position: relative;
}

.product-title-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-width);
    height: 1px;
    background-color: #eaeaea;
}

.product-title-section h2 {
    font-size: var(--font-size-xxl);
    font-weight: 500;
    color: var(--primary-color);
}

/* Products Section Styles */
.products-section {
    padding: var(--spacing-lg) 0 var(--spacing-3xl) 0;
    border-bottom: 1px solid #eaeaea;
}

/* 移除产品区域容器的左右padding */
.products-section .container {
    padding: 0 var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

/* 滚动容器 */
.products-scroll-container {
    overflow-x: scroll;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none; /* 隐藏滚动条 */
    -ms-overflow-style: none;
}

.products-scroll-container::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
}

/* 滚动轨道 */
.products-track {
    display: flex;
    gap: var(--spacing-lg);
    transition: transform 0.3s ease;
    will-change: transform;
}

/* 产品卡片 */
.product-item {
    display: flex;
    flex-direction: column;
    width: calc(30% - var(--spacing-md));
    min-width: calc(30% - var(--spacing-md));
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

/* 产品卡片hover时，图片放大效果 */
.product-item:hover .product-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* 产品图片区域 */
.product-image {
    height: 280px; /* 增加图片高度，从而增加卡片整体高度 */
    background-color: #f5f5f5;
    background-image: linear-gradient(135deg, #f0f4f8 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-item:nth-child(1) .product-image {
    background-image: url('../img/color_bg1.webp');
    background-size: cover;
    background-position: center;
}

.product-item:nth-child(2) .product-image {
    background-image: url('../img/color_bg2.png');
    background-size: cover;
    background-position: center;
}

.product-item:nth-child(3) .product-image {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 产品信息区域 */
.product-info {
    padding: var(--spacing-lg) var(--spacing-md);
    background-color: #fff;
    flex: 1;
}

.product-info h3 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.product-info p {
    font-size: var(--font-size-sm);
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 滚动按钮 */
.scroll-btn {
    /* 相对于产品区域定位 */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 100; /* 确保在内容之上 */
    color: var(--primary-color);
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 轻微的阴影效果 */
    overflow: hidden;
}

/* 图标基础样式 */
.scroll-btn i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    transition: all var(--transition-normal);
}

/* 默认图标显示，hover图标隐藏 */
.scroll-btn .default-icon {
    display: block;
}

.scroll-btn .hover-icon {
    display: none;
    font-size: 18px;
}

/* 鼠标hover时，切换图标显示状态 */
.scroll-btn:hover .default-icon {
    display: none;
}

.scroll-btn:hover .hover-icon {
    display: block;
    animation: pulse 0.6s ease-in-out;
}

/* 添加简单的动画效果 */
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1.0); }
}

/* 按钮位置设置 */
.scroll-left {
    left: 20px; /* 调整按钮位置 */
}

.scroll-right {
    right: 20px; /* 调整按钮位置 */
}

.scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Footer Styles */
.main-footer {
    padding: var(--spacing-lg) 0;
    background-color: #fbfbfb;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #666;
}

.social-icons {
    display: flex;
    gap: var(--spacing-md);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #eaeaea;
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.social-icon:hover {
    transform: scale(1.2);
    color: #555;
}

.copyright {
    text-align: center;
    font-size: var(--font-size-xs);
    color: #777;
}

#icp-info {
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Banner Section Responsive */
    .banner-section {
        height: 400px;
    }
    
    .banner-content {
        font-size: 2rem;
    }
    
    /* Vision Section Responsive */
    .vision-section {
        padding: var(--spacing-md) 0;
        margin: 60px auto var(--spacing-md);
    }
    
    .mission-content {
        flex-direction: column;
        height: auto;
        padding: 0;
    }
    
    .mission-title {
        width: 100%;
        height: auto;
        justify-content: center;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #999;
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-sm);
    }
    
    .mission-text {
        padding-left: 0;
        text-align: center;
    }
    
    /* Product Section Responsive */
    .product-item {
        width: calc(50% - var(--spacing-md));
        min-width: calc(50% - var(--spacing-md));
        height: auto;
    }
    
    /* 产品图片响应式 - 平板设备 */
    .product-image {
        height: 280px;
    }
    
    /* 调整产品区域与页脚距离 - 平板设备 */
    .products-section {
        padding-bottom: var(--spacing-2xl);
    }
    
    /* 调整滚动按钮位置 */
    .scroll-left {
        left: 10px;
    }
    
    .scroll-right {
        right: 10px;
    }
    
    /* Footer Section Responsive */
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    /* Navigation Bar Responsive */
    .logo-img {
        height: 26px;
    }
    
    .main-header.scrolled .logo-img {
        height: 22px;
    }
    
    .banner-section {
        height: 300px;
    }
    
    .banner-content {
        font-size: 1.25rem;
    }
    
    /* Vision Section Responsive */
    .vision-section {
        padding: var(--spacing-sm) 0;
        margin: 40px auto var(--spacing-sm);
        border-radius: 8px;
    }
    
    .mission-title {
        font-size: var(--font-size-xl);
        padding: var(--spacing-sm) 0;
    }
    
    .mission-text p {
        font-size: var(--font-size-sm);
    }
    
    .product-item {
        width: calc(100% - var(--spacing-md));
        min-width: calc(100% - var(--spacing-md));
        height: auto;
        font-size: var(--font-size-lg);
    }
    
    /* 产品图片响应式 - 移动设备 */
    .product-image {
        height: 220px;
    }
    
    /* 进一步减小产品区域与页脚距离 - 移动设备 */
    .products-section {
        padding-bottom: var(--spacing-xl);
    }
    
    /* 调整滚动轨道padding适应小屏幕 */
    .products-track {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* 调整滚动按钮大小适应小屏幕 */
    .scroll-btn {
        width: 36px;
        height: 36px;
    }
    
    .scroll-left {
        left: 5px;
    }
    
    .scroll-right {
        right: 5px;
    }
    
    .mission-text .mission-main {
        font-size: var(--font-size-lg);
    }
}