/* VIDDsys 样式系统 v4 — 纯黑/纯白极简主题 + Outfit 字体 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* ===== Design Tokens: Light ===== */
:root {
    --accent: #3db8bf;
    --accent-light: #e8f6f7;
    --accent-dark: #2a8a8f;
    --bg: #ffffff;
    --card: #ffffff;
    --text: #0a0a0a;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e5e5e5;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --max-w: 960px;
    --header-bg: rgba(255,255,255,0.88);
    --footer-border: #e5e5e5;
    --font-display: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-body: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

/* ===== Design Tokens: Dark (Pure Black + White) ===== */
[data-theme="dark"] {
    --accent: #5dd5db;
    --accent-light: #0d2628;
    --accent-dark: #8ee4e8;
    --bg: #000000;
    --card: #0a0a0a;
    --text: #fafafa;
    --text-light: #a0a0a0;
    --text-muted: #666666;
    --border: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-hover: 0 4px 24px rgba(0,0,0,0.6);
    --header-bg: rgba(0,0,0,0.88);
    --footer-border: #ffffff;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scrollbar-gutter: stable; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== Header ===== */
header {
    width: 100%;
    background: var(--header-bg);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
}
.logo img { height: 28px; border-radius: var(--radius-sm); }
.logo span { color: var(--accent); transition: color 0.3s ease; }

nav { display: flex; gap: 0; align-items: center; }

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

nav a:hover { color: var(--accent); background: var(--accent-light); }
nav a.active { color: var(--accent); font-weight: 600; background: var(--accent-light); }

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--text-light);
    transition: all 0.2s ease;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Container ===== */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 40px 24px 64px;
    animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Hero (Homepage) ===== */
.hero {
    text-align: center;
    padding: 72px 0 56px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: var(--text);
}
.hero p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}
.hero .subtitle {
    font-size: 16px;
    color: var(--text-light);
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 32px;
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.page-header p {
    color: var(--text-light);
    font-size: 15px;
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.breadcrumb a:hover { opacity: 0.8; }

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.card:active { transform: translateY(0); }

.card h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}
.card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}
.card .meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== Section Cards (Homepage) ===== */
.section-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 16px;
}
.section-card:last-child { margin-bottom: 0; }
.section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.section-card:active { transform: translateY(0); }

.section-card h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}
.section-card p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.section-card .count {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== About Card ===== */
.about-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 600px;
    line-height: 1.8;
}
.about-card h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}
.about-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 12px;
}
.about-card a { color: var(--accent); text-decoration: none; font-weight: 500; }

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding: 10px 24px;
    background: var(--accent);
    color: #fff !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-display);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61,184,191,0.3);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 28px 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 2px solid var(--footer-border);
    transition: border-color 0.3s ease;
}

/* ===== Error Pages ===== */
.error-page {
    text-align: center;
    padding: 80px 40px;
}
.error-page .error-code {
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.25;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -4px;
}
.error-page h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}
.error-page p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 36px;
}
.error-page .back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}
.error-page .back-home:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61,184,191,0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 36px; }
    .container { padding: 24px 16px 48px; }
    .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .page-header h1 { font-size: 26px; }
    .section-card { padding: 24px; }
    .error-page .error-code { font-size: 80px; }
}

@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 36px; }
    .container { padding: 24px 16px 48px; }
    .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .page-header h1 { font-size: 26px; }
    .section-card { padding: 24px; }
    .error-page .error-code { font-size: 80px; }
}

@media (max-width: 480px) {
    .hero { padding: 36px 0 32px; }
    .hero h1 { font-size: 28px; }
    .container { padding: 20px 16px 40px; }
    .card-grid { grid-template-columns: 1fr; }
    .card { padding: 14px 16px; }
    .header-inner { padding: 0 16px; }
    nav a { padding: 5px 10px; font-size: 13px; }
    .error-page .error-code { font-size: 64px; }
    .logo { font-size: 18px; }
}