/* ========== 2018 Material Design 风格 + 关于页面 ========== */
/* 直接复用 index.css 的变量，此文件通过 about.php 引入时需配合 index.css 或独立定义 */

:root {
    --primary: #4285F4;
    --primary-dark: #3367D6;
    --accent: #FF6D00;
    --bg: #FAFAFA;
    --card-bg: #FFFFFF;
    --surface: #F5F5F5;
    --text: #212121;
    --text-secondary: #616161;
    --text-hint: #9E9E9E;
    --border: #E0E0E0;
    --divider: #EEEEEE;
    --elevation-1: 0 1px 3px rgba(0,0,0,0.12);
    --elevation-2: 0 3px 6px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-round: 20px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    font-size: 16px;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    padding: 24px 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--elevation-2);
}

h1 {
    font-size: 28px;
    font-weight: 400;
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--accent);
}

h1 i { color: var(--primary); font-size: 0.85em; }

h2 {
    font-size: 22px;
    font-weight: 400;
    padding-bottom: 8px;
    margin: 32px 0 16px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    gap: 8px;
}

h2 i { color: var(--primary); font-size: 0.85em; }

h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border) 20%, var(--border) 80%, transparent);
    margin: 24px 0;
}

a { color: var(--primary); text-decoration: none; font-weight: 500; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

nav {
    text-align: center;
    margin-bottom: 20px;
    padding: 8px;
    background: var(--surface);
    border-radius: var(--radius);
}

nav a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all var(--transition);
}

nav a:hover { background: rgba(66,133,244,0.08); color: var(--primary); text-decoration: none; }

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--elevation-1);
    border-top: 3px solid var(--primary);
    transition: all var(--transition);
}

.stat-card:hover { box-shadow: var(--elevation-2); transform: translateY(-2px); }

.stat-card i { font-size: 1.3em; margin-bottom: 8px; display: block; color: var(--text-secondary); }

.stat-card .number {
    font-size: 1.8em;
    font-weight: 400;
    color: var(--text);
    display: block;
    line-height: 1.2;
}

.stat-card .label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card.warning { border-top-color: #F4B400; }
.stat-card.warning .number,
.stat-card.warning i { color: #F4B400; }
.stat-card.success { border-top-color: #0F9D58; }
.stat-card.success .number,
.stat-card.success i { color: #0F9D58; }
.stat-card.accent { border-top-color: var(--accent); }
.stat-card.accent .number,
.stat-card.accent i { color: var(--accent); }
.stat-card.teal { border-top-color: #009688; }
.stat-card.teal .number,
.stat-card.teal i { color: #009688; }
.stat-card.info { border-top-color: #4285F4; }
.stat-card.info .number,
.stat-card.info i { color: #4285F4; }

/* 趋势图 */
.chart-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 180px;
    min-width: 500px;
    gap: 4px;
    padding: 0 10px;
}

.bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 40px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease, background var(--transition);
    cursor: pointer;
}

.bar:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(66,133,244,0.3); }

.bar-value {
    font-size: 11px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 4px;
}

.bar-label {
    font-size: 10px;
    color: var(--text-hint);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

/* 排行列表 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--divider);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.rank-list li:last-child { border-bottom: none; }

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.rank-num.gold { background: #FFD700; color: #5D4037; }
.rank-num.silver { background: #C0C0C0; color: #424242; }
.rank-num.bronze { background: #CD7F32; color: #fff; }

.rank-item {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-count {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
}

/* 更新日志 */
.changelog-item {
    border-left: 3px solid var(--primary);
    padding: 14px 16px;
    margin: 16px 0;
    background: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    position: relative;
    transition: box-shadow var(--transition);
}

.changelog-item:hover { box-shadow: var(--elevation-1); }

.changelog-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 20px;
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.changelog-version {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.changelog-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.changelog-list li {
    padding: 2px 0;
    color: var(--text);
    font-size: 14px;
}

.changelog-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent);
    font-size: 0.8em;
    margin-right: 6px;
}

/* 信息卡片 */
.info-box {
    background: #E3F2FD;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 16px 0;
}

.info-box code {
    background: #BBDEFB;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #BBDEFB;
    font-size: 14px;
}

.info-table td:first-child {
    color: var(--text-secondary);
    width: 120px;
    font-weight: 500;
}

.info-table td:first-child i { margin-right: 6px; color: var(--primary); }

/* 页脚 */
.footer {
    margin-top: 40px;
    padding-top: 16px;
    font-size: 12px;
    text-align: center;
    color: var(--text-hint);
    border-top: 1px solid var(--divider);
}

/* ========== 平板端 ========== */
@media (max-width: 1024px) {
    body { padding: 16px 12px; }
    .container { max-width: 95%; padding: 24px; }
    h1 { font-size: 26px; }
    h2 { font-size: 20px; }
    .bar-chart { height: 150px; }
}

/* ========== 手机端 ========== */
@media (max-width: 600px) {
    body { padding: 0; font-size: 14px; }
    .container {
        max-width: 100%;
        padding: 8px;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    h1 { font-size: 18px; padding-bottom: 6px; margin-bottom: 10px; border-bottom-width: 1px; }
    h1::after { width: 30px; height: 1px; }
    h2 { font-size: 15px; margin: 16px 0 8px; padding-bottom: 4px; }
    h3 { font-size: 14px; }

    hr { margin: 12px 0; }

    nav { padding: 4px; }
    nav a { padding: 4px 8px; font-size: 10px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .stat-card { padding: 10px; }
    .stat-card .number { font-size: 1.3em; }
    .stat-card .label { font-size: 9px; }
    .stat-card i { font-size: 1em; margin-bottom: 4px; }

    .chart-container { padding: 10px; }
    .bar-chart { height: 120px; min-width: 300px; }
    .bar { max-width: 30px; }
    .bar-value { font-size: 9px; }
    .bar-label { font-size: 8px; }

    .rank-list li { padding: 6px 0; }
    .rank-num { width: 20px; height: 20px; font-size: 10px; }
    .rank-count { font-size: 11px; }

    .changelog-item { padding: 10px 12px; margin: 10px 0; }
    .changelog-version { font-size: 14px; }
    .changelog-date { font-size: 10px; }
    .changelog-list li { font-size: 12px; }

    .info-box { padding: 10px; }
    .info-table td { font-size: 12px; padding: 4px 6px; }
    .info-table td:first-child { width: 80px; }

    .footer { margin-top: 20px; padding-top: 10px; font-size: 10px; }
}

/* ========== 打印 ========== */
@media print {
    body { background: #fff; color: #000; padding: 0; }
    .container { box-shadow: none; border: 1px solid #ddd; }
    nav, .footer { display: none; }
    .changelog-item { break-inside: avoid; }
}

/* ========== 减少动画 ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 站点介绍区域 */
.about-intro {
    margin: 30px 0;
}

.about-intro h2 {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary, #4a90d9);
    color: var(--text, #333);
}

.intro-section {
    background: var(--surface, #f8f9fa);
    border-left: 4px solid var(--primary, #4a90d9);
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 18px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.intro-section:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.intro-section h3 {
    margin: 0 0 10px 0;
    font-size: 1.05em;
    color: var(--text, #333);
}

.intro-section h3 i {
    margin-right: 6px;
    color: var(--primary, #4a90d9);
}

.intro-section p {
    margin: 6px 0;
    line-height: 1.7;
    color: var(--text-secondary, #555);
    font-size: 0.95em;
}

.intro-section ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.intro-section ul li {
    margin: 5px 0;
    line-height: 1.6;
    color: var(--text-secondary, #555);
    font-size: 0.95em;
}

.intro-section a {
    color: var(--primary, #4a90d9);
    text-decoration: none;
    font-weight: 500;
}

.intro-section a:hover {
    text-decoration: underline;
}

.intro-section strong {
    color: var(--text, #333);
}