:root {
  --bg: #0b0d10;
  --panel: #14181d;
  --panel-2: #1b2027;
  --line: #262d36;
  --txt: #e9edf2;
  --muted: #98a2b1;
  --accent: #ff4d6d;
  --accent-2: #38d39f;
  --warn: #f0b429;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 15% -10%, #1a2330 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-bottom: 40px;
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px 12px; position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(11,13,16,.96) 70%, rgba(11,13,16,.6));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px rgba(255,77,109,.15);
}
.top h1 { font-size: 17px; margin: 0; letter-spacing: -.2px; }
.sub { margin: 0; font-size: 12px; color: var(--muted); }
.runinfo { font-size: 12px; color: var(--muted); text-align: right; }

main { padding: 14px 16px 0; max-width: 980px; margin: 0 auto; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.stat b { display: block; font-size: 20px; letter-spacing: -.5px; }
.stat span { font-size: 11px; color: var(--muted); }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
}
.chip.ok { color: var(--accent-2); border-color: rgba(56,211,159,.35); background: rgba(56,211,159,.08); }
.chip.bad { color: var(--warn); border-color: rgba(240,180,41,.35); background: rgba(240,180,41,.08); }

.card {
  position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 12px;
}
.rank {
  position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(255,77,109,.35);
}
.thumb {
  position: relative; width: 112px; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden;
  background: var(--panel-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play {
  position: absolute; inset: auto 6px 6px auto; background: rgba(0,0,0,.55);
  border-radius: 999px; padding: 2px 8px; font-size: 11px;
}
.body { min-width: 0; }
.card h3 { font-size: 15px; margin: 2px 0 6px; line-height: 1.35; }
.meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.meta .k { background: var(--panel-2); border-radius: 6px; padding: 2px 6px; }
.meta .k b { color: var(--txt); font-weight: 600; }
.meta .k.em { color: var(--accent-2); }

.hooks { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.hooks-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.hook-list { margin: 0; padding-left: 18px; font-size: 13px; }
.hook-list li { padding: 3px 0; cursor: pointer; }
.hook-list li:active { opacity: .6; }

.price { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.price b { color: var(--txt); }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a {
  font-size: 12px; text-decoration: none; color: var(--txt);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; background: var(--panel-2);
}
.links a.primary { border-color: rgba(255,77,109,.5); color: #ffd7de; background: rgba(255,77,109,.12); }

.empty {
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--muted); font-size: 13px; margin-bottom: 16px;
}
.empty h2 { color: var(--txt); font-size: 15px; margin: 0 0 6px; }
.empty code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; color: var(--txt); }

.history h2 { font-size: 14px; color: var(--muted); font-weight: 500; margin: 18px 0 8px; }
.history ul { list-style: none; margin: 0; padding: 0; }
.history li {
  display: flex; justify-content: space-between; padding: 9px 12px; font-size: 13px;
  border-bottom: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.history li b { color: var(--txt); font-weight: 500; }

.foot { margin-top: 22px; font-size: 11px; color: #6b7686; line-height: 1.6; }
.foot .warn { color: #8a6d3b; }

@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .card { grid-template-columns: 96px 1fr; }
  .thumb { width: 96px; }
}
