/* Tennessee Cash — tc-styles.css */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --card: #22222f;
  --border: #2e2e40;
  --gold: #f5c518;
  --gold-dim: #c9a010;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
  --text: #e8e8f0;
  --muted: #888899;
  --radius: 12px;
  --accent: #f5c518;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── BACK LINK ── */
.tc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.2s;
}
.tc-back:hover { color: var(--gold); }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── HEADER ── */
header {
  background: linear-gradient(135deg, #13131c 0%, #1e1e2e 100%);
  border-bottom: 1px solid var(--border);
  padding: 22px 24px 18px;
}
.site-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
h1 { font-size: clamp(20px, 4vw, 30px); font-weight: 700; }
h1 span { color: var(--gold); }
.game-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }

main { max-width: 860px; margin: 0 auto; padding: 28px 20px; }

/* ── PLAY TAB ── */
.jackpot-banner {
  background: linear-gradient(135deg, #2a2200, #1e1800);
  border: 1px solid #4a3800;
  border-radius: var(--radius);
  padding: 18px 22px;
  text-align: center;
  margin-bottom: 22px;
}
.jackpot-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-dim); }
.jackpot-amount { font-size: clamp(28px, 6vw, 48px); font-weight: 700; color: var(--gold); line-height: 1.1; }

.game-info-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.info-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--muted);
}
.info-pill strong { color: var(--text); }

.play-area {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.play-area h2 { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--gold); }

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.num-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.num-btn:hover { border-color: var(--gold); color: var(--gold); }
.num-btn.selected { background: var(--gold); border-color: var(--gold); color: #000; }
.num-btn.disabled { opacity: .35; cursor: not-allowed; }

.cash-ball-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.cash-ball-section h3 { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.cash-ball-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid #5c2d2d;
  background: #2a1515;
  color: #f87171;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.cb-btn:hover { border-color: #f87171; background: #3a1a1a; }
.cb-btn.selected { background: #f87171; border-color: #f87171; color: #000; }

.selected-display {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sel-ball {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sel-ball.cash { background: #f87171; }
.sel-placeholder { color: var(--muted); font-size: 13px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--gold-dim); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s;
}
.btn-secondary:hover { border-color: var(--gold); }

/* Result */
.result-box {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 16px;
  display: none;
  text-align: center;
}
.result-box.show { display: block; }
.result-box.win { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3); }
.result-box.lose { background: rgba(248,113,113,.06); border: 1px solid rgba(248,113,113,.2); }
.result-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.result-numbers { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.result-ball {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.result-ball.match { background: var(--gold); border-color: var(--gold); color: #000; }
.result-ball.cash-result { background: #1a0a0a; border-color: #f87171; color: #f87171; }
.result-ball.cash-result.match { background: #f87171; color: #000; }

/* ── FREQUENCY TAB ── */
.freq-bar-list { display: flex; flex-direction: column; gap: 8px; }
.freq-bar-item { display: flex; align-items: center; gap: 10px; }
.freq-num { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.freq-bar-wrap { flex: 1; background: var(--surface); border-radius: 4px; height: 8px; overflow: hidden; }
.freq-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; transition: width 1s ease; }
.freq-count { font-size: 12px; color: var(--muted); width: 32px; text-align: right; flex-shrink: 0; }

.freq-section-title { font-size: 14px; font-weight: 700; color: var(--gold); margin: 20px 0 12px; }

/* ── HISTORY TAB ── */
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); font-size: 12px; letter-spacing: .5px; }
.history-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--surface); }
.draw-balls { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.draw-ball { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.draw-ball.cb { background: #1a0a0a; border-color: #f87171; color: #f87171; }

/* ── STATS TAB ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--gold); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── AD SYSTEM ── */
.ad-slot { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; position: relative; }
.ad-slot::after { content: 'Advertisement'; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 2px; color: var(--border); }
.ad-leaderboard { width: 100%; height: 90px; margin-bottom: 24px; }
.ad-rectangle { width: 100%; height: 250px; margin: 24px 0; }
.ad-inline { width: 100%; height: 90px; margin: 16px 0; }

footer { text-align: center; padding: 28px 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); margin-top: 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold); }

@media (max-width: 600px) {
  .number-grid { grid-template-columns: repeat(7, 1fr); }
  .game-info-bar { gap: 8px; }
}
