/* ==========================================================================
   四川元境天成数字科技有限公司 - 官网样式
   模仿SandboxVR现代化设计风格
   ========================================================================== */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    transition: opacity 0.3s ease;
}

/* CSS变量 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b35;
    --accent-color: #9c27b0;
    --dark-bg: #0a0a0a;
    --light-bg: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #333333;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #9c27b0 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #f9ca24 100%);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   通用组件
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   导航栏
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* 语言切换按钮 */
.lang-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.lang-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.lang-toggle:hover::before {
    left: 100%;
}

.lang-text {
    display: inline-block;
    transition: var(--transition);
}

/* ==========================================================================
   英雄区域
   ========================================================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    display: none;
    z-index: -2;
}

.hero-fallback.active {
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(156, 39, 176, 0.3));
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: var(--text-light);
    max-width: 900px;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

.highlight {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.feature-item {
    text-align: center;
}

.feature-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.feature-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ==========================================================================
   产品展示
   ========================================================================== */

.products {
    padding: 120px 0;
    background: var(--light-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 移除固定高度，让视频比例决定高度 */
    align-items: center;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-card.featured {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
}

.product-video {
    position: relative;
    overflow: hidden;
    /* 设置16:9的宽高比，确保1920*1080视频正确显示 */
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 0; /* 视频区域不需要圆角，由卡片提供 */
}

.product-video video {
    width: 100%;
    height: 100%;
    /* 使用contain确保完整显示1920*1080视频，不裁切 */
    object-fit: contain;
    background: #000;
    display: block;
}

.product-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-badge {
    display: inline-block;
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    width: fit-content;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.product-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.7;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.feature-tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-locations h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.locations-grid span {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

/* ==========================================================================
   关于我们
   ========================================================================== */

.about {
    padding: 120px 0;
    background: var(--dark-bg);
    color: var(--text-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 30px;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.9;
}

.about-achievements {
    display: grid;
    gap: 30px;
}

.achievement-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.achievement-item p {
    opacity: 0.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    opacity: 0.8;
}

/* ==========================================================================
   技术实力
   ========================================================================== */

.technology {
    padding: 120px 0;
    background: var(--light-bg);
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-category h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-dark);
    text-align: center;
}

.tech-flow {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tech-step {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    position: relative;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.tech-step:hover {
    transform: translateX(10px);
    background: var(--gradient-primary);
    color: white;
}

.tech-step:not(:last-child)::after {
    content: '↓';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tech-tag {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
}

/* ==========================================================================
   应用案例
   ========================================================================== */

.cases {
    padding: 120px 0;
    background: var(--dark-bg);
    color: var(--text-light);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.case-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.case-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.case-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.case-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.case-item p {
    opacity: 0.8;
    line-height: 1.6;
}

/* ==========================================================================
   联系我们
   ========================================================================== */

.contact {
    padding: 120px 0;
    background: var(--light-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.contact-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contact-details p {
    color: #666;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.contact-form h3 {
    margin-bottom: 30px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ==========================================================================
   页脚
   ========================================================================== */

.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand img {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.6;
    margin-bottom: 5px;
}

/* ==========================================================================
   动画
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-features {
        gap: 40px;
    }
    
    .product-card,
    .product-card.featured {
        grid-template-columns: 1fr;
    }

    /* 确保移动端视频比例正确 */
    .product-video {
        aspect-ratio: 16/9;
    }
    
    .about-content,
    .contact-content,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-right {
        gap: 15px;
    }

    .lang-toggle {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-content {
        padding: 30px 20px;
    }
    
    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .product-content {
        padding: 20px 15px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   新闻预览区域
   ========================================================================== */

.news-preview {
    padding: 100px 0;
    background: var(--light-bg);
}

.news-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.news-preview-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.news-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.news-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transition: left 0.5s ease;
}

.news-preview-card:hover::before {
    left: 0;
}

.news-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
}

.news-preview-content {
    padding: 25px;
}

.news-preview-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-preview-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-preview-meta {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.news-preview-tags {
    display: flex;
    gap: 6px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.news-preview-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.news-preview-actions {
    text-align: center;
    margin-top: 40px;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.loading-news {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-news h3 {
    margin-bottom: 10px;
    color: #333;
}

/* 响应式设计 - 新闻预览 */
@media (max-width: 768px) {
    .news-preview {
        padding: 60px 0;
    }
    
    .news-preview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }
    
    .news-preview-content {
        padding: 20px;
    }
    
    .news-preview-title {
        font-size: 1.1rem;
    }
    
    .news-preview-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
} 