/* 竞彩公众号助手 — 球场墨绿 + 竞彩红强调 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap");

:root {
  --bg: #0f1f17;
  --bg-soft: #162820;
  --panel: #1c3228;
  --panel-2: #243c31;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8f0ea;
  --muted: #8aa396;
  --green: #1a5c3a;
  --green-bright: #2d8a56;
  --red: #c0392b;
  --red-hot: #e74c3c;
  --amber: #d4a017;
  --paper: #f4f1ea;
  --paper-ink: #1a1a1a;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(192, 57, 43, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(45, 138, 86, 0.22), transparent 50%),
    linear-gradient(180deg, #0c1812 0%, var(--bg) 40%, #12241b 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ----- 侧栏 ----- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  background: linear-gradient(180deg, rgba(22, 40, 32, 0.96), rgba(15, 31, 23, 0.98));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  padding: 4px 8px 8px;
  animation: brandIn 0.6s ease both;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), #8b2218);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.35);
}
.brand h1 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.brand p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s, transform .2s;
}
.nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav a.active {
  background: linear-gradient(90deg, rgba(192,57,43,.22), rgba(26,92,58,.18));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--red);
}
.nav .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .55;
}
.nav a.active .dot { background: var(--red-hot); opacity: 1; box-shadow: 0 0 8px var(--red-hot); }

.side-foot {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.side-foot strong { color: var(--amber); font-weight: 700; }

/* ----- 主区 ----- */
.main {
  padding: 28px 32px 48px;
  max-width: none;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}
.main.desk {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  animation: fadeUp .5s ease both;
  flex: 0 0 auto;
}
.status-bar .title-block h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.status-bar .title-block p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.on { color: #b8f0cd; border-color: rgba(45,138,86,.45); background: rgba(45,138,86,.15); }
.pill.warn { color: #ffd6a8; border-color: rgba(212,160,23,.4); background: rgba(212,160,23,.12); }
.pill.bad { color: #ffb4ab; border-color: rgba(192,57,43,.45); background: rgba(192,57,43,.15); }
.pill .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-bright);
  animation: breathe 1.8s ease-in-out infinite;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(280px, 360px) minmax(340px, 1fr);
  gap: 14px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.panel {
  background: linear-gradient(180deg, rgba(36,60,49,.92), rgba(28,50,40,.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  animation: fadeUp .55s ease both;
}
.panel.col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel:nth-child(2) { animation-delay: .06s; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.panel-head h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.panel-head h3::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--red);
}
.panel-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hint { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 8px; }

/* ----- 按钮 ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px;
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .2s, box-shadow .2s;
  background: linear-gradient(135deg, var(--red-hot), var(--red));
  color: #fff;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.28);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: none;
}
.btn.green {
  background: linear-gradient(135deg, var(--green-bright), var(--green));
  box-shadow: 0 6px 16px rgba(26, 92, 58, 0.3);
}
.btn.block { width: 100%; }
.btn.lg { padding: 14px 20px; font-size: 15px; }

/* ----- 赛事列表 ----- */
.match-tools {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.match-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-right: 4px;
}
.match-list::-webkit-scrollbar { width: 6px; }
.match-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.match-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.18);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.match-row:hover { background: rgba(255,255,255,.04); }
.match-row.checked {
  border-color: rgba(192,57,43,.55);
  background: linear-gradient(90deg, rgba(192,57,43,.12), rgba(26,92,58,.08));
}
.match-row input { accent-color: var(--red); width: 16px; height: 16px; }
.match-meta { min-width: 0; }
.match-meta .vs {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-meta .sub {
  margin-top: 3px;
  font-size: 11px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(255,255,255,.06);
}
.tag.fb { color: #9fd4b5; }
.tag.bb { color: #f0c27a; }
.tag.hot { color: #ffb4ab; background: rgba(192,57,43,.18); }
.match-odds {
  font-size: 11px; color: var(--muted);
  text-align: right; line-height: 1.45;
  white-space: nowrap;
}

.cta-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.progress {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
}
.progress.show { display: block; animation: fadeUp .3s ease; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; }
.step {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.step.active { color: #fff; background: rgba(192,57,43,.35); }
.step.done { color: #b8f0cd; background: rgba(45,138,86,.22); }

.msg {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; display: none;
}
.msg.ok { display: block; background: rgba(45,138,86,.18); color: #b8f0cd; }
.msg.err { display: block; background: rgba(192,57,43,.18); color: #ffb4ab; }

/* ----- 预览 / 编辑 ----- */
.phone-wrap {
  display: flex; justify-content: center;
  flex: 1;
  min-height: 0;
}
.phone {
  width: 100%;
  max-width: none;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 22px;
  padding: 10px 8px 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45), inset 0 0 0 2px #2a2a2a;
  position: relative;
  animation: phoneIn .55s ease both;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.phone::before {
  content: "";
  display: block;
  width: 96px; height: 6px;
  border-radius: 6px;
  background: #2a2a2a;
  margin: 2px auto 12px;
}
.phone-screen {
  background: #fff;
  border-radius: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px 16px;
  font-size: 14px;
  line-height: 1.7;
}
.phone-screen img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
.phone-screen .empty {
  color: #999; text-align: center; padding: 48px 12px; font-size: 13px;
}
.edit-fields {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; min-height: 0; overflow: hidden;
  padding-right: 2px;
}
.edit-fields > .field { flex: 0 0 auto; }
.edit-fields > .field-grow { flex: 1 1 auto; min-height: 0; }
.edit-fields .field label { margin-bottom: 3px; }
.edit-fields .field input { padding: 6px 10px; }
.field-grow { min-height: 0; display: flex; flex-direction: column; }
.field-grow textarea { flex: 1; min-height: 0; height: 100%; resize: none; }
.hl-fold { font-size: 12px; color: var(--muted); }
.hl-fold summary { cursor: pointer; margin-bottom: 6px; }
.hl-box {
  max-height: 140px; overflow: auto;
  background: #fff; color: #222; border-radius: 10px; padding: 10px; font-size: 13px; line-height: 1.6;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(192,57,43,.65);
}
.field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
}
.field textarea.body-area { min-height: 220px; }

.hl-banned { background: #ffb4ab; color: #5c1210; padding: 0 2px; border-radius: 3px; }
.hl-warn { background: #ffe08a; color: #5c4500; padding: 0 2px; border-radius: 3px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
}

/* ----- 设置 / 历史 ----- */
.settings-stack { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.fold {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(36,60,49,.92), rgba(28,50,40,.96));
  overflow: hidden;
  box-shadow: var(--shadow);
}
.fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 18px;
}
.fold[open] > summary::after { content: "−"; color: var(--red-hot); }
.fold .fold-body { padding: 0 18px 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.row > .field { flex: 1 1 220px; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #3a4a42; border-radius: 24px; transition: .3s;
}
.slider:before {
  content: ""; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider:before { transform: translateX(20px); }

.history-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.history-item {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(36,60,49,.92), rgba(28,50,40,.96));
  border: 1px solid var(--line);
  transition: border-color .2s, transform .15s;
}
.history-item:hover {
  border-color: rgba(192,57,43,.4);
  transform: translateY(-1px);
}
.history-item h4 { font-size: 15px; margin-bottom: 4px; }
.history-item .meta { font-size: 12px; color: var(--muted); }

/* ----- 动画 ----- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes brandIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes phoneIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes breathe {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ----- 大乐透 ----- */
.dlt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px 18px;
}
.dlt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}
.dlt-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.dlt-controls input[type="number"] {
  width: 72px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}
.dlt-controls .check { cursor: pointer; }
.dlt-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}
.dlt-panel { padding: 18px; min-height: 280px; }
.dlt-ticket {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  animation: brandIn .45s ease both;
}
.dlt-ticket:last-child { border-bottom: 0; }
.dlt-ticket header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dlt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dlt-plus {
  color: var(--muted);
  font-weight: 700;
  margin: 0 4px;
}
.dlt-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.dlt-ball.front {
  background: linear-gradient(145deg, #e74c3c, #9b2c20);
  color: #fff;
}
.dlt-ball.back {
  background: linear-gradient(145deg, #3d8bfd, #1d4ed8);
  color: #fff;
}
.dlt-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.dlt-stats strong { color: var(--text); font-weight: 700; }
.dlt-disclaimer {
  margin-top: 16px;
  font-size: 12px;
  color: var(--amber);
  line-height: 1.6;
}
.dlt-latest .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.dlt-record {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.dlt-record:last-child { border-bottom: 0; }
.dlt-record > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.dlt-record .meta { font-size: 12px; color: var(--muted); }
.dlt-record-actions { display: flex; align-items: center; gap: 8px; }
.dlt-record-draw { margin-bottom: 10px; }
.dlt-record-tickets { display: flex; flex-direction: column; gap: 8px; }
.dlt-record-ticket {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ----- 响应式 ----- */
@media (max-width: 1180px) {
  .work-grid { grid-template-columns: minmax(240px, 300px) 1fr; }
  .col-preview { grid-column: 1 / -1; height: 360px; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative; height: auto;
    flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 12px;
    padding: 16px;
  }
  .brand { flex: 1 1 auto; }
  .brand p, .side-foot { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .app { height: auto; overflow: visible; }
  .main { padding: 18px 14px 40px; height: auto; overflow: visible; }
  .main.desk { overflow: visible; height: auto; }
  .work-grid { grid-template-columns: 1fr; height: auto; }
  .panel.col { min-height: 420px; }
  .col-preview { height: 480px; }
  .status-bar .title-block h2 { font-size: 22px; }
  .dlt-grid { grid-template-columns: 1fr; }
}
