/* 全局样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #60a5fa;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background: #ffffff;
    --section-bg: #f3f4f6;
    --light-gray: #e5e7eb;
    --bg-light: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-in-out forwards;
    animation-delay: 2s;
}

.loader-inner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--accent-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.company-name {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 英雄区域 */
.hero {
    padding: 120px 0 80px 0;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #1e3a8a, #4f46e5, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    overflow: hidden;
    color: white;
}

/* 定义渐变动画 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 750px; /* 稍微增加宽度 */
    text-align: center; /* 居中内容 */
    margin: 0 auto; /* 水平居中 */
}

.hero h1 {
    font-size: 3.5rem; /* 调整大小 */
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    /* 可以添加文字渐变效果 */
    /* background: linear-gradient(90deg, #a5b4fc, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
}

.hero p {
    font-size: 1.2rem; /* 调整大小 */
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto; /* 配合 text-align: center */
    margin-right: auto; /* 配合 text-align: center */
}

.cta-buttons {
    display: flex;
    justify-content: center; /* 居中按钮 */
    gap: 1rem; /* 按钮间距 */
}

.cta-primary, .cta-secondary {
    padding: 0.8rem 1.8rem; /* 调整按钮大小 */
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* 预留边框位置 */
}

.cta-primary {
    background: white;
    color: #1e3a8a; /* 深蓝色 */
}
.cta-primary:hover {
    background-color: #e0e7ff; /* 浅蓝 */
    color: #1e3a8a;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

/* 关于我们 */
.about {
    padding: 6rem 0;
    background: var(--section-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-item:hover {
    transform: translateY(-5px);
}

.about-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 服务内容 */
.services {
    padding: 6rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 解决方案 */
.solutions {
    padding: 6rem 0;
    background: var(--section-bg);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.solution-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 联系我们 */
.contact {
    padding: 6rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-family: inherit;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: var(--secondary-color);
}

/* 页脚 */
.footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    height: 50px;
    width: auto;
}

.footer-company-name {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .company-name {
        display: none;
    }
    
    .footer-logo {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-company-name {
        font-size: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 产品展示 */
.products {
    padding: 6rem 0; 
    background-color: #111827; 
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    position: relative;
    overflow: hidden;
}

/* 添加一个背景光晕效果 */
.products::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.1), transparent 60%);
    animation: subtlePulse 10s infinite alternate ease-in-out;
    z-index: 0;
}

@keyframes subtlePulse {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(1.1); opacity: 0.8; }
}

.products .container {
    position: relative;
    z-index: 1;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #e5e7eb;
}

.section-header p {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 4rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 3rem;
}

.product-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.product-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-card ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

.product-card .cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.product-card .cta-button:hover {
    background-color: var(--secondary-color);
}

/* 主要高亮按钮样式 */
.product-link-highlight {
    background: linear-gradient(90deg, #4f46e5 0%, #a855f7 100%);
    color: white;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.product-link-highlight .icon-arrow {
    transition: transform 0.3s ease;
}

.product-link-highlight:hover {
    background: linear-gradient(90deg, #4338ca 0%, #9333ea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.product-link-highlight:hover .icon-arrow {
    transform: translateX(4px);
}

/* 次要按钮样式 */
.product-link:not(.product-link-highlight) {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-link:not(.product-link-highlight):hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

/* 3D Canvas Container Styles */
#webgl-container {
    position: fixed; /* 或者 absolute, 取决于布局需求 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* 防止滚动条出现 */
    z-index: 1; /* 确保在内容之上，但在导航栏之下（如果导航栏需要保留） */
}

/* 调整导航栏 z-index (如果希望它在 3D 场景之上) */
.navbar {
    /* ... existing styles ... */
    z-index: 1001; /* 比 #webgl-container 高 */
    /* 可能需要调整背景使其在 3D 场景上可见 */
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(5px);
}

/* 强制隐藏原始内容区域 */
#content-sections {
    display: block !important; /* 修改为block显示 */
    position: relative;
    z-index: 10;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保3D容器被隐藏 */
#webgl-container {
    display: none !important;
}

/* .css3d-element 样式保持不变 */
.css3d-element {
    width: 320px; /* 卡片宽度 */
    height: 240px; /* 卡片高度 */
    /* background-color: rgba(0, 127, 127, 0.5); */ /* 背景色由 JS 随机设置 */
    border: 1px solid rgba(127, 255, 255, 0.75);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    color: white;
    padding: 20px;
    overflow: hidden; /* 隐藏溢出内容 */
    cursor: pointer; /* 添加手型光标 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* 垂直布局 */
    justify-content: space-between; /* 内容两端对齐 */
    border-radius: 8px; /* 添加圆角 */
    /* 添加一个明确的背景色用于调试，覆盖 JS 的随机色 */
    background-color: rgba(0, 100, 100, 0.7) !important; 
}

.css3d-element:hover {
    transform: scale(1.05); /* 悬停放大 */
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
    border-color: rgba(127, 255, 255, 1);
}

.css3d-element h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.4em;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
}

.css3d-element p {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1; /* 让段落占据多余空间 */
    overflow: hidden; /* 再次确保不溢出 */
}

.css3d-button {
    padding: 8px 15px;
    background-color: rgba(127, 255, 255, 0.7);
    border: none;
    color: #0f172a; /* 深色文字 */
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* 按钮靠左 */
}

.css3d-button:hover {
    background-color: rgba(127, 255, 255, 1);
}

/* 加载动画样式 (如果需要) */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f172a; /* 与场景背景色一致 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-inner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left-color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 确保 AOS 动画在深色背景下仍然有效 */
[data-aos] {
    /* 可以根据需要调整 AOS 动画效果 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        padding: 2rem;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
}

/* 添加产品标签页样式 */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--light-gray);
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 2rem;
    margin: 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-button:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button:hover:after {
    width: 30%;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active:after {
    width: 100%;
}

/* 标签内容样式 */
.tab-content {
    width: 100%;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

/* 产品卡片样式调整 */
.product-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.product-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-card ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

.product-card .cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.product-card .cta-button:hover {
    background-color: var(--secondary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 确保产品部分的响应式布局 */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-button {
        margin: 0.25rem 0;
        width: 100%;
    }
    
    .product-card {
        padding: 1.5rem;
    }
}

/* 下载选项样式 */
.download-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    justify-content: flex-start;
}

.download-button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: #0066CC;
    color: white;
    transition: all 0.3s ease;
    padding: 0.7rem 1.2rem;
    font-weight: 500;
    border-radius: 6px;
    min-width: 100px;
}

.download-button span {
    display: flex;
    flex-direction: column;
    line-height: 0.2;
}

.download-button small {
    opacity: 0.8;
    font-size: 0.8em;
}

.download-button:hover {
    background-color: #0055AA;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

.store-icon {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 下载按钮样式 */
.download-options .cta-button {
    display: inline-flex;
    flex-direction: column; /* 改为纵向排列 */
    align-items: center;
    text-align: center;
    height: 100px;
    margin: 2px;
    padding: 10px 10px; /* 进一步增加水平内边距 */
    min-width: 120px; /* 进一步增加最小宽度 */
}

.download-options .store-icon {
    width: 48px; /* 进一步增加图标宽度 */
    height: 48px; /* 同时增加高度以保持比例 */
    margin-bottom: 12px; /* 增加图标和文字之间的间距 */
    object-fit: contain; /* 确保图片完整显示 */
}

.download-options .cta-button span {
    display: block;
    text-align: center;
    white-space: nowrap; /* 防止文字换行 */
    font-size: 0.95rem; /* 稍微调整字体大小以适应布局 */
}

/* 特别针对App Store按钮的样式调整 */
.download-options a[href*="apple.com"] {
    white-space: nowrap; /* 强制文字不换行 */
    min-width: 140px; /* 为App Store按钮设置更大的最小宽度 */
}

.download-options a[href*="apple.com"] .store-icon {
    width: 140px; /* 进一步增加App Store图标宽度 */
    height: auto; /* 保持原始比例 */
}
