:root {
  --demo-bg: #0a0a0c;
  --demo-surface: #141418;
  --demo-surface-2: #1c1c22;
  --demo-border: #2a2a32;
  --demo-text: #e8eaed;
  --demo-muted: #9aa0a6;
  --demo-gold: #e8b923;
  --demo-gold-dim: #c99812;
  --demo-accent: #3d9eff;
  --demo-danger: #ef5350;
  --demo-radius: 14px;
  --demo-header-h: 56px;
  --demo-safe-t: env(safe-area-inset-top, 0px);
  --demo-safe-b: env(safe-area-inset-bottom, 0px);
  --demo-font: 'Roboto', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--demo-bg);
  color: var(--demo-text);
  font-family: var(--demo-font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

.demo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: calc(var(--demo-header-h) + var(--demo-safe-t));
  padding: calc(8px + var(--demo-safe-t)) 16px 8px;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--demo-border);
}

.demo-header--no-back {
  padding-left: 16px;
}

.demo-header__back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--demo-border);
  border-radius: 10px;
  background: var(--demo-surface);
  color: var(--demo-text);
  cursor: pointer;
}

.demo-header__brand {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-header__logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.demo-header__title-wrap { min-width: 0; }

.demo-header__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-header__provider-emblem {
  flex: 0 0 auto;
  align-self: center;
  min-width: 0;
  object-fit: contain;
}

.demo-header__sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--demo-muted);
}

.demo-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(232, 185, 35, 0.45);
  color: var(--demo-gold);
  background: rgba(232, 185, 35, 0.12);
}

.demo-badge--demo {
  border-color: rgba(239, 83, 80, 0.5);
  color: #ff8a80;
  background: rgba(239, 83, 80, 0.12);
}

.demo-main {
  padding: 16px 16px calc(24px + var(--demo-safe-b));
  max-width: 1200px;
  margin: 0 auto;
}

.demo-hero {
  margin-bottom: 20px;
  padding: 20px 18px;
  border-radius: var(--demo-radius);
  border: 1px solid var(--demo-border);
  background: linear-gradient(135deg, rgba(61, 158, 255, 0.12) 0%, rgba(232, 185, 35, 0.08) 100%), var(--demo-surface);
}

.demo-hero h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.demo-hero p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--demo-muted);
}

.demo-provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.demo-provider-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--demo-radius);
  border: 1px solid var(--demo-border);
  background: var(--demo-surface-2);
  transition: border-color 0.2s, transform 0.2s;
}

.demo-provider-card:hover {
  border-color: rgba(232, 185, 35, 0.45);
  transform: translateY(-2px);
}

.demo-provider-card__logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
}

.demo-provider-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.demo-provider-card p {
  margin: 0;
  font-size: 13px;
  color: var(--demo-muted);
  line-height: 1.45;
}

.demo-provider-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, #3d9eff 0%, #2580e8 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.demo-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.demo-search {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--demo-border);
  background: var(--demo-surface);
  color: var(--demo-text);
  font-size: 14px;
  font-family: inherit;
}

.demo-search::placeholder { color: #6b7280; }

.demo-count {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  color: var(--demo-muted);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}

.demo-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--demo-surface-2);
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.demo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.demo-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
}

.demo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo-card:hover .demo-card__play { opacity: 1; }

.demo-card__name {
  min-height: 40px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-card__name-text {
  width: 100%;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.demo-empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  text-align: center;
  color: var(--demo-muted);
  font-size: 14px;
}

.demo-player {
  position: fixed;
  inset: calc(var(--demo-header-h) + var(--demo-safe-t)) 0 0 0;
  background: #000;
}

.demo-player__frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

.demo-watermark {
  pointer-events: none;
  position: fixed;
  inset: calc(var(--demo-header-h) + var(--demo-safe-t)) 0 0 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.demo-watermark span {
  font-size: clamp(48px, 14vw, 120px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.06);
  transform: rotate(-24deg);
  user-select: none;
  text-transform: uppercase;
}

.demo-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--demo-muted);
}

.demo-loading__spin {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--demo-border);
  border-top-color: var(--demo-gold);
  border-radius: 50%;
  animation: demo-spin 0.7s linear infinite;
}

@keyframes demo-spin { to { transform: rotate(360deg); } }

.demo-disclaimer {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--demo-border);
  background: rgba(239, 83, 80, 0.08);
  font-size: 12px;
  line-height: 1.5;
  color: #ffcdd2;
}

@media (min-width: 768px) {
  .demo-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
  }
}
