/* --- 1. 全局与基础样式 (Global & Base Styles) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --dark-bg: #0f0f0f;
  --primary-surface: #1a1a1a;
  --secondary-surface: #252525;
  --text-primary: #f5f5f5;
  --text-secondary: #b3b3b3;
  --accent-green: #A3EA1B;
  --accent-blue: #00BFFF;
  --accent-purple: #8A2BE2;
  --nav-height: 80px;
  --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
}

body {
    font-family: 'Inter', '思源黑体', 'PingFang SC', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    overflow: hidden;
    position: relative;
}

.section-fade {
    background: linear-gradient(to bottom, var(--dark-bg) 0%, var(--primary-surface) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-green);
    border-radius: 3px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 2. 导航栏 (Header / Navigation) --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 0; 
    z-index: 1000;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-base);
}


.main-header.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 10, 0.98);
    box-shadow: var(--shadow-sm);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px; 
    padding: 0 20px; /* 增加左右内边距 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    transition: var(--transition-base);
    margin-right: auto; /* 确保logo靠左 */
    margin-left: -10px; /* 向左移动10px */
    padding: 8px 12px 8px 0; /* 增加内边距 */
}

.logo svg {
    transition: var(--transition-base);
}

.logo:hover {
    color: var(--accent-green);
}

.logo:hover svg {
    transform: rotate(15deg) scale(1.1);
}

/* 导航样式 */
.main-nav {
    margin-left: auto; /* 将导航推到右侧 */
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500; /* 中等粗细 */
    font-size: 1.1rem;
    letter-spacing: 1px; /* 增加字母间距 */
    position: relative;
    padding: 12px 0;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.main-nav a:hover, 
.main-nav a.active {
    color: var(--text-primary);
    font-weight: 600; /* 悬停时加粗 */
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 8px; /* 调整下划线位置 */
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-nav a:hover::after, 
.main-nav a.active::after {
    width: 100%;
}

/* 移动菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 1001;
    margin-left: auto; /* 确保在移动视图下也靠右 */
}


.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px; 
    background-color: var(--text-primary);
    margin: 6px 0; 
    transition: var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- 3. 轮播Hero区域 (Hero Slider) --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    margin-top: calc(-1 * var(--nav-height));
}

.slider-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.2) 0%,
        rgba(15, 15, 15, 0.6) 60%,
        rgba(15, 15, 15, 0.95) 100%
    );
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide.active {
    opacity: 1;
}

/* 轮播导航点 */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-base);
}

.dot.active {
    background-color: var(--accent-green);
    transform: scale(1.3);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* 轮播导航箭头 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--accent-green);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

/* --- 4. 按钮样式 (Buttons) --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent-green);
    color: var(--dark-bg);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(163, 234, 27, 0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #b8f533;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(163, 234, 27, 0.4);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(3px);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(163, 234, 27, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(163, 234, 27, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(163, 234, 27, 0);
    }
}

/* --- 5. 产品区域 (Products Section) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--primary-surface);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(163, 234, 27, 0.2);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-green);
    color: var(--dark-bg);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.product-card img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto 25px;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.price {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-green);
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.product-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: width 0.3s ease;
}

.product-link:hover {
    color: var(--accent-green);
}

.product-link:hover::after {
    width: 100%;
}

.product-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.product-link:hover i {
    transform: translateX(3px);
}

/* --- 6. 技术区域 (Technology Section) --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.tech-item {
    background: var(--primary-surface);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(163, 234, 27, 0.2);
}

.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(163, 234, 27, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-green);
    transition: var(--transition-base);
}

.tech-item:hover .tech-icon {
    background: var(--accent-green);
    color: var(--dark-bg);
    transform: rotate(15deg) scale(1.1);
}

/* --- 7. 探索区域 (Discover Section) --- */
.parallax-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    transform: scale(1.1);
}

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.7);
    z-index: 1;
}

.discover-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

/* --- 8. 新闻订阅区域 (Newsletter Section) --- */
#newsletter {
    background-color: var(--primary-surface);
    padding: 80px 0;
}

.newsletter-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-container h2 {
    margin-bottom: 15px;
}

.newsletter-container p {
    margin-bottom: 40px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    transition: var(--transition-base);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(163, 234, 27, 0.2);
}

.newsletter-form button {
    padding: 18px 30px;
    border: none;
    border-radius: 0 50px 50px 0;
    background-color: var(--accent-green);
    color: var(--dark-bg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-form button:hover {
    background-color: #b8f533;
}

.newsletter-form button i {
    transition: transform 0.3s ease;
}

.newsletter-form button:hover i {
    transform: translateX(3px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: var(--transition-base);
}

.social-links a:hover {
    background-color: var(--accent-green);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

/* --- 9. 页脚 (Footer) --- */
.main-footer {
    background-color: var(--primary-surface);
    padding: 80px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--accent-green);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-green);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col ul li i {
    color: var(--accent-green);
    font-size: 0.9rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.footer-col ul li a:hover {
    color: var(--accent-green);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 20px;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.legal-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.legal-links a:hover {
    color: var(--accent-green);
}

/* --- 10. 返回顶部按钮 (Back to Top Button) --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-green);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #b8f533;
    transform: translateY(-5px);
}

/* --- 11. 滚动动画 (Scroll Animations) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), 
                transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* === 响应式适配 === */
/* 平板设备 */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
    
    .slide-content {
        max-width: 600px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .main-nav ul {
        gap: 30px;
    }
    
    .main-nav a {
        font-size: 1rem;
        letter-spacing: 0.8px;
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .main-header .container {
        padding: 0 30px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .logo svg {
        width: 32px;
        height: 32px;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px; /* 增加宽度 */
        height: 100vh;
        background-color: var(--primary-surface);
        padding: 120px 40px 40px; /* 增加内边距 */
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        gap: 25px;
    }
    
    .main-nav a {
        font-size: 1.1rem;
        text-transform: none; /* 移动端取消大写 */
        letter-spacing: 0.5px;
        padding: 15px 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .main-header .container {
        padding: 0 20px;
    }
    
    .logo {
        font-size: 1.4rem;
        gap: 8px;
    }
    
    .logo svg {
        width: 28px;
        height: 28px;
    }
    
    .main-nav {
        width: 280px;
        padding: 100px 30px 30px;
    }
}

/* 横屏设备适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 120vh;
    }
    
    .slide-content {
        transform: translateY(0) scale(0.9);
    }
}

/* iOS Safari特殊处理 */
@supports (-webkit-touch-callout: none) {
    .hero-slider {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

/* 超宽屏显示器 */
@media (min-aspect-ratio: 21/9) {
    .slide {
        background-position: center 25%;
    }
}

/* Windows高DPI修复 */
@media (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .slide {
        background-position-y: bottom;
    }
}

/* 防止横屏滚动条 */
@media (orientation: landscape) {
    html, body {
        max-height: 100vh;
    }
}