:root {
  --bg: #0b1220;
  --surface: #111b2e;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: linear-gradient(135deg, #0c4a6e 0%, #0b1220 60%);
  padding: 2.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner { max-width: 1100px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-icon { font-size: 2rem; }
.brand h1 { margin: 0; font-size: 1.75rem; font-weight: 700; }
.tagline { margin: 0.5rem 0 0; color: var(--muted); }

.landing-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.hero { margin-bottom: 2rem; }
.collections-hero { margin-top: 3rem; }
.hero h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.hero p { margin: 0; color: var(--muted); }

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.stream-card,
.collection-card {
  display: block;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.15s, border-color 0.15s;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.stream-card:hover,
.collection-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}

.stream-card-thumb,
.collection-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0f1a;
  overflow: hidden;
}

.stream-card-thumb img,
.collection-thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2740 0%, #0a0f1a 100%);
  color: var(--muted);
  font-size: 2rem;
}

.thumb-placeholder.small { font-size: 1.25rem; }

.collection-thumb-grid {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 2px;
}

.collection-thumb-grid.single { grid-template-columns: 1fr; }
.collection-thumb-grid.duo { grid-template-columns: 1fr 1fr; }
.collection-thumb-grid.quad { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.stream-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.stream-card h3,
.collection-card h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.stream-card p,
.collection-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.live-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(0,0,0,0.65);
  border-radius: 4px;
}

.collection-badge {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(0,0,0,0.65);
  border-radius: 4px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem;
  background: var(--surface);
  border-radius: 12px;
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.offline-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-card {
  text-align: center;
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

.offline-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

.watch-page { min-height: 100vh; }
.watch-header { padding: 1rem 1.5rem; max-width: 960px; margin: 0 auto; }
.back-link { color: var(--muted); font-size: 0.9rem; }
.watch-main { max-width: 960px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.watch-main-wide { max-width: 1200px; }
.watch-description { color: var(--muted); margin-top: 1rem; }

.embed-details {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem;
}

.embed-details summary { cursor: pointer; font-weight: 600; }

.embed-code-block {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.embed-code-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0a0f1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #a5f3fc;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  resize: vertical;
}

.copy-embed-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-embed-btn:hover { background: var(--accent-dark); }
.copy-embed-btn.copied { background: #16a34a; }

.embed-code {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #0a0f1a;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
  color: #a5f3fc;
}
