/* ── 公共基础样式，index.html 和 tools.html 共用 ── */

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

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    padding: 48px 96px;
    font-size: 14px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 24px 0;
}

/* ── 页面导航 Tab ── */
.page-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-bottom: none;
    transition: all 0.2s;
    position: relative;
    bottom: -1px;
}

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

.page-tab.active {
    color: var(--accent-primary);
    background: var(--bg-secondary);
    border-color: var(--border-color);
    border-bottom-color: var(--bg-secondary);
    font-weight: 600;
}

/* ── Header ── */
.header {
    margin-bottom: 48px;
    text-align: center;
    position: relative;
    padding: 48px 0;
}

.github-link {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.github-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.header h1 {
    font-size: 42px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.update-date {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.header .subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 500;
    line-height: 1.7;
}

/* ── 超宽屏模式 ── */
.ultra-wide .container {
    max-width: none !important;
}

/* ── 设置按钮与面板 ── */
.settings-wrapper {
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: flex-end;
    bottom: -1px;
}

.settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}

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

.settings-btn.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--border-color);
}

.settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    width: 200px;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
}

.settings-panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.settings-toggle-row label:first-child {
    cursor: pointer;
    flex: 1;
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-color);
    border-radius: 20px;
    transition: background 0.2s;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ── 底部说明 ── */
.notes-section {
    margin-top: 32px;
    padding: 20px 0;
}

.notes-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.notes-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-section li {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
}

.notes-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

/* ── 更新日志 ── */
.updates-section {
    margin-top: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.updates-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.update-item:last-child {
    border-bottom: none;
}

.log-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.update-items {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 16px;
}

.update-items li {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 3px 0;
    position: relative;
}

.update-items li::before {
    content: "-";
    position: absolute;
    left: -12px;
    color: var(--text-tertiary);
}
