:root {
  --bg: #121214;
  --card: #1b1b1f;
  --card-subtle: #24242a;
  --ink: #ededf0;
  --muted: #9a9aa2;
  --line: #2c2c32;
  --accent: #e9b04f;
  --accent-soft: rgba(233, 176, 79, 0.12);
  --accent-border: #b7791f;
  --good: #5cc28a;
  --star: #b48cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

h1 {
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 26px 0 10px;
}

.muted {
  color: var(--muted);
}

.badge-live {
  font-size: 13px;
  background: rgba(92, 219, 149, 0.15);
  color: var(--good);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Connect Replay Folder Banner */
.folder-banner {
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.18) 0%, rgba(27, 27, 31, 0.95) 100%);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-primary {
  background: var(--accent-border);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.15s, transform 0.1s;
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--line);
  color: var(--ink);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #3a3a42;
}

/* Stat Tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.tile .v {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tile.main {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.tile.main .v {
  font-size: 42px;
  color: var(--accent);
}

.tile .l {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

td.n {
  text-align: right;
  font-weight: 700;
  color: var(--accent);
}

td.nw {
  white-space: nowrap;
}

.star {
  color: var(--star);
  font-weight: 600;
}

/* 30-Day Activity Chart */
.chart-container {
  overflow: visible;
}

.bars {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 140px;
  padding-top: 28px;
}

.col {
  flex: 1;
  min-width: 6px;
  display: flex;
  align-items: flex-end;
  position: relative;
  cursor: default;
}

.bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: filter 0.12s;
}

.bar.zero {
  background: var(--line);
  height: 3px !important;
}

.col:hover .bar {
  filter: brightness(1.25);
}

.col:hover .bar.zero {
  background: var(--muted);
}

.tip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 10;
}

.col:nth-child(-n+3) .tip { left: 0; transform: none; }
.col:nth-last-child(-n+3) .tip { left: auto; right: 0; transform: none; }
.col:hover .tip { opacity: 1; }

.axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

/* Google AdSense Ready Slots */
.adsense-slot {
  margin: 18px 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.adsense-slot .ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 4px;
}

/* Footer */
footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
