:root {
  --reels-bg: #020617;
  --reels-panel: rgba(11, 17, 32, 0.9);
  --reels-panel-strong: rgba(15, 23, 42, 0.96);
  --reels-card: rgba(12, 20, 37, 0.96);
  --reels-line: rgba(148, 163, 184, 0.18);
  --reels-line-strong: rgba(251, 212, 26, 0.32);
  --reels-text: #e5e7eb;
  --reels-muted: #94a3b8;
  --reels-hot: #f84e56;
  --reels-warm: #f89322;
  --reels-gold: #fbd41a;
  --reels-shadow: 0 28px 60px rgba(2, 6, 23, 0.44);
  --reels-radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.reels-page {
  color: var(--reels-text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at -10% -10%, rgba(248, 78, 86, 0.24), transparent 60%),
    radial-gradient(900px 520px at 110% -10%, rgba(248, 147, 34, 0.2), transparent 58%),
    radial-gradient(720px 420px at 50% 120%, rgba(251, 212, 26, 0.08), transparent 60%),
    var(--reels-bg);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.reels-site-shell {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 18px 0 40px;
}

.reels-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.reels-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.reels-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}

.reels-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reels-brand-copy p {
  margin: 0 0 4px;
  color: var(--reels-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.reels-brand-copy h1 {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.reels-site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reels-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--reels-text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.reels-nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 212, 26, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.reels-nav-link-primary {
  border-color: rgba(248, 147, 34, 0.5);
  background: linear-gradient(135deg, rgba(248, 78, 86, 0.22), rgba(248, 147, 34, 0.16));
}

.reels-root {
  display: block;
}

.reels-page-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reels-hero-panel,
.reels-section-panel,
.reels-event-panel {
  border: 1px solid var(--reels-line);
  border-radius: var(--reels-radius);
  background: linear-gradient(165deg, var(--reels-panel-strong), var(--reels-panel));
  box-shadow: var(--reels-shadow);
  animation: reels-rise 0.42s ease both;
}

.reels-hero-panel {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 10px;
  align-items: center;
}

.reels-hero-copy {
  min-width: 0;
}

.reels-eyebrow,
.reels-player-eyebrow {
  margin: 0 0 6px;
  color: #fde68a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.reels-hero-title,
.reels-event-title,
.reels-section-title,
.reels-player-title {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  letter-spacing: -0.04em;
}

.reels-hero-title {
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  line-height: 0.98;
  max-width: 14ch;
}

.reels-hero-text,
.reels-event-text,
.reels-card-copy,
.reels-search-note,
.reels-empty-state p {
  color: var(--reels-muted);
  line-height: 1.6;
}

.reels-hero-text {
  margin: 8px 0 0;
  max-width: 44ch;
  font-size: 0.92rem;
}

.reels-stat-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reels-stat-card {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reels-stat-card strong {
  font-size: 1rem;
}

.reels-stat-card span {
  color: var(--reels-muted);
  font-size: 0.72rem;
}

.reels-search-card {
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(248, 147, 34, 0.22);
  background: linear-gradient(180deg, rgba(12, 20, 37, 0.98), rgba(6, 12, 24, 0.92));
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.reels-search-label {
  color: var(--reels-muted);
  font-size: 0.82rem;
}

.reels-search-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.82);
  padding: 8px 10px;
}

.reels-search-input-wrap-inline {
  margin-top: 18px;
}

.reels-search-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(248, 78, 86, 0.24), rgba(248, 147, 34, 0.18));
  color: #fff7db;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reels-search-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--reels-text);
  outline: none;
  font-size: 0.95rem;
  min-width: 0;
}

.reels-search-input-wrap input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.reels-search-note {
  display: none;
}

.reels-status-banner {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(248, 78, 86, 0.28);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
}

.reels-crumb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid var(--reels-line);
  background: rgba(9, 15, 28, 0.84);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.22);
}

.reels-crumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reels-crumb-sep,
.reels-section-meta,
.reels-card-meta,
.reels-event-meta,
.reels-crumb-current {
  color: var(--reels-muted);
}

.reels-crumb-link,
.reels-inline-button,
.reels-player-button,
.reels-thumb-button {
  appearance: none;
  border: none;
  cursor: pointer;
}

.reels-crumb-link {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--reels-text);
  transition: background 0.16s ease, transform 0.16s ease;
}

.reels-crumb-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.reels-crumb-link-primary {
  background: linear-gradient(135deg, rgba(248, 78, 86, 0.26), rgba(248, 147, 34, 0.18));
}

.reels-section-panel,
.reels-event-panel {
  padding: 14px;
}

.reels-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reels-section-title {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.1;
}

.reels-card-grid {
  display: grid;
  gap: 12px;
}

.reels-card-grid-events {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.reels-card-grid-reels {
  grid-template-columns: repeat(auto-fit, minmax(132px, 156px));
  justify-content: start;
  align-items: start;
}

.reels-event-tile,
.reels-reel-tile {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 14, 29, 0.96));
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.reels-event-tile:hover,
.reels-reel-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 212, 26, 0.34);
  box-shadow: 0 22px 40px rgba(2, 6, 23, 0.36);
}

.reels-event-media,
.reels-thumb-button {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(2, 6, 23, 0.18));
  overflow: hidden;
}

.reels-event-media {
  aspect-ratio: 16 / 9;
}

.reels-thumb-button {
  aspect-ratio: 9 / 16;
  padding: 0;
  display: block;
}

.reels-thumb-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.reels-event-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.reels-thumb-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 2px;
  background: transparent;
}

.reels-event-media .reels-chip-row,
.reels-event-sidecard .reels-chip-row {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.reels-event-body,
.reels-reel-body {
  padding: 10px;
}

.reels-card-title {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: 0.92rem;
  line-height: 1.18;
}

.reels-card-meta {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.reels-card-copy {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.reels-card-copy-tight {
  margin-top: 8px;
  font-size: 0.88rem;
}

.reels-card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reels-inline-button,
.reels-player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--reels-text);
  transition: background 0.16s ease, transform 0.16s ease;
}

.reels-inline-button:hover,
.reels-player-button:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.reels-inline-button:disabled,
.reels-player-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.reels-inline-button-primary,
.reels-player-button-close {
  background: linear-gradient(135deg, rgba(248, 78, 86, 0.94), rgba(248, 147, 34, 0.84));
  color: #fff;
}

.reels-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reels-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--reels-text);
  font-size: 0.68rem;
}

.reels-chip-muted {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.92);
}

.reels-empty-state {
  margin: 0;
  padding: 10px 0;
  text-align: center;
}

.reels-empty-panel {
  padding: 24px 18px;
  border-radius: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.44);
}

.reels-empty-state h3 {
  margin: 0 0 8px;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: 1.1rem;
}

.reels-event-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 176px);
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}

.reels-event-copy {
  min-width: 0;
}

.reels-event-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.reels-event-meta {
  margin: 10px 0 0;
  font-size: 0.96rem;
}

.reels-event-text {
  margin: 12px 0 0;
  max-width: 58ch;
}

.reels-event-sidecard {
  position: relative;
  width: 100%;
  max-width: 176px;
  aspect-ratio: 2 / 3;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  justify-self: end;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(2, 6, 23, 0.18));
}

.reels-event-sidecard-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 4px;
}

.reels-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.reels-player-shell {
  width: min(1400px, calc(100vw - 24px));
  height: min(calc(100dvh - 24px), 980px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 12, 24, 0.98);
  box-shadow: 0 36px 80px rgba(2, 6, 23, 0.6);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.reels-player-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.reels-player-copy {
  min-width: 0;
}

.reels-player-title {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.04;
}

.reels-player-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.reels-chip-row-player {
  margin-top: 10px;
}

.reels-player-stage {
  position: relative;
  min-height: 0;
  border-radius: 22px;
  background: #000;
  overflow: hidden;
}

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

.reels-player-empty {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--reels-muted);
}

.reels-transfer-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: min(220px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.4);
  display: grid;
  gap: 8px;
}

.reels-transfer-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.reels-transfer-label {
  font-size: 0.78rem;
  line-height: 1.2;
}

.reels-transfer-detail {
  color: var(--reels-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.reels-transfer-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.reels-transfer-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(248, 78, 86, 0.96), rgba(251, 212, 26, 0.94));
  transition: width 0.18s ease;
}

.reels-transfer-bar-indeterminate {
  width: 34%;
  animation: reels-transfer-slide 1.1s ease-in-out infinite alternate;
}

.reels-save-sheet {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.reels-save-sheet-card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(6, 12, 24, 0.98));
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.46);
  display: grid;
  gap: 12px;
}

.reels-save-sheet-title {
  margin: 0;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.reels-save-sheet-text {
  margin: 0;
  color: var(--reels-muted);
  line-height: 1.55;
}

.reels-save-sheet-stage {
  width: min(100%, 260px);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
}

.reels-save-sheet-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.reels-save-sheet-actions {
  justify-content: flex-end;
}

@keyframes reels-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reels-transfer-slide {
  from {
    transform: translateX(-14%);
  }

  to {
    transform: translateX(170%);
  }
}

@media (max-width: 980px) {
  .reels-hero-panel,
  .reels-event-hero {
    grid-template-columns: 1fr;
  }

  .reels-event-sidecard {
    justify-self: start;
  }

  .reels-site-header {
    align-items: flex-start;
  }

  .reels-player-shell {
    width: calc(100vw - 18px);
    height: calc(100dvh - 18px);
    border-radius: 24px;
  }
}

@media (max-width: 720px) {
  .reels-site-shell {
    width: min(94vw, 1180px);
    padding-top: 18px;
  }

  .reels-site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .reels-search-input-wrap {
    grid-template-columns: 1fr;
  }

  .reels-section-head,
  .reels-player-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reels-card-grid-events {
    grid-template-columns: 1fr;
  }

  .reels-card-grid-reels {
    grid-template-columns: repeat(2, minmax(0, 148px));
    justify-content: center;
  }

  .reels-player-shell {
    padding: 10px;
    gap: 10px;
  }

  .reels-player-stage {
    border-radius: 18px;
  }

  .reels-transfer-badge {
    top: 10px;
    right: 10px;
    width: min(188px, calc(100% - 20px));
  }

  .reels-save-sheet {
    padding: 12px;
  }

  .reels-save-sheet-card {
    padding: 14px;
    border-radius: 20px;
  }
}
