:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --fg: #111111;
  --muted: #5c5c5c;
  --red: #e10a0a;
  --red-dark: #b80808;
  --border: #e6e6e6;
  --ring: rgba(225, 10, 10, 0.18);
  --radius: 0.875rem;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --header-offset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button {
  font: inherit;
  cursor: pointer;
}

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

img,
video {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .wrap {
    padding: 0 2rem;
  }
}

/* Visibility helpers */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none !important;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
  .desktop-only {
    display: grid !important;
  }
}

/* Header — compact on phones so videos appear above the fold */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0 0.9rem;
}

@media (min-width: 768px) {
  .header-inner {
    gap: 1.25rem;
    padding: 1.25rem 0 1.5rem;
  }
}

.header-top {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .header-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.brand-row img {
  height: 1.85rem;
  width: auto;
}

@media (min-width: 768px) {
  .brand-row img {
    height: 2.25rem;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.pill-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--red);
  flex-shrink: 0;
}

h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.15rem, 4.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22rem;
}

@media (min-width: 768px) {
  h1 {
    max-width: none;
    margin: 0.55rem 0 0;
  }
}

/* Hide long intro on phones so the player hits the first screen */
.lead {
  display: none;
  margin: 0.65rem 0 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (min-width: 768px) {
  .lead {
    display: block;
  }
}

.lead strong {
  color: var(--red);
  font-weight: 700;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.header-actions .btn {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: 0;
  height: 2.4rem;
  font-size: 0.78rem;
  padding: 0 0.65rem;
}

@media (min-width: 768px) {
  .header-actions .btn {
    flex: 0 0 auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.55rem;
  padding: 0 1rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  transition: filter 0.15s ease, background 0.15s ease;
}

@media (min-width: 768px) {
  .btn {
    height: 2.75rem;
    padding: 0 1.15rem;
    font-size: 0.875rem;
  }
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--bg-soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.stat-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-hint {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.inline-link {
  color: var(--red);
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
}

/* Main: player + library side by side on desktop; stacked on mobile with player first */
.main {
  display: grid;
  gap: 1.25rem;
  padding: 1rem 0 1.5rem;
}

@media (min-width: 1024px) {
  .main {
    grid-template-columns: 1.25fr 0.85fr;
    gap: 2rem;
    padding: 1.5rem 0 2rem;
    align-items: start;
  }
}

.player-column {
  min-width: 0;
}

.library-column {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0 0 1px var(--ring);
  scroll-margin-top: 4.5rem;
}

.player-card.player-flash {
  box-shadow: 0 0 0 3px rgba(225, 10, 10, 0.35);
}

.player-frame {
  aspect-ratio: 16 / 9;
  background: #111;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.player-meta {
  border-top: 1px solid var(--border);
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .player-meta {
    padding: 1.15rem 1.25rem 1.35rem;
    gap: 0.9rem;
  }
}

/* Collapse long script on mobile so list isn't pushed away */
.script {
  margin: 0;
  font-size: 0.88rem;
  color: #222;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

@media (min-width: 768px) {
  .script {
    font-size: 0.9rem;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--fg);
}

.badge-primary {
  background: rgba(225, 10, 10, 0.08);
  color: var(--red);
  border-color: rgba(225, 10, 10, 0.25);
}

.badge-muted {
  color: var(--muted);
  font-weight: 600;
}

.player-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.player-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.cta-box {
  border: 1px solid rgba(225, 10, 10, 0.25);
  background: rgba(225, 10, 10, 0.05);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.cta-label {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.cta-text {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  padding: 0 0.85rem;
  border-radius: 0.55rem;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--bg-soft);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-sm:hover {
  background: #eee;
}

.btn-sm-primary {
  background: var(--red);
  color: #fff;
  border-color: transparent;
}

.btn-sm-primary:hover {
  background: var(--red-dark);
}

.list-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.sidebar-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  /* Horizontal scroll on very narrow phones so filters don't dominate height */
  max-width: 100%;
}

@media (max-width: 480px) {
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex: 0 0 auto;
  }
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.filter-btn:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.filter-btn.active {
  background: var(--red);
  color: #fff;
  border-color: transparent;
}

.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  /* On mobile, full list (page scrolls). On desktop, capped height. */
  max-height: none;
  overflow: visible;
  padding-right: 0;
  padding-bottom: 0.5rem;
}

@media (min-width: 1024px) {
  .video-list {
    max-height: min(72vh, 760px);
    overflow: auto;
    padding-right: 0.25rem;
  }
}

.video-item {
  width: 100%;
  display: flex;
  gap: 0.65rem;
  text-align: left;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.6rem;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.video-item:hover {
  background: var(--bg-soft);
}

.video-item:active {
  transform: scale(0.995);
}

.video-item.active {
  border-color: rgba(225, 10, 10, 0.45);
  background: rgba(225, 10, 10, 0.04);
  box-shadow: 0 0 0 1px var(--ring);
}

.thumb {
  position: relative;
  width: 6.5rem;
  height: 4.1rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.45rem;
  background: #eee;
}

@media (min-width: 480px) {
  .thumb {
    width: 7.5rem;
    height: 4.7rem;
  }
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-duration {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  background: rgba(17, 17, 17, 0.8);
  color: #fff;
  border-radius: 0.25rem;
  padding: 0.08rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
}

.item-body {
  min-width: 0;
  flex: 1;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.1rem;
}

.item-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red);
}

.item-audience {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-product {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content below the player/library */
.below-player {
  padding: 0 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .below-player {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .below-player {
    padding-left: 2rem;
    padding-right: 2rem;
    gap: 1.5rem;
  }
}

.signup-banner {
  border: 1px solid rgba(225, 10, 10, 0.28);
  background: linear-gradient(
    135deg,
    rgba(225, 10, 10, 0.06),
    rgba(255, 255, 255, 0.95) 55%
  );
  border-radius: 1rem;
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 720px) {
  .signup-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.3rem;
  }
}

.signup-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.signup-banner h2 {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.signup-banner p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

.signup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.audience-strip {
  padding: 0;
}

.audience-intro {
  max-width: 40rem;
  margin-bottom: 0.9rem;
}

.audience-intro h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.audience-intro p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

@media (min-width: 720px) {
  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .audience-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.audience-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.9rem;
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audience-card:hover {
  border-color: rgba(225, 10, 10, 0.35);
  box-shadow: 0 0 0 1px var(--ring);
}

.audience-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.audience-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.audience-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
}

.audience-cta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red);
}

.audience-cta:hover {
  text-decoration: underline;
}

.help-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .help-row {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.notes {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0.75rem;
  padding: 1rem;
}

.notes h3 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.notes ul {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}

.notes li {
  margin: 0.45rem 0;
  line-height: 1.4;
}

.notes a {
  color: var(--red);
  font-weight: 700;
}

.notes a:hover {
  text-decoration: underline;
}

.help-card strong {
  color: var(--fg);
  font-weight: 700;
}

.upload-note,
.contact-card {
  border: 1px solid rgba(225, 10, 10, 0.22);
  background: rgba(225, 10, 10, 0.04);
  border-radius: 0.75rem;
  padding: 0.95rem 1rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

.contact-link {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--red);
  font-weight: 800;
}

.contact-link:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 5.5rem; /* room for floating jump button on mobile */
  color: var(--muted);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .site-footer {
    padding-bottom: 1.75rem;
  }
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: center;
  align-items: center;
}

.site-footer a {
  color: var(--red);
  font-weight: 700;
}

.footer-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.footer-links .btn-text {
  font-weight: 700;
  color: var(--muted);
}

.footer-links .btn-text:hover {
  color: var(--red);
}

.empty-list {
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  list-style: none;
}

/* Floating “back to video” control for mobile */
.jump-player {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  height: 2.75rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: none;
  background: var(--fg);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.jump-player:active {
  transform: translateX(-50%) scale(0.98);
}

.jump-player.is-hidden,
.jump-player[hidden] {
  display: none !important;
}

@media (min-width: 1024px) {
  .jump-player {
    display: none !important;
  }
}
