/* ============================================
   Stellaris AI - 科技公司网站样式
   模仿月之暗面设计风格
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
    --bg-primary: #050510;
    --bg-secondary: #0a0a1a;
    --bg-card: rgba(15, 15, 40, 0.6);
    --bg-card-hover: rgba(20, 20, 55, 0.8);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.6);
    --text-tertiary: rgba(240, 240, 245, 0.35);
    
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 30%, #a78bfa 60%, #6366f1 100%);
    
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --max-width: 1200px;
    --nav-height: 72px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- 粒子背景 ---------- */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
    padding: 0 24px;
}

.navbar.scrolled {
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    z-index: 101;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    position: relative;
}

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

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

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

.lang-switch {
    padding: 4px 10px;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    font-size: 0.8rem !important;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 16, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu a {
    font-size: 1.4rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.mobile-menu a:hover {
    color: var(--accent-light);
}

/* ---------- Hero 主视觉区 ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent-light);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease forwards;
}

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

.hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s 0.1s ease forwards;
    opacity: 0;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: gradientShift 4s ease infinite;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s 0.2s ease forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s 0.3s ease forwards;
    opacity: 0;
}

/* 按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 8px 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

/* Hero 视觉元素 */
.hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.orb {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.05) 40%, transparent 70%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbPulse 4s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(99,102,241,0.15);
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 380px;
    height: 380px;
    animation: ringRotate 12s linear infinite;
}

.ring-2 {
    width: 460px;
    height: 460px;
    border-color: rgba(139,92,246,0.1);
    animation: ringRotate 18s linear infinite reverse;
}

.ring-3 {
    width: 540px;
    height: 540px;
    border-color: rgba(99,102,241,0.06);
    animation: ringRotate 24s linear infinite;
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    z-index: 2;
    animation: fadeInUp 0.6s 0.5s ease forwards;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-tertiary), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ---------- 通用 Section 样式 ---------- */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--accent-light);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- 研究动态区 ---------- */
.research {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.research-card:hover::before {
    opacity: 1;
}

.card-date {
    font-size: 0.8rem;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--accent-light);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.card-link:hover {
    gap: 10px;
}

/* ---------- 产品能力区 ---------- */
.product {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.capability-item {
    background: var(--bg-card);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.capability-item:hover {
    background: var(--bg-card-hover);
}

.cap-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--accent-light);
    opacity: 0.8;
    transition: all 0.4s ease;
}

.capability-item:hover .cap-icon {
    opacity: 1;
    transform: scale(1.05);
}

.capability-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.capability-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- 品牌文化 / Doodle 区 ---------- */
.culture {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.doodle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.doodle-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}

.doodle-card.large {
    grid-row: span 2;
}

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

.doodle-visual {
    aspect-ratio: 16/9;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 32px;
    overflow: hidden;
}

.doodle-card.large .doodle-visual {
    aspect-ratio: 3/4;
}

.doodle-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(99,102,241,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(139,92,246,0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(167,139,250,0.05) 0%, transparent 70%);
}

.doodle-text {
    position: relative;
    z-index: 1;
}

.doodle-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.doodle-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 6px 0;
}

.doodle-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- 下载区 ---------- */
.download {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.download-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 64px;
    text-align: center;
}

.download-text .section-desc {
    margin-bottom: 32px;
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.download-platforms {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.platform-item:hover {
    color: var(--accent-light);
}

.platform-item svg {
    width: 40px;
    height: 40px;
}

/* ---------- 加入我们 ---------- */
.careers {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.careers-content {
    text-align: center;
    padding: 80px 24px;
    background: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(139,92,246,0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
}

.careers-content h2 {
    margin-bottom: 16px;
}

.careers-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.7;
}

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

.footer-links a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ---------- 滚动动画 ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 关键帧动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 1024px) {
    .research-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }

    .capability-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doodle-grid {
        grid-template-columns: 1fr;
    }

    .doodle-card.large {
        grid-row: span 1;
    }

    .doodle-card.large .doodle-visual {
        aspect-ratio: 16/9;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .capability-grid {
        grid-template-columns: 1fr;
    }

    .download-content {
        padding: 40px 24px;
    }

    .download-platforms {
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
