/* --- 核心变量与基础定义 --- */
:root {
  --brand-orange: #ff9800;
  --brand-green: #4caf50;
  --brand-blue: #2196f3;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --bg-body: #f4f7fa;
  --card-bg: #ffffff;
  --border-soft: #edf2f7;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
}
a { text-decoration: none; transition: var(--transition); color: var(--brand-green); }

/* 固定页头 */
.head-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eee;
}

/* 主容器 */
.container {
    max-width: 1200px; /* PC端宽屏显示 */
    margin: 0 auto;
    padding: 20px 50px 20px 20px;
    padding-top: 80px; /* 为固定头部留出空间 */
}


/* --- 模块标题样式 --- */
.section-header {
    margin: 40px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-header h2 {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-header h2::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--brand-green);
    border-radius: 2px;
}

/* --- 1. 油价趋势图看板 --- */
.chart-panel {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
}
.chart-placeholder {
    width: 100%;
    height: 350px;
    background: #fafafa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* --- 2. 今日油价网格 (响应式表格) --- */
.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.price-table-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: var(--transition);
}
.price-table-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th { background: #f8f9fa; color: var(--text-sub); padding: 12px 10px; text-align: center; font-weight: 600; }
.price-table td { padding: 10px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.price-table tr:hover { background: #fdfdfd; }
.price-table .region-name { font-weight: 700; color: var(--text-main); text-align: left; padding-left: 15px; }
.price-table .high-price { color: var(--brand-red); font-weight: 800; }
.price-table .low-price { color: var(--brand-green); font-weight: 800; }

/* --- 3. 全国城市大索引 --- */
.city-directory {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.province-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f1f2f6;
    align-items: flex-start;
}
.province-row:last-child { border-bottom: none; }

.province-name {
    width: 120px;
    font-weight: 800;
    color: var(--brand-green);
    flex-shrink: 0;
    padding-top: 2px;
}
.city-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
}
.city-links a {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-main);
    transition: var(--transition);
    padding: 2px 5px;
    border-radius: 4px;
}
.city-links a:hover {
    background: var(--brand-green);
    color: var(--card-bg);
}

.province_price_board_comment {
    padding-left: 32px;
    padding-right: 32px;
    color: #666;
    font-size: 80%;
    line-height: 180%;
}

/* --- 1. 顶部预警栏 --- */
.notice-bar {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #c8e6c9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.notice-bar b { color: var(--brand-green); border-bottom: 1px solid; cursor: pointer; }

/* --- 2. 调价周期时间线 --- */
.adj-dates {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 13px;
    color: var(--text-sub);
}
.adj-dates b { color: var(--text-main); }

/* --- 3. 核心价格卡片 --- */
.price-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin-bottom: 30px;
    border: 1px solid var(--border-soft);
}

.price-card-header { text-align: center; margin-bottom: 30px; }
.brand-tag { font-size: 12px; color: var(--brand-green); font-weight: bold; letter-spacing: 1px; display: block; margin-bottom: 5px; }
.city-title { font-size: 32px; font-weight: 900; margin-bottom: 5px; }
.current-date { font-size: 14px; color: var(--text-sub); font-weight: 600; }

/* --- 4. 价格明细表 --- */
.price-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.price-table th {
    text-align: left; padding: 15px 10px;
    color: var(--text-sub); font-size: 14px; font-weight: 700;
    border-bottom: 2px solid var(--border-soft);
}
.price-table td { padding: 18px 10px; border-bottom: 1px solid var(--border-soft); }
.price-table tr:last-child td { border-bottom: none; }

.region-name { font-weight: 800; color: var(--brand-blue, #2980b9); cursor: pointer; }
.price-val { font-size: 18px; font-weight: 800; font-family: "SF Pro Text", monospace; }
.price-val.highlight { color: var(--brand-orange); } /* 匹配截图中的橙色高亮 */
.price-val.muted { color: #d1d5db; font-weight: normal; }

/* --- 5. 辅助信息与按钮 --- */
.data-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 30px; line-height: 1.8; }
.data-desc b { color: var(--brand-green); }

.btn-wrap { text-align: center; margin-bottom: 60px; }
/* --- 功能按钮 --- */
.action-btns { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }
.btn-outline {
    padding: 8px 25px;
    border-radius: 8px;
    background: var(--brand-green);
    color: var(--card-bg);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}
.btn-outline:hover {
    border-color: var(--brand-blue);
    color: var(--card-bg);
    background: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.1);
}
/* --- 头部核心卡片 --- */
.header-section { text-align: center; padding: 40px 0 20px; }
.city-name { font-size: 32px; font-weight: 900; margin-bottom: 5px; }
.update-date { font-size: 14px; color: var(--text-muted); margin-bottom: 30px; }

.price-compare-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin-bottom: 30px;
}

.price-compare-card .price-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; border-bottom: 1px solid var(--border-soft); gap: 0;}
.price-compare-card .price-grid:last-child { border-bottom: none; }
.price-compare-card .price-cell { padding: 15px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.price-compare-card .cell-label { background: var(--card-bg); font-weight: 700; color: var(--text-muted); }
.price-compare-card .price-val { font-size: 22px; font-weight: 800; font-family: monospace; }
.price-compare-card .high-price { color: var(--brand-orange); }
.price-compare-card .low-price { color: var(--brand-green); }

/* --- 模块通用标题 --- */
.section-card { background: var(--card-bg); border-radius: 16px; padding: 25px; margin-bottom: 25px; border: 1px solid var(--border-soft); }
.section-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 18px; background: var(--brand-green); border-radius: 2px; }
.section-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; display: block; }

/* --- 趋势图模拟 --- */
.chart-visual { height: 200px; background: var(--card-bg); border-radius: 12px; border: 1px dashed #ddd; display: flex; align-items: center; justify-content: center; color: #999; font-size: 13px; }

/* --- 排名表格 --- */
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th { text-align: left; padding: 12px; color: var(--text-muted); border-bottom: 2px solid var(--border-soft); }
.rank-table td { padding: 12px; border-bottom: 1px solid var(--border-soft); }
.rank-table tr:hover { background-color: #f9fbfd; }
.link-blue { color: var(--brand-blue); text-decoration: none; font-weight: 500; }
.link-blue:hover { text-decoration: underline; }

/* --- 底部数据统计 --- */
.user-stat { text-align: center; padding: 40px 0; font-size: 20px; font-weight: 800; color: var(--text-dark); }

/* --- 分页基础样式 --- */
.station_pager {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    padding: 20px 0;
    gap: 8px; /* 按钮之间的间距 */
    user-select: none;
}

.station_pager li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    background-color: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

/* 悬停效果 */
.station_pager li:hover:not(.active):not(.disabled) {
    border-color: var(--brand-green);
    color: var(--brand-green);
    background-color: var(--brand-green-light);
    transform: translateY(-1px);
}

/* 激活状态（当前页） */
.station_pager li.active {
    background-color: var(--brand-green);
    color: var(--card-bg);
    border-color: var(--brand-green);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
    cursor: default;
}

/* 禁用状态（如第一页时的“上一页”） */
.station_pager li.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: transparent;
}

/* 特殊处理：文字较长的按钮（上一页/下一页） */
.station_pager li:first-child,
.station_pager li:last-child {
    padding: 0 12px;
    font-weight: normal;
}

/* --- 移动端自适应微调 --- */
@media (max-width: 480px) {
    .station_pager {
        gap: 5px;
    }
    .station_pager li {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 6px;
    }
}

/* --- 黑夜模式适配补充 (如果你之前没写全局 img/filter) --- */
@media (prefers-color-scheme: dark) {
    :root {
        /* 背景色：使用深黑色或深灰色 */
        --bg-body: #12141a;       /* 极深蓝黑背景 */
        --card-bg: #1c1f26;       /* 卡片背景，比底色稍浅，增加浮现感 */
        --bg-gray: #252932;       /* 搜索框、输入框、表头等次级背景 */

        /* 文字颜色 */
        --text-dark: #e2e8f0;     /* 主文字：浅灰白 */
        --text-muted: #94a3b8;    /* 辅助文字：中灰蓝 */

        /* 边框与装饰 */
        --border-soft: #2d333f;   /* 线条：深灰色 */
        --bg-gray: #2a2a2a;    /* 搜索框、表格表头的背景 */

        /* 品牌色微调（在黑色背景下稍微调亮一点，增加霓虹感） */
        --brand-green: #4ade80;   /* 调亮一点的绿色，增加对比 */
        --brand-green-light: rgba(74, 222, 128, 0.15);
        --brand-blue: #60a5fa;
        --brand-orange: #fbbf24;
    }

    /* 夜间模式下的特殊处理 */
    body {
        background-color: var(--bg-body);
        color: var(--text-dark);
    }

    /* 图片亮度调节：防止车标/Logo 在暗色下太刺眼 */
    img {
        filter: brightness(0.8) contrast(1.2);
    }

    .station_pager li.active {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .head-mobile {
        background-color: var(--card-bg);
        border-bottom: 1px solid var(--border-soft);
    }
    .price-table-card {
        background: var(--card-bg);
    }
    .price-table th {
        background: var(--bg-gray);
    }
    .price-table tr:hover { background: var(--bg-gray); }

    }

/* 移动端优化 */
@media screen and (max-width: 768px) {
    /* 主容器 */
    .container {
        padding: 160px 10px 10px 10px; /* 为固定头部留出空间 */
    }
    .chart-panel {
        background: var(--card-bg);
        border-radius: 16px;
        padding: 30px 0;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-soft);
    }
    .section-header {display: block;}
    .price-grid { grid-template-columns: 1fr; }
    .province-row { flex-direction: column; }
    .province-name { margin-bottom: 10px; width: 100%; font-size: 16px; }
    .chart-placeholder { height: 250px; }
    .section-header h2 { font-size: 18px; }
    .price-cell { border-bottom: 1px solid #f0f0f0; }
    .price-cell:nth-child(3n) { border-bottom: 4px solid var(--border-soft); }
    .action-btns { flex-direction: column; }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .report-table th:nth-child(4),
    .report-table td:nth-child(4),
    .report-table th:nth-child(7),
    .report-table td:nth-child(7) {
        display: none;
    }
    .price-card { padding: 25px 15px; }
    .city-title { font-size: 26px; }
    .price-table th, .price-table td { padding: 12px 5px; font-size: 14px; }
    .price-val { font-size: 16px; }
    .adj-dates { flex-direction: column; gap: 5px; text-align: center; }
}

@media screen and (max-width: 480px) {
    /* 主容器 */
    .container {
        padding: 160px 10px 10px 10px; /* 为固定头部留出空间 */
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    /* 进一步隐藏更多列以节省空间 */
    .report-table th:nth-child(3),
    .report-table td:nth-child(3) {
        display: none;
    }
}
/* 页脚 */
footer { text-align: left; padding: 40px 20px; color: #666; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }