/* discover.jamagi.live — 자막이 브랜드 다크 테마 */
:root {
  --bg: #020a04;
  --bg-raise: #07160d;
  --bg-card: #0a1c11;
  --line: #16341f;
  --line-soft: #102818;
  --text: #e8f6ec;
  --text-dim: #8fb39c;
  --text-mute: #5d7d68;

  --mint: #2fe6a8;
  --neon: #7bff7a;
  --grad: linear-gradient(100deg, #2fe6a8 0%, #59f39a 45%, #9bff6e 100%);

  --yt: #ff4b4b;
  --tw: #a970ff;
  --kk: #53fc18;
  --cz: #00ffa3;
  --sp: #3fa9ff;

  --r: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -180px, rgba(47, 230, 168, 0.13), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; padding: 10px 14px;
  background: var(--mint); color: #04180e; border-radius: 0 0 10px 0; z-index: 50;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(2, 10, 4, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark { align-self: center; border-radius: 8px; }
.wordmark {
  font-size: 25px; font-weight: 800; letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-mute);
}

.btn-primary {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--grad); color: #04180e;
  font-weight: 700; font-size: 14px; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(47, 230, 168, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(47, 230, 168, 0.34); }

/* ------------------------------------------------------------------ hero -- */
.hero { padding: 52px 0 30px; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(25px, 4.2vw, 42px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.25;
}
.hero-brand { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0; color: var(--text-dim); max-width: 62ch; font-size: 15.5px; }
.updated { margin: 14px 0 0; font-size: 13px; color: var(--text-mute); min-height: 20px; }
.updated .dot { color: var(--mint); }

/* ------------------------------------------------------------------ tabs -- */
.tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.tab {
  flex: 1 1 260px; text-align: left; cursor: pointer;
  padding: 14px 18px; border-radius: var(--r);
  background: var(--bg-raise); border: 1px solid var(--line-soft); color: var(--text-dim);
  font-family: inherit; font-size: 15px; transition: all 0.16s ease;
}
.tab:hover { border-color: var(--line); color: var(--text); }
.tab.is-active {
  color: #04180e; background: var(--grad); border-color: transparent; font-weight: 700;
  box-shadow: 0 6px 24px rgba(47, 230, 168, 0.2);
}
.tab-title { display: block; font-weight: 700; }
.tab-meta { display: block; font-size: 12.5px; opacity: 0.8; margin-top: 2px; }

/* --------------------------------------------------------------- filters -- */
.filters {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px; margin-bottom: 16px;
  background: var(--bg-raise); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label { font-size: 12.5px; font-weight: 600; color: var(--text-mute); min-width: 74px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 13px; border-radius: 999px;
  background: #0c2013; border: 1px solid var(--line); color: var(--text-dim);
  font-family: inherit; font-size: 13.5px; transition: all 0.14s ease;
}
.chip:hover { color: var(--text); border-color: var(--mint); }
.chip.is-on { background: var(--grad); color: #04180e; border-color: transparent; font-weight: 700; }
.chip.is-disabled { opacity: 0.45; cursor: not-allowed; }
.chip.is-disabled:hover { color: var(--text-dim); border-color: var(--line); }
.chip .soon {
  margin-left: 2px; padding: 1px 6px; border-radius: 999px;
  background: #16341f; color: var(--text-mute); font-size: 10.5px; font-weight: 600;
}
.chip.is-on .pi { filter: none; }

.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); cursor: pointer; }
.toggle input { accent-color: var(--mint); width: 16px; height: 16px; }

.pi { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.pi-youtube { background: var(--yt); }
.pi-twitch { background: var(--tw); }
.pi-kick { background: var(--kk); }
.pi-chzzk { background: var(--cz); }
.pi-soop { background: var(--sp); }

.hint { margin: 0 0 14px; font-size: 13px; color: var(--text-mute); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-mute); }

/* ----------------------------------------------------------------- cards -- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  padding-bottom: 40px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r);
  overflow: hidden; transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: var(--shadow); }

.thumb { position: relative; aspect-ratio: 16 / 9; background: #06130b; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-badges { position: absolute; inset: auto 8px 8px 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.live {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(2, 10, 4, 0.82); color: #ff5b5b;
  font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
}
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ff5b5b; }
.viewers {
  background: rgba(2, 10, 4, 0.82); color: var(--text);
  font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px;
}

.card-body { padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-top { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-mute); }
.platform { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.platform.youtube { color: var(--yt); }
.platform.twitch { color: var(--tw); }
.platform.kick { color: var(--kk); }
.platform.chzzk { color: var(--cz); }
.platform.soop { color: var(--sp); }
.cat { padding: 2px 7px; border-radius: 5px; background: #0d2415; border: 1px solid var(--line); color: var(--text-dim); }

.title {
  margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.channel { font-size: 13px; color: var(--text-dim); font-weight: 600; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  border: 1px solid transparent;
}
.badge-en { background: rgba(89, 168, 255, 0.13); color: #6fc0ff; border-color: rgba(89, 168, 255, 0.3); }
.badge-ja { background: rgba(255, 133, 133, 0.13); color: #ff9e9e; border-color: rgba(255, 133, 133, 0.3); }
.badge-watch { background: #0d2415; color: var(--text-mute); border-color: var(--line); font-weight: 600; }

.card-actions { margin-top: auto; padding-top: 4px; }
.go {
  display: block; text-align: center; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #0d2415; color: var(--text);
  font-size: 13.5px; font-weight: 700; transition: all 0.14s ease;
}
.go:hover { border-color: var(--mint); color: var(--mint); }

.cta {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-top: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(47, 230, 168, 0.09), rgba(155, 255, 110, 0.05));
  font-size: 11.8px; line-height: 1.45; color: var(--text-dim);
}
.cta strong { color: var(--mint); font-weight: 700; white-space: nowrap; }
.cta:hover { background: linear-gradient(90deg, rgba(47, 230, 168, 0.16), rgba(155, 255, 110, 0.09)); }

.skeleton { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.skeleton .sk-thumb { aspect-ratio: 16/9; background: linear-gradient(90deg, #08180e, #0f2818, #08180e); background-size: 200% 100%; animation: sh 1.3s infinite; }
.skeleton .sk-line { height: 11px; margin: 12px 14px; border-radius: 6px; background: #0f2818; }
.skeleton .sk-line.short { width: 45%; }
@keyframes sh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ------------------------------------------------------------ cta strip --- */
.cta-strip { border-top: 1px solid var(--line-soft); background: var(--bg-raise); padding: 34px 0; }
.cta-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.cta-strip h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.cta-strip p { margin: 0; color: var(--text-dim); font-size: 14px; }

.site-footer { padding: 26px 0 46px; color: var(--text-mute); font-size: 12.5px; }
.site-footer a { color: var(--mint); }
.site-footer .muted { color: #40584a; margin-top: 6px; }

@media (max-width: 640px) {
  .hero { padding: 34px 0 22px; }
  .hero-dash { display: none; }
  .hero-brand { display: block; font-size: 0.7em; margin-top: 6px; }
  .header-cta { display: none; }
  .filter-label { min-width: auto; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
