:root {
  --abyss: #051630;
  --deep: #0a2a5e;
  --current: #1457b8;
  --open: #2f8cf0;
  --shallows: #7fd0ff;
  --foam: #eaf7ff;
  --youtube: #ff3b3b;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Figtree", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--foam);
  background: linear-gradient(180deg, var(--abyss) 0%, var(--deep) 45%, #0c3a80 100%) fixed;
  min-height: 100vh;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 24px 0; text-align: center; overflow: hidden; }
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.03em;
  margin: 0;
  color: var(--foam);
}
.hero p {
  max-width: 46ch;
  margin: 18px auto 0;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--shallows);
}
.sea { position: relative; height: 150px; margin-top: 40px; }
.sea svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.wave-a { animation: drift 16s linear infinite; }
.wave-b { animation: drift 24s linear infinite reverse; }
@keyframes drift { to { transform: translateX(-50%); } }
.sea .boat {
  position: absolute; left: 50%; bottom: 50px; width: min(260px, 70vw); height: auto;
  transform: translateX(-50%);
  transform-origin: 50% 90%;
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1.5deg); }
  50% { transform: translateX(-50%) translateY(-6px) rotate(1.5deg); }
}

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 8px 24px 80px; }
.bar {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.bar h2 { font-family: var(--display); font-size: 1.7rem; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 600; color: var(--foam); text-decoration: none;
  background: rgba(5, 22, 48, .55); border: 1px solid rgba(127, 208, 255, .4);
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: rgba(47, 140, 240, .35); border-color: var(--shallows); }
.btn svg { width: 18px; height: 18px; }
.t-youtube { color: #ff8a8a; font-weight: 600; }

.strip {
  width: min(100%, 420px); margin: 0 auto 48px; padding: 18px 24px;
  background: rgba(5, 22, 48, .6); border: 1px solid rgba(127, 208, 255, .25); border-radius: 18px;
}
.strip .label { font-size: .9rem; color: var(--shallows); font-weight: 600; }
.strip .num { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1.1; }
.strip .sub { font-size: .9rem; color: #cfe9fb; }

#streams { scroll-margin-top: 24px; }
.btn:focus-visible, .card:focus-visible, .close:focus-visible { outline: 3px solid var(--shallows); outline-offset: 2px; }
.status { color: var(--shallows); font-size: .95rem; }

/* ---------- Player ---------- */
.player { display: none; margin-bottom: 32px; }
.player.open { display: block; }
.frame { aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid rgba(127, 208, 255, .35); }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.now { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-top: 12px; }
.now strong { font-family: var(--display); font-size: 1.25rem; display: block; }
.now span { color: var(--shallows); }
.close {
  font: inherit; font-weight: 600; color: var(--foam); background: transparent; cursor: pointer;
  border: 1px solid rgba(127, 208, 255, .4); border-radius: 8px; padding: 8px 14px; flex-shrink: 0;
}

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
  background: rgba(5, 22, 48, .55); border: 1px solid rgba(127, 208, 255, .22);
  border-radius: 14px; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--shallows); }
.thumb {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--current), var(--abyss));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px;
  font-size: .8rem; font-weight: 600; color: #fff;
}
.badge.youtube { background: var(--youtube); }
.viewers {
  position: absolute; bottom: 10px; right: 10px; padding: 3px 9px; border-radius: 6px;
  background: rgba(5, 22, 48, .85); font-size: .8rem; font-weight: 600;
}
.info { padding: 14px 16px 18px; }
.creator { font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin: 0 0 4px; }
.title {
  margin: 0; color: #cfe9fb; line-height: 1.4; font-size: .98rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px;
  border: 1px dashed rgba(127, 208, 255, .4); border-radius: 14px; color: var(--shallows);
}
.empty strong { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--foam); margin-bottom: 6px; }
footer { text-align: center; padding: 28px; color: var(--shallows); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .wave-a, .wave-b, .boat { animation: none; }
  .card { transition: none; }
}