/* IPTV 管家官网 —— 零构建单文件样式，浅色为主、深色 Hero */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(31, 41, 55, .08);
  --dark-bg: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  --dark-text: #e2e8f0;
  --dark-muted: #94a3b8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── 顶部导航 ───────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 26px; height: 26px; display: block; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 14.5px; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-links .btn { color: #fff; }

/* ── Hero ──────────────────────── */
.hero {
  background: var(--dark-bg);
  color: var(--dark-text);
  padding: 88px 0 96px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; letter-spacing: .5px; margin-bottom: 18px;
}
.hero p {
  color: var(--dark-muted); font-size: clamp(15px, 2.2vw, 18px);
  max-width: 680px; margin: 0 auto 34px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--dark-text);
  border-color: rgba(226, 232, 240, .45);
}
.btn-ghost:hover { border-color: #fff; text-decoration: none; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { text-decoration: none; filter: brightness(.95); }

/* ── 通用区块 ───────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 750; }
.section-head p { color: var(--text-muted); margin-top: 10px; font-size: 15.5px; }

/* ── 功能卡片 ───────────────────── */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: transform .15s, box-shadow .15s;
}
.section-alt .feature { background: var(--bg); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.feature h3 { font-size: 16.5px; margin-bottom: 7px; }
.feature p { font-size: 14px; color: var(--text-muted); }

/* ── 工具卡片 ───────────────────── */
.tool-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; text-align: center;
}
.tool-card .icon { font-size: 38px; margin-bottom: 14px; }
.tool-card h3 { font-size: 18px; margin-bottom: 8px; }
.tool-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }

/* ── 下载列表 ───────────────────── */
.rel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 16px;
}
.rel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.rel-title { font-size: 17px; font-weight: 700; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px;
  background: #dcfce7; color: #166534; margin-left: 8px;
  vertical-align: middle;
}
.badge-force { background: #fee2e2; color: #991b1b; }
.rel-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.rel-changelog {
  font-size: 14px; white-space: pre-wrap; word-break: break-word;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 12px 14px; margin: 10px 0 14px;
  max-height: 200px; overflow: auto;
}
.rel-sha {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--text-muted); word-break: break-all;
  margin-bottom: 14px;
}
.rel .btn { padding: 8px 20px; font-size: 14px; }
.empty {
  text-align: center; color: var(--text-muted);
  padding: 48px 20px; border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ── 关于我们 ───────────────────── */
.about { max-width: 780px; margin: 0 auto; }
.about p { color: var(--text-muted); font-size: 15px; margin-bottom: 14px; }

/* ── 页脚 ──────────────────────── */
.footer {
  background: #0f172a; color: var(--dark-muted);
  text-align: center; padding: 30px 20px; font-size: 13.5px;
}
.footer a { color: var(--dark-muted); }

/* ── 工具页 ────────────────────── */
.tool-wrap { max-width: 960px; margin: 30px auto 60px; padding: 0 20px; }
.tool-card-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px;
}
.tool-card-box h1 { font-size: 22px; margin-bottom: 6px; }
.tool-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }
.drop-area {
  border: 2px dashed var(--primary); padding: 34px 18px;
  text-align: center; border-radius: 11px; margin-bottom: 18px;
  cursor: pointer; background: var(--primary-soft);
  transition: background .15s;
}
.drop-area:hover, .drop-area.dragover { background: #dbeafe; }
.drop-area p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
#fileInput { display: none; }
textarea {
  width: 100%; min-height: 260px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; resize: vertical; margin-top: 14px;
}
textarea:focus, input:focus { outline: 2px solid rgba(37, 99, 235, .25); border-color: var(--primary); }
.tool-actions { text-align: center; margin: 16px 0 4px; }
.tool-actions .btn { margin: 4px 6px; }
.btn-secondary { background: #0f766e; color: #fff; }
.btn-secondary:hover { background: #0d5d56; text-decoration: none; }
.tip { color: var(--text-muted); font-size: 12.5px; margin-top: 10px; }
.stat { font-size: 13.5px; color: var(--primary-dark); margin-top: 10px; font-weight: 600; }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; }

@media (max-width: 600px) {
  .hero { padding: 60px 0 66px; }
  .section { padding: 52px 0; }
  .nav-links { gap: 14px; }
}
