/**
 * 内容页面共享样式
 * 用于关于我们、隐私政策、联系方式、教程等页面
 * 保持与主应用一致的暗色主题风格
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    --bg-card: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-light: #475569;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Noto Sans SC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 导航栏 ==================== */
.page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
    font-family: var(--font-display);
    transition: color var(--transition-fast);
}

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

.nav-logo svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

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

.nav-links a svg {
    width: 18px;
    height: 18px;
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.nav-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

/* ==================== 语言切换器 ==================== */
.lang-switcher {
    position: relative;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.lang-switcher-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.lang-switcher-btn svg {
    flex-shrink: 0;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 120px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
    z-index: 200;
    overflow: hidden;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.lang-option:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.lang-option.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 页面主体 ==================== */
.page-main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ==================== 内容卡片 ==================== */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card h2 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.content-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.content-card ul,
.content-card ol {
    margin: 12px 0 12px 24px;
    color: var(--text-secondary);
}

.content-card li {
    margin-bottom: 8px;
}

.content-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.content-card a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.content-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.content-card code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    color: var(--primary-light);
}

.content-card pre {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

.content-card pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
}

/* ==================== 时间线 ==================== */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-card);
}

.timeline-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-item span {
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-item p {
    margin-top: 8px;
    color: var(--text-secondary);
}

/* ==================== 团队成员 ==================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.team-member {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-normal);
}

.team-member:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
}

.team-member h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.team-member span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== 联系方式 ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.contact-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

.contact-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.contact-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group label.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group label.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

/* ==================== 教程卡片 ==================== */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.tutorial-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.tutorial-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tutorial-thumbnail {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tutorial-thumbnail svg {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    opacity: 0.6;
}

.tutorial-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.tutorial-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.tutorial-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

.tutorial-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.tutorial-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tutorial-meta svg {
    width: 14px;
    height: 14px;
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

/* ==================== 文章页 ==================== */
.article-content {
    max-width: 780px;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--text-primary);
}

.article-content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 12px 0 12px 28px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-content strong {
    color: var(--text-primary);
}

.article-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--bg-tertiary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
}

.article-content .tip-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
}

.article-content .tip-box h4 {
    color: var(--primary-light);
    margin: 0 0 8px;
    font-size: 15px;
}

.article-content .tip-box p {
    margin: 0;
}

.article-content .warning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
}

.article-content .warning-box h4 {
    color: var(--warning-color);
    margin: 0 0 8px;
    font-size: 15px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.article-content td {
    color: var(--text-secondary);
}

.article-content kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    font-family: var(--font-mono, 'SF Mono', 'Consolas', monospace);
    line-height: 1.4;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--border-color);
}

/* ==================== 文章元信息 ==================== */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==================== 步骤列表 ==================== */
.step-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    counter-reset: step;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== 页脚 ==================== */
.page-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

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

.footer-brand svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary-light);
}

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

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
}

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

/* ==================== 文章底部导航 ==================== */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.article-nav-prev,
.article-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
    max-width: 45%;
}

.article-nav-prev:hover,
.article-nav-next:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.article-nav-prev svg,
.article-nav-next svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.article-nav-prev div,
.article-nav-next div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-nav-prev span,
.article-nav-next span {
    font-size: 12px;
    color: var(--text-tertiary);
}

.article-nav-prev strong,
.article-nav-next strong {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .page-nav {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 8px;
        gap: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 16px;
        width: 100%;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .nav-links .lang-switcher {
        display: none;
    }

    .page-nav .lang-switcher {
        order: 1;
    }

    .page-main {
        padding: 24px 16px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .content-card {
        padding: 20px;
    }

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

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

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

    .article-nav {
        flex-direction: column;
    }

    .article-nav-prev,
    .article-nav-next {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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