/* ============================================================
   H2News 用户端样式（照 用户端.html 设计稿 + 手机响应式）
   主色：#1e88e5   背景：#f7f9fc
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'PingFang SC', 'Microsoft YaHei', sans-serif; background-color: #f7f9fc; color: #333; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶部导航 ---------- */
.header { background: #fff; padding: 15px 50px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 100px; width: auto; }
.logo-text { font-size: 24px; font-weight: bold; color: #1e88e5; }
.logo-sub { font-size: 12px; color: #888; margin-top: 5px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-select { border: 1px solid #ddd; border-radius: 4px; padding: 5px; }

/* ---------- Banner ---------- */
.banner { background: url('./background.webp') left top / cover no-repeat; padding: 100px 50px; display: flex; align-items: center; position: relative; overflow: hidden; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.72) 50%, rgba(255,255,255,0.18) 100%); z-index: 0; }
.banner-text { position: relative; z-index: 1; }
.banner h1 { font-size: 36px; color: #333; margin-bottom: 15px; }
.banner p { font-size: 16px; color: #555; line-height: 1.8; max-width: 600px; }

/* ---------- 统计卡片 ---------- */
.stats-container { max-width: 1200px; margin: -30px auto 30px; padding: 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; z-index: 10; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.stat-icon { font-size: 32px; color: #1e88e5; }
.stat-info h3 { font-size: 24px; color: #333; }
.stat-info p { font-size: 14px; color: #888; }

/* ---------- 主体 ---------- */
.main-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 320px 1fr; gap: 30px; padding: 20px; align-items: start; }
.panel-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; border-left: 4px solid #1e88e5; padding-left: 10px; }

/* 左侧日历 */
.left-panel { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-nav { border: none; background: #f0f6ff; color: #1e88e5; width: 28px; height: 28px; border-radius: 6px; font-size: 14px; }
.cal-nav:hover { background: #e0edff; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; margin-bottom: 20px; }
.calendar-day { position: relative; width: 35px; height: 35px; line-height: 35px; border-radius: 50%; font-size: 14px; color: #444; cursor: default; }
.calendar-day.weekday { color: #999; cursor: default; }
.calendar-day.has-report { cursor: pointer; font-weight: bold; }
.calendar-day.has-report::after { content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: #1e88e5; }
.calendar-day.has-report:hover { background: #f0f6ff; }
.calendar-day.active { background-color: #1e88e5; color: #fff; }
.calendar-day.active::after { background: #fff; }

.btn-primary { background: #fff; border: 1px solid #1e88e5; color: #1e88e5; padding: 10px; border-radius: 5px; cursor: pointer; width: 100%; margin-bottom: 20px; }
.btn-primary:hover { background: #f0f6ff; }
.tip-box { background: #f0f6ff; border-radius: 8px; padding: 15px; font-size: 13px; color: #555; line-height: 1.8; }

/* 右侧列表 */
.right-panel { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.right-panel-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; border-left: 4px solid #1e88e5; padding-left: 10px; }
.list-header { display: grid; grid-template-columns: 60px 100px 1fr 120px; padding: 10px; background: #f8f9fa; font-size: 14px; color: #888; font-weight: bold; }
.list-item { display: grid; grid-template-columns: 60px 100px 1fr 120px; padding: 15px 10px; border-bottom: 1px solid #eee; align-items: center; gap: 4px; }
.list-item:hover { background-color: #f9fbfd; }
.li-no { color: #1e88e5; font-weight: bold; }
.li-date { color: #666; font-size: 14px; }
.li-title { color: #333; font-size: 15px; }
.li-actions a { color: #1e88e5; margin-right: 15px; font-size: 14px; }
.li-actions a:hover { text-decoration: underline; }
.list-footer { background: #f0f6ff; padding: 10px; margin-top: 20px; border-radius: 5px; color: #1e88e5; font-size: 14px; }
.empty-state { text-align: center; color: #999; padding: 40px 0; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 50px; background: #fff; padding: 30px 50px; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.footer-left h3 { color: #1e88e5; margin-bottom: 10px; }
.footer-links a { margin-left: 20px; color: #666; }
.footer-copy { margin-top: 20px; color: #999; font-size: 12px; }

/* ---------- 阅读视图 ---------- */
.read-view { max-width: 900px; margin: 0 auto; padding: 20px; }
.back-button { border: 1px solid #ddd; background: #fff; color: #1e88e5; padding: 8px 16px; border-radius: 6px; margin-bottom: 20px; }
.back-button:hover { background: #f0f6ff; }
.read-header { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; }
.read-header h2 { font-size: 24px; color: #333; margin-bottom: 10px; }
.read-meta { font-size: 13px; color: #888; }
.report-article { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 14px; }
.report-article h3 { font-size: 17px; margin-bottom: 8px; }
.report-article h3 a { color: #333; }
.report-article h3 a:hover { color: #1e88e5; }
.article-meta { font-size: 13px; color: #888; margin-bottom: 8px; }
.article-meta .source { color: #1e88e5; }
.article-summary { font-size: 14px; color: #555; line-height: 1.7; }
.tag-list { margin-top: 8px; }
.tag { display: inline-block; background: #e6f2ff; color: #1e88e5; border-radius: 12px; padding: 2px 10px; font-size: 12px; margin-right: 6px; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 20px; border-radius: 6px; font-size: 14px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.toast.show { opacity: 1; }

/* ============================================================
   手机 / 平板响应式
   ============================================================ */
@media (max-width: 900px) {
    .header { padding: 12px 20px; }
    .banner { padding: 28px 20px;background-position: right top; }
    .banner h1 { font-size: 26px; }
    .banner p { font-size: 14px; }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
    .main-content { grid-template-columns: 1fr; }
    /* 手机上：列表优先显示在日历上面 */
    .main-content .right-panel { order: 1; }
    .main-content .left-panel { order: 2; }
    .footer { padding: 24px 20px; }
}

@media (max-width: 560px) {
    .logo-area img { height: 32px; }
    .logo-text { font-size: 20px; }
    .banner { padding: 32px 20px; }
    .stats-container { padding: 0 12px; gap: 12px; margin-top: -20px; }
    .stat-card { padding: 14px; }
    .stat-icon { font-size: 26px; }
    .stat-info h3 { font-size: 20px; }
    .main-content { padding: 12px; gap: 16px; }
    /* 列表项变卡片式：期数+日期一行，标题一行，操作一行 */
    .list-header { display: none; }
    .list-item { grid-template-columns: 1fr auto; grid-template-areas: "no date" "title title" "actions actions"; padding: 12px; gap: 6px; }
    .li-no { grid-area: no; }
    .li-date { grid-area: date; }
    .li-title { grid-area: title; }
    .li-actions { grid-area: actions; }
    .footer { flex-direction: column; gap: 16px; text-align: center; }
    .footer-links a { margin: 0 10px; }
}
