/* ============================================================
   火车时刻表 - CSS 样式
   蓝绿色系主题
   ============================================================ */

/* 重置与基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f0f4f5; line-height: 1.6; }
a { color: #00796b; text-decoration: none; }
a:hover { color: #004d40; text-decoration: underline; }

/* ===== 头部导航 ===== */
.site-header { background: linear-gradient(135deg, #004d40, #00695c); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; opacity: .9; }
.logo-icon { font-size: 1.4rem; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: rgba(255,255,255,.85); padding: 8px 14px; border-radius: 6px; font-size: .9rem; transition: all .2s; white-space: nowrap; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: #004d40; flex-direction: column; padding: 8px 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 20px; border-radius: 0; }
}

/* ===== 面包屑 ===== */
.breadcrumb { background: #fff; border-bottom: 1px solid #e0e4e8; }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; font-size: .82rem; color: #888; }
.breadcrumb-inner a { color: #666; }
.breadcrumb-inner a:hover { color: #00796b; }
.breadcrumb-inner .sep { margin: 0 6px; color: #ccc; }

/* ===== 主体 ===== */
.main-content { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* ===== 简介卡片 ===== */
.intro-card { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; text-align: center; }
.intro-card h1 { font-size: 1.6rem; color: #004d40; margin-bottom: 8px; }
.intro-card p { color: #555; font-size: .92rem; }

/* ===== 查询表单 ===== */
.query-box { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.query-box h2 { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }
.query-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: .82rem; color: #888; font-weight: 500; }
.form-select, .form-input { height: 42px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 12px; font-size: .92rem; color: #333; background: #fff; outline: none; transition: border-color .2s; }
.form-select:focus, .form-input:focus { border-color: #00796b; box-shadow: 0 0 0 3px rgba(0,121,107,.1); }
.form-select { min-width: 200px; }
.form-input { width: 100px; }
.btn-query { height: 42px; padding: 0 28px; background: #00796b; color: #fff; border: none; border-radius: 8px; font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-query:hover { background: #00695c; }
.swap-btn { height: 42px; width: 42px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.swap-btn:hover { background: #f0f4f5; }

@media (max-width: 768px) {
  .query-form { flex-direction: column; align-items: stretch; }
  .form-select, .form-input { min-width: auto; width: 100%; }
  .swap-btn { align-self: center; }
}

/* ===== 城市/车站索引 ===== */
.city-index { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.city-index h2 { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }
.city-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.city-nav a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; font-weight: 600; font-size: .85rem; color: #00796b; background: #e0f2f1; text-decoration: none; transition: all .15s; }
.city-nav a:hover { background: #00796b; color: #fff; text-decoration: none; }
.city-group { margin-bottom: 14px; }
.city-group-letter { font-size: 1rem; font-weight: 700; color: #00796b; margin-bottom: 6px; }
.city-group-items { display: flex; flex-wrap: wrap; gap: 8px; }
.city-item { display: inline-block; padding: 5px 12px; background: #f5f7fa; border-radius: 6px; font-size: .85rem; color: #555; cursor: pointer; transition: all .15s; text-decoration: none; border: 1px solid transparent; }
.city-item:hover { background: #e0f2f1; color: #004d40; border-color: #80cbc4; text-decoration: none; }
.city-item.muted { color: #ccc; cursor: default; }
.city-item.muted:hover { background: #f5f7fa; color: #ccc; border-color: transparent; }

/* ===== 省份标签 ===== */
.province-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== 表格 ===== */
.flight-info-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.flight-info-table th { background: #e0f2f1; color: #004d40; padding: 12px 16px; text-align: left; font-weight: 600; font-size: .85rem; width: 110px; white-space: nowrap; }
.flight-info-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: .92rem; color: #333; }
.flight-info-table tr:last-child td { border-bottom: none; }
.flight-info-table .highlight { color: #00796b; font-weight: 600; }
.flight-info-table a { color: #00796b; text-decoration: none; }
.flight-info-table a:hover { text-decoration: underline; }

a.airport-link { color: #00796b; text-decoration: none; transition: color .15s; }
a.airport-link:hover { color: #004d40; text-decoration: underline; }
a.flight-no-link { font-weight: 700; color: #00695c; text-decoration: none; }
a.flight-no-link:hover { color: #004d40; text-decoration: underline; }

.time-cell { color: #555; font-family: 'Consolas','Monaco',monospace; font-size: .95rem; }

/* ===== 列车类型标签 ===== */
.train-type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .78rem; font-weight: 700; }
.train-type-badge.type-G { background: #fff3e0; color: #e65100; }
.train-type-badge.type-D { background: #e3f2fd; color: #1565c0; }
.train-type-badge.type-C { background: #f3e5f5; color: #6a1b9a; }
.train-type-badge.type-Z { background: #e8f5e9; color: #2e7d32; }
.train-type-badge.type-T { background: #fff8e1; color: #f57c00; }
.train-type-badge.type-K { background: #fce4ec; color: #c62828; }
.train-type-badge.type-PU,.type-PK { background: #f5f5f5; color: #616161; }

/* ===== 热门车次 ===== */
.hot-flights { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.hot-flights h2 { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #f0f4f5; border-radius: 20px; font-size: .85rem; color: #333; transition: all .15s; text-decoration: none; border: 1px solid transparent; }
.hot-tag:hover { background: #e0f2f1; color: #004d40; border-color: #80cbc4; text-decoration: none; }
.hot-tag .flight-icon { font-size: 1rem; }

/* ===== 分区 ===== */
.section-title { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }

/* ===== 详情页卡片 ===== */
.detail-card { background: #fff; border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.detail-card h1 { font-size: 1.4rem; color: #004d40; margin-bottom: 20px; text-align: center; }

/* ===== 路线展示 ===== */
.flight-route { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 24px; padding: 20px; background: linear-gradient(135deg, #e0f2f1, #f0f4f5); border-radius: 10px; }
.route-point { text-align: center; }
.route-point .point-code { font-size: 1.4rem; font-weight: 700; color: #004d40; }
.route-point .point-name { font-size: .82rem; color: #888; margin-top: 4px; }
.route-point .point-terminal { font-size: .78rem; color: #e65100; font-weight: 600; margin-top: 2px; background: #fff3e0; display: inline-block; padding: 1px 8px; border-radius: 4px; }
.route-point .point-time { font-size: 1.1rem; font-weight: 600; color: #333; margin-top: 4px; }
.route-line { flex: 1; display: flex; align-items: center; gap: 0; }
.route-line .line-bar { flex: 1; height: 2px; background: #80cbc4; }
.route-line .line-arrow { color: #00796b; font-size: 1.2rem; }
a.route-point { text-decoration: none; color: inherit; padding: 8px 16px; border-radius: 8px; transition: background .15s; }
a.route-point:hover { background: #f5f9ff; text-decoration: none; }

/* ===== 相关推荐 ===== */
.related-flights { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.related-flights h2 { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }
.related-tags { display: flex; flex-wrap: wrap; gap: 10px; }

/* ===== 友好链接 ===== */
.friend-links { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.friend-links h2 { font-size: 1.1rem; color: #004d40; margin-bottom: 16px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.links-grid a { display: block; padding: 10px 14px; background: #f5f7fa; border-radius: 8px; font-size: .85rem; color: #555; text-align: center; transition: all .15s; text-decoration: none; }
.links-grid a:hover { background: #e0f2f1; color: #004d40; text-decoration: none; }

/* ===== 免责声明 ===== */
.disclaimer { background: #fff; border-radius: 12px; padding: 20px 28px; margin-bottom: 20px; font-size: .82rem; color: #999; line-height: 1.8; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.disclaimer strong { color: #666; }

/* ===== 页脚 ===== */
.site-footer { background: #1a2332; color: rgba(255,255,255,.6); padding: 24px 20px; margin-top: 30px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; font-size: .82rem; line-height: 2; }
.footer-links { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,.7); margin: 0 8px; font-size: .82rem; }
.footer-links a:hover { color: #fff; }

/* ===== 回到顶部 ===== */
.back-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: #00796b; color: #fff; border: none; border-radius: 50%; font-size: 1.2rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); display: none; z-index: 99; transition: opacity .2s; }
.back-top.show { display: flex; align-items: center; justify-content: center; }

/* ===== 骨架屏 ===== */
.detail-loading { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; }
.skel { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, #e8ecf0 25%, #f5f7fa 50%, #e8ecf0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel-row { display: flex; gap: 12px; }
.skel-label { width: 80px; }
.skel-value { flex: 1; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 聚合页信息区 ===== */
.aggregate-card { background: #fff; border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.airport-meta { background: #e0f2f1; border-radius: 8px; padding: 16px 20px; margin: 16px 0 24px; }
.airport-meta p { margin: 6px 0; color: #333; font-size: .92rem; }
.section-h2 { font-size: 1.15rem; color: #004d40; margin: 28px 0 12px; padding-left: 10px; border-left: 4px solid #00796b; }

/* ===== 城市详情页 ===== */
.city-header { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.city-header h1 { font-size: 1.4rem; color: #004d40; text-align: center; margin: 0; }
.city-routes { background: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.route-row { display: flex; align-items: flex-start; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f5f5f5; }
.route-row:last-child { border-bottom: none; margin-bottom: 0; }
.route-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; background: #e0f2f1; color: #004d40; font-weight: 700; font-size: .9rem; border-radius: 6px; margin-right: 12px; flex-shrink: 0; }
.route-cities { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.route-city { display: inline-block; padding: 4px 14px; background: #f5f7fa; border: 1px solid #e8ecf0; border-radius: 20px; font-size: .85rem; color: #555; text-decoration: none; transition: all .15s; }
.route-city:hover { background: #e0f2f1; color: #004d40; border-color: #80cbc4; text-decoration: none; }

/* ===== 搜索结果表格 ===== */
.results-table-wrapper { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.results-table th { background: linear-gradient(180deg,#e0f2f1 0%,#b2dfdb 100%); color: #004d40; padding: 10px 12px; text-align: left; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.results-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: #444; }
.results-table tr:hover td { background: #f5fdfc; }
.results-table a { color: #00796b; text-decoration: none; }
.results-table a:hover { text-decoration: underline; }
.loading-cell, .empty-cell { text-align: center; padding: 30px; color: #999; }
.stops-table td:first-child, .stops-table td:nth-child(4) { text-align: center; }
.stops-table .time-cell { font-family: 'Consolas','Monaco',monospace; }
.empty-state { text-align: center; padding: 20px; color: #999; font-size: .9rem; }

/* ===== 汇总卡片链接 ===== */
.summary-card {
  background: linear-gradient(135deg,#f5fdfc 0%,#e0f2f1 100%);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 18px 0;
  border: 1px solid #b2dfdb;
  font-size: .9rem;
  color: #333;
}
.summary-link {
  display: inline-block;
  padding: 2px 10px;
  background: #fff;
  border: 1px solid #b2dfdb;
  border-radius: 14px;
  margin: 3px 5px 3px 0;
  color: #00796b;
  font-size: .85rem;
  text-decoration: none;
  transition: all .15s;
  line-height: 1.6;
}
.summary-link:hover {
  background: #00796b;
  color: #fff;
  border-color: #00796b;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,121,107,.3);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .main-content { padding: 12px; }
  .intro-card, .query-box, .city-index, .hot-flights, .detail-card, .related-flights, .friend-links, .disclaimer { padding: 16px 18px; border-radius: 8px; }
  .flight-route { flex-direction: column; gap: 12px; padding: 16px; }
  .route-line { flex-direction: column; width: 2px; }
  .route-line .line-bar { width: 2px; height: 20px; }
  .flight-info-table th { width: 80px; padding: 8px 10px; font-size: .8rem; }
  .flight-info-table td { padding: 8px 10px; font-size: .85rem; }
  .results-table { font-size: .78rem; }
  .results-table th, .results-table td { padding: 8px 6px; }
  .route-row { flex-wrap: wrap; }
  .route-letter { margin-bottom: 4px; }
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .summary-card { padding: 14px 16px; }
  .summary-link { font-size: .8rem; padding: 1px 8px; }
}

/* ===== 搜索结果卡片 ===== */
.search-results-card { background: #fff; border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); text-align: center; }
.search-results-card h1 { font-size: 1.5rem; color: #004d40; margin-bottom: 10px; }
.search-summary { margin: 0; color: #666; font-size: .92rem; }
.search-summary strong { color: #e53935; font-size: 1.2rem; }

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}
.pagination .page-info {
    color: #666;
    font-size: 14px;
    margin-right: 12px;
}
.pagination .page-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
}
.pagination .page-btn:hover {
    border-color: #00796b;
    color: #00796b;
}
.pagination .page-btn.current {
    background: #00796b;
    color: #fff;
    border-color: #00796b;
    cursor: default;
}
