/* 排片雷达 — 深色主题，移动端优先 */
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2430;
  --border: #2d3540;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #2dd4bf;
  --accent-dim: #0f766e;
  --new: #fbbf24;
  --ok: #4ade80;
  --bad: #f87171;
  --grey: #6b7280;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }

/* ---- 顶栏 ---- */
.nav {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav .brand { font-weight: 700; font-size: 17px; margin-right: auto; }
.nav a {
  padding: 6px 12px; border-radius: 8px; color: var(--muted);
}
.nav a.active { background: var(--panel-2); color: var(--text); }

/* ---- 容器 ---- */
.wrap { max-width: 860px; margin: 0 auto; padding: 16px 14px 60px; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.card h2 { font-size: 16px; margin-bottom: 12px; }
.card h2 .sub { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---- 表单 ---- */
input, select, button {
  font: inherit; color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
}
input:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--muted); }
/* 勾选框放大，手机上好点按 */
input[type="checkbox"] {
  width: 20px; height: 20px; flex: none;
  accent-color: var(--accent); cursor: pointer;
}
button {
  cursor: pointer; background: var(--accent-dim); border-color: var(--accent);
  font-weight: 600;
}
button:hover { filter: brightness(1.15); }
button.ghost { background: transparent; border-color: var(--border); color: var(--muted); font-weight: 400; }
button.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row + .row { margin-top: 8px; }
.grow { flex: 1; min-width: 120px; }
.hint { color: var(--muted); font-size: 13px; }

/* ---- 标签 ---- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; font-size: 13px; margin: 2px;
}
.chip .x { cursor: pointer; color: var(--muted); font-weight: 700; }
.chip .x:hover { color: var(--bad); }
.badge {
  display: inline-block; border-radius: 999px; padding: 1px 8px;
  font-size: 12px; font-weight: 600;
}
.badge.new { background: rgba(251,191,36,.15); color: var(--new); }
.badge.ok { background: rgba(74,222,128,.15); color: var(--ok); }
.badge.bad { background: rgba(248,113,113,.15); color: var(--bad); }
.badge.grey { background: rgba(107,114,128,.2); color: var(--grey); }
.badge.accent { background: rgba(45,212,191,.15); color: var(--accent); }

/* ---- 影院列表项 ---- */
.cinema-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; background: var(--panel-2); cursor: pointer;
}
.cinema-item:hover { border-color: var(--accent); }
.cinema-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.new { background: var(--new); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.grey { background: var(--grey); }
.cinema-item .info { flex: 1; min-width: 0; }
.cinema-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cinema-item .meta { color: var(--muted); font-size: 12.5px; }

/* ---- 地图页 ---- */
.map-wrap { position: relative; }
#map { width: 100%; height: 62vh; min-height: 320px; background: #0a0e14; }
.map-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px; color: var(--muted); font-size: 13px;
}
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.map-list { padding: 0 14px; }

/* ---- 场次表 ---- */
table.shows { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.shows th, table.shows td {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border);
}
table.shows th { color: var(--muted); font-weight: 500; }
.tag-new { color: var(--new); font-weight: 700; }
.tag-ok { color: var(--ok); }
.tag-bad { color: var(--bad); }

/* ---- 时段编辑 ---- */
.sched-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.sched-row input[type="time"] { padding: 7px 10px; }
.sched-row .int { width: 90px; }

/* ---- 登录 ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .hint { margin-bottom: 18px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card button { width: 100%; }

/* ---- Toast ---- */
#toasts {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px; max-width: 92vw;
  box-shadow: 0 6px 20px rgba(0,0,0,.5); animation: fadein .2s;
}
.toast.err { border-color: var(--bad); color: var(--bad); }
.toast.ok { border-color: var(--accent); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }

/* ---- 搜索下拉结果 ---- */
.search-result {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 6px; background: var(--panel-2);
}
.search-result .addr { color: var(--muted); font-size: 12.5px; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--muted); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .nav a { padding: 6px 8px; font-size: 14px; }
  #map { height: 48vh; }
}
