/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

:root {
    --bg: #ffffff;
    --bg-sub: #f9f9f9;
    --text-main: #111111;
    --text-muted: #666666;
    --border: #eaeaea;
    --card-hover: #f0f0f0;
    --accent: #0066cc;
    --accent-light: rgba(0, 102, 204, 0.1);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --sidebar-width: 260px;
}

body.dark {
    --bg: #0a0a0a;
    --bg-sub: #121212;
    --text-main: #f5f5f5;
    --text-muted: #888888;
    --border: #222222;
    --card-hover: #1a1a1a;
    --accent: #00e5ff;
    --accent-light: rgba(0, 229, 255, 0.1);
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
ul { list-style: none; }
button, select { font-family: inherit; }

/* 侧边栏（左侧滑出） */
.sidebar {
    position: fixed;
    top: 0;
    left: 0; 
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg);
    border-right: 1px solid var(--border); 
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar.active { transform: translateX(0); }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-direction: row-reverse; 
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo span { color: var(--accent); font-family: var(--font-mono); }

.close-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.close-btn svg { width: 20px; height: 20px; }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.side-nav a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
}

.side-nav a:hover {
    background-color: var(--bg-sub);
    color: var(--text-main);
}

.side-nav a.active {
    background-color: var(--card-hover);
    color: var(--text-main);
    font-weight: 600;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}
.theme-toggle:hover { color: var(--text-main); background: var(--card-hover); }
.theme-toggle svg { width: 16px; height: 16px; }

/* 主内容 */
.main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 统一顶栏 */
.top-header {
    display: flex;
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    background: var(--bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 80;
    justify-content: space-between;
    align-items: center;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn:hover { color: var(--accent); }

/* 语言选择器 */
.lang-switcher select {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}
.lang-switcher select:hover {
    background-color: var(--card-hover);
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-section {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 6rem 8%;
    animation: fadeIn 0.4s ease forwards;
}

.page-section.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 区块样式 */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
}

.btn-primary { background-color: var(--text-main); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background-color: transparent; color: var(--text-main); border-color: var(--border); }
.btn-secondary:hover { background-color: var(--card-hover); }

.section-header { margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; }

.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card-service {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    transition: border-color 0.3s;
}

.card-service:hover { border-color: var(--accent); }
.icon-box { color: var(--text-main); margin-bottom: 1.5rem; }
.icon-box svg { width: 28px; height: 28px; }
.card-service h3 { font-size: 1.25rem; margin-bottom: 0.8rem; font-weight: 600; }
.card-service p { color: var(--text-muted); font-size: 0.95rem; }

/* 项目列表 */
.project-list { display: flex; flex-direction: column; }
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.project-item:last-child { border-bottom: none; }
.project-info { display: flex; align-items: flex-start; gap: 1.5rem; }
.project-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
}
.project-status.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.project-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.3rem; }
.project-desc { color: var(--text-muted); font-size: 0.95rem; }

/* 加入我们 */
.join-container { background: var(--bg-sub); padding: 3rem; border-radius: 12px; border: 1px solid var(--border); }
.join-container h2 { margin-bottom: 1rem; font-size: 1.8rem; }
.join-container p { color: var(--text-muted); margin-bottom: 1.5rem; }

.join-list { margin-bottom: 2rem; }
.join-list li { color: var(--text-muted); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;}
.join-list li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); }

/* 页脚 */
footer {
    padding: 4rem 8% 3rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-left { flex: 1; min-width: 250px; }
.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.footer-logo span { color: var(--accent); font-family: var(--font-mono); }
.footer-left p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }

.footer-right { flex: 1; min-width: 250px; display: flex; flex-direction: column; align-items: flex-end;}
.footer-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 1.2rem; color: var(--text-main); }
.footer-links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links li { display: flex; align-items: center; gap: 0.6rem; color: var(--text-muted); }
.footer-links svg { width: 16px; height: 16px; }
.footer-links a { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-main); }
.footer-links a:hover { text-decoration: underline; color: var(--accent); }

/* 遮罩层 */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    z-index: 90;
    transition: opacity 0.3s ease;
}
.overlay.active { opacity: 1; pointer-events: all; }

/* 移动端适配 */
@media (max-width: 900px) {
    .page-section { padding: 4rem 5%; }
    .project-info { flex-direction: column; gap: 0.8rem; }
    
    footer { flex-direction: column; align-items: flex-start; gap: 2rem; padding: 3rem 5%; }
    .footer-right { align-items: flex-start; }
}