/* ===== CSS Variables ===== */
:root {
    --primary: #000000;
    --secondary: #666666;
    --dark: #000000;
    --dark-light: #111111;
    --text: #FFFFFF;
    --text-muted: #888888;
    --border: #333333;
    --border-light: #222222;
}

[data-theme="light"] {
    --primary: #000000;
    --text: #000000;
    --text-muted: #555555;
    --dark: #FFFFFF;
    --dark-light: #F5F5F5;
    --border: #E0E0E0;
    --border-light: #EEEEEE;
}

/* Light theme specific overrides */
[data-theme="light"] body {
    color: #000000;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #000000;
}

[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] li {
    color: #000000;
}

[data-theme="light"] .btn-secondary {
    border-color: #333333;
    color: #000000;
}

[data-theme="light"] .btn-secondary:hover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .about-card,
[data-theme="light"] .app-card,
[data-theme="light"] .data-item,
[data-theme="light"] .team-card,
[data-theme="light"] .contact-form,
[data-theme="light"] .tech-feature {
    background: #FFFFFF;
    border-color: #E0E0E0;
}

[data-theme="light"] .about-card:hover,
[data-theme="light"] .app-card:hover {
    background: #FAFAFA;
    border-color: #000000;
}

[data-theme="light"] .about-icon svg,
[data-theme="light"] .app-icon svg,
[data-theme="light"] .tech-feature-icon svg,
[data-theme="light"] .contact-item-icon svg {
    color: #000000;
}

[data-theme="light"] .team-avatar {
    background: #F0F0F0;
    border-color: #E0E0E0;
    color: #555555;
}

[data-theme="light"] .team-card .role {
    color: #000000;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: #FFFFFF;
    border-color: #E0E0E0;
    color: #000000;
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
    border-color: #000000;
}

[data-theme="light"] .form-group label {
    color: #555555;
}

[data-theme="light"] footer {
    border-color: #E0E0E0;
}

[data-theme="light"] .footer-links a {
    color: #555555;
}

[data-theme="light"] .footer-links a:hover {
    color: #000000;
}

[data-theme="light"] .social-links svg {
    color: #555555;
}

[data-theme="light"] .data-number {
    color: #000000;
}


/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Navigation ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

nav.scrolled {
    background-color: #000000 !important;
    background: #000000 !important;
    padding: 1rem 5%;
}

nav.scrolled .nav-links a {
    color: #888888 !important;
}

nav.scrolled .nav-links a:hover {
    color: #FFFFFF !important;
}

.nav-links a {
    color: #FFFFFF;
    transition: color 0.3s ease;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Language Toggle Button */
.lang-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.lang-toggle:hover {
    border-color: var(--text);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.lang-toggle .lang-zh,
.lang-toggle .lang-en {
    display: none;
}

.lang-toggle .lang-en {
    display: inline;
}

nav.scrolled .lang-toggle {
    border-color: #333333;
    color: #888888;
}

nav.scrolled .lang-toggle:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

/* ===== Buttons ===== */
.cta-btn {
    background: var(--text);
    color: var(--dark);
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn:hover {
    background: #E0E0E0;
    transform: translateY(-1px);
}

[data-theme="light"] .cta-btn {
    background: #000000;
    color: #FFFFFF;
}

[data-theme="light"] .cta-btn:hover {
    background: #333333;
}

[data-theme="light"] .btn-secondary {
    border-color: #333333;
    color: #000000;
}

[data-theme="light"] .btn-secondary:hover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

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

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10rem 5% 6rem;
    position: relative;
    background: #000000;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: -1;
}


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

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-visual {
    margin-top: 5rem;
    position: relative;
}

/* ===== Section Styles ===== */
section {
    padding: 6rem 5%;
    transition: background-color 0.5s ease, color 0.5s ease;
}

section.fade-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.5s ease;
}

section.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section connectors - smooth visual flow */
section + section {
    margin-top: -1px;
}

[data-theme="light"] section {
    background: var(--dark);
}

[data-theme="light"] .about {
    padding-top: 5rem;
}

[data-theme="light"] .applications {
    padding-top: 5rem;
}

[data-theme="light"] .team {
    padding-top: 5rem;
}

[data-theme="light"] .contact {
    padding-top: 5rem;
    margin-top: -1px;
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background: var(--dark-light);
}

.about-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.about-card {
    background: var(--dark-light);
    padding: 3rem 2rem;
    transition: all 0.3s ease;
}

.about-card:hover {
    background: #1A1A1A;
    transform: translateY(-4px);
}

[data-theme="light"] .about-card:hover {
    background: #FAFAFA;
    transform: translateY(-4px);
}

.about-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text);
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Technology Section ===== */
.tech-showcase {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.tech-visual {
    position: relative;
}

.device-mockup {
    width: 100%;
    max-width: 450px;
    display: block;
}

.tech-features {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tech-feature {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.tech-feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-feature-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text);
}

.tech-feature h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tech-feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Applications Section ===== */
.applications {
    background: var(--dark-light);
}

.app-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.app-card {
    background: var(--dark-light);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.app-card:hover {
    background: #1A1A1A;
    transform: translateY(-4px);
}

[data-theme="light"] .app-card:hover {
    background: #FAFAFA;
    transform: translateY(-4px);
}

.app-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text);
}

.app-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.app-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== Data Section ===== */
.data {
    text-align: center;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.data-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.data-item {
    background: var(--dark);
    padding: 3rem 1.5rem;
}

.data-number {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.data-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Team Section ===== */
.team-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.team-card {
    text-align: center;
}

.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--dark-light);
    border: 1px solid var(--border);
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.team-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-card .role {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.team-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--dark-light);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.contact-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.contact-item span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.wechat-qr {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wechat-qr img {
    object-fit: cover;
}

.contact-form {
    background: var(--dark);
    border: 1px solid var(--border);
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text);
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.contact-form .cta-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
}

/* ===== Footer ===== */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    opacity: 0.7;
}

.social-links svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }

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

    .tech-showcase {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .tech-visual {
        order: -1;
    }

    .device-mockup {
        max-width: 350px;
        margin: 0 auto;
    }

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

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    nav.scrolled {
        padding: 0.75rem 5%;
    }

    .nav-links {
        display: none;
    }

    .lang-toggle {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
        min-width: 50px;
    }

    .logo img {
        height: 28px;
    }

    .hero {
        padding: 8rem 5% 4rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

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

    .about-grid,
    .app-grid,
    .data-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .about-grid,
    .app-grid,
    .data-grid {
        background: transparent;
        border: none;
    }

    .about-card,
    .app-card,
    .data-item {
        border: 1px solid var(--border);
        background: var(--dark-light);
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
}
