:root {
  --primary: #0ea5e9;
  --accent: #0369a1;
}

* { box-sizing: border-box; }

body.embed-page {
  margin: 0;
  font-family: system-ui, sans-serif;
}

.player-root {
  width: 100%;
}

.player-root.single .player-wrap {
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

.player-root.multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
}

.player-root.multi .player-wrap {
  aspect-ratio: 16 / 9;
}

.player-wrap {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.player-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.player-brand img {
  height: 28px;
  max-width: 120px;
  object-fit: contain;
}

.player-brand h3 {
  margin: 0;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.player-status {
  align-self: flex-end;
  margin: 0.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(0,0,0,0.6);
  color: #4ade80;
}

.player-status.error { color: #f87171; }
.player-status.loading { color: #fbbf24; }

.player-bar {
  height: 3px;
  background: var(--primary, #0ea5e9);
}

.player-root.embed .player-wrap {
  border-radius: 0;
}

.collection-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  color: #e2e8f0;
}

.collection-header img {
  height: 32px;
  object-fit: contain;
}

.collection-header h2 {
  margin: 0;
  font-size: 1rem;
}

@media (max-width: 480px) {
  .player-root.multi {
    grid-template-columns: 1fr;
  }
}
