/* ===================================
   XTech AI Lab - Main Stylesheet
   =================================== */

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

/* CSS Variables */
:root {
    /* Background Colors */
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1A1A1A;
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-tertiary: #707070;
    
    /* Border Colors */
    --border-color: #252525;
    --border-hover: #353535;
    
    /* Accent Colors */
    --accent-blue: #2563EB;
    --accent-blue-light: #3B82F6;
    --accent-green: #10B981;
    --accent-purple: #2563EB;
    
    /* Gray Shades */
    --gray-900: #0F0F0F;
    --gray-800: #1A1A1A;
    --gray-700: #262626;
    --gray-600: #404040;
    --gray-500: #525252;
    --gray-400: #737373;
}

/* Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 18px;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

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

.nav-cta {
    padding: 12px 24px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--accent-blue-light);
    transform: translateY(-1px);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    padding: 160px 24px 120px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-blue), transparent);
    opacity: 0.1;
    filter: blur(120px);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-green);
    margin-bottom: 32px;
    width: fit-content;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-size: clamp(48px, 7vw, 80px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 720px;
    margin-bottom: 48px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 16px 32px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--accent-blue-light);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 16px 32px;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ===================================
   Common Section Styles
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===================================
   Mission Section
   =================================== */
.mission {
    padding: 120px 24px;
    background: var(--bg-secondary);
}

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

.mission-text {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.highlight-text {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================
   Research Section
   =================================== */
.research-section {
    padding: 120px 24px;
    background: var(--bg-primary);
}

.research-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 80px auto 60px;
    position: relative;
}

.research-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.research-item {
    text-align: center;
    z-index: 1;
    background: var(--bg-primary);
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    cursor: pointer;
}

.research-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.research-dot {
    width: 24px;
    height: 24px;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.research-item.active .research-dot {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.research-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Research Cards - 四列并排布局 */
.research-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .research-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .research-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* 优化卡片样式以适应并排布局 */
.research-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%; /* 确保所有卡片高度一致 */
}

.research-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.research-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.research-card p {
    color: #aaa;
    line-height: 1.5;
    font-size: 14px;
}

/* 悬停效果 */
.research-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

/* ===================================
   Divisions Section
   =================================== */
.divisions {
    padding: 120px 24px;
    background: var(--bg-secondary);
    position: relative;
}

.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 32px;
}

.division-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 48px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.division-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.division-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.division-card:hover::before {
    transform: translateX(0);
}

.division-icon {
    width: 64px;
    height: 64px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
}

.division-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.division-subtitle {
    font-size: 16px;
    color: var(--accent-blue-light);
    font-weight: 500;
    margin-bottom: 24px;
}

.division-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.division-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* ===================================
   Features Section
   =================================== */
.features {
    padding: 120px 24px;
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
    margin-top: 80px;
}

.feature-card {
    text-align: center;
    position: relative;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Feature Image - Responsive Tech Stack Logos */
.feature-image {
    width: 100%;
    max-width: 100%; /* 让图片占满容器宽度 */
    height: auto;
    margin: 3rem auto 0;
    display: block;
    
    /* 初始状态设置为可见，避免图片不显示 */
    opacity: 1;
    
    /* 添加过渡效果 */
    transition: all 0.3s ease;
}

/* 如果想要淡入效果，可以使用这个类 */
.feature-image.fade-in {
    animation: fadeInUp 1s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .feature-image {
        margin: 2rem auto 0;
    }
}

@media (max-width: 480px) {
    .feature-image {
        margin: 1.5rem auto 0;
    }
}

/* 淡入动画 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 鼠标悬停效果（可选） */
.feature-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Tech Stack Section
   =================================== */
.tech-stack {
    padding: 120px 24px;
    background: var(--bg-secondary);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.tech-category h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-tag {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.1);
}

/* ===================================
   CTA Section
   =================================== */
.cta {
    padding: 120px 24px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E') repeat;
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.cta-description {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-button {
    padding: 16px 40px;
    background: var(--text-primary);
    color: var(--accent-blue);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Footer
   =================================== */
footer {
    padding: 80px 24px 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.social-link:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .nav-menu { 
        display: none; 
    }
    
    .hero-title { 
        font-size: 48px; 
    }
    
    .section-title { 
        font-size: 36px; 
    }
    
    .divisions-grid { 
        grid-template-columns: 1fr; 
    }
    
    .research-cards { 
        grid-template-columns: 1fr; 
    }
    
    .research-timeline { 
        flex-direction: column; 
        gap: 30px;
    }
    
    .research-timeline::before { 
        display: none; 
    }
    
    .footer-content { 
        grid-template-columns: 1fr; 
        gap: 32px; 
    }
    
    .footer-bottom { 
        flex-direction: column; 
        gap: 24px; 
    }
}
