﻿:root {
  --bg: #050912;
  --bg-soft: #0a1221;
  --panel: rgba(11, 18, 34, 0.94);
  --panel-soft: rgba(15, 24, 45, 0.86);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --muted: #9ba7bb;
  --accent: #0ea5ff;
  --accent-2: #5a35ff;
  --accent-3: #ff5b84;
  --accent-4: #ffbf5f;
  --success: #35d38a;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(90, 53, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #03070d 0%, #050913 18%, #091120 52%, #05070d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 90px);
  opacity: 0.25;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 10px 12px 92px;
}

.appbar,
.hero-stage,
.shelf-block,
.bottom-dock,
.status-strip,
.tab-chip,
.player-card,
.search-shell,
.icon-button {
  backdrop-filter: blur(20px);
}

.appbar {
  display: grid;
  gap: 14px;
  padding: 14px 14px 12px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 15, 28, 0.84), rgba(9, 15, 28, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.brand-wrap h1,
.hero-text h2,
.shelf-head h3 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.05em;
  line-height: 0.95;
}

.brand-wrap h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.micro-copy {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-4);
}

.appbar-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.header-cta-group {
  display: flex;
  gap: 10px;
}

.search-shell,
.icon-button,
.tab-chip,
.control-button,
.primary-button,
.secondary-button,
.media-card,
.event-card {
  border: 1px solid var(--panel-border);
}

.search-shell {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.search-shell span,
.slider-stack span,
.select-stack span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-shell input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.icon-button,
.control-button,
.secondary-button,
.tab-chip {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.icon-button,
.control-button,
.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button:disabled,
.control-button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.icon-button:hover,
.control-button:hover,
.primary-button:hover,
.secondary-button:hover,
.tab-chip:hover,
.media-card:hover,
.event-card:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, #1178ff, #5a35ff 62%, #ff5b84 100%);
  color: white;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
}

.status-strip {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(14, 165, 255, 0.1), rgba(90, 53, 255, 0.12));
  color: #dce8ff;
  font-size: 0.85rem;
}

.tab-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar,
.media-rail::-webkit-scrollbar {
  display: none;
}

.tab-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.tab-chip.active {
  background: linear-gradient(135deg, rgba(17, 120, 255, 0.92), rgba(90, 53, 255, 0.92));
  border-color: transparent;
}

.page-body {
  margin-top: 16px;
  display: grid;
  gap: 18px;
}

.hero-stage,
.shelf-block,
.player-card,
.social-strip {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(12, 18, 34, 0.92) 0%, rgba(7, 12, 22, 0.96) 100%);
  box-shadow: var(--shadow);
}

.hero-stage {
  padding: 18px 18px 20px;
  display: grid;
  gap: 18px;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3, 7, 13, 0.1), rgba(3, 7, 13, 0.9)),
    var(--hero-backdrop, linear-gradient(135deg, rgba(17, 120, 255, 0.35), rgba(90, 53, 255, 0.28), rgba(255, 91, 132, 0.22)));
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 191, 95, 0.16), transparent 28%);
}

.hero-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hero-badges,
.hero-actions,
.hero-facts,
.primary-controls,
.secondary-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-badge,
.fact-pill,
.media-meta-pill,
.inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-badge.live {
  background: rgba(53, 211, 138, 0.16);
  color: #d9ffec;
}

.hero-badge.muted,
.fact-pill,
.media-meta-pill,
.inline-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero-text h2 {
  font-size: clamp(2.6rem, 10vw, 5.4rem);
  max-width: 10ch;
}

.hero-description {
  margin: 0;
  max-width: 64ch;
  color: #dae4f7;
  font-size: 0.98rem;
  line-height: 1.55;
}

.player-card {
  padding: 12px;
  background: rgba(8, 14, 28, 0.82);
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(17, 120, 255, 0.28), rgba(90, 53, 255, 0.28), rgba(255, 91, 132, 0.22)),
    #090f1b;
}

.player-frame.portrait-mode {
  aspect-ratio: 9 / 16;
  width: min(100%, 360px);
  margin: 0 auto;
}

#player,
#player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-glass {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(3, 7, 13, 0.92));
  pointer-events: none;
}

.player-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.player-title-row strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.player-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.time-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 78px;
  margin-left: auto;
  padding: 0 2px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.shelf-block {
  padding: 18px;
}

.social-strip {
  padding: 18px;
}

.social-head h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.social-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.social-button strong {
  display: block;
  font-size: 0.95rem;
}

.social-meta {
  display: grid;
  gap: 4px;
}

.social-copy {
  color: var(--muted);
  font-size: 0.82rem;
}

.shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.shelf-head h3 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}

.media-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72vw, 1fr);
  gap: 14px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.compact-rail {
  grid-auto-columns: minmax(48vw, 1fr);
}

.media-card,
.event-card,
.setup-card,
.empty-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

.media-card {
  display: grid;
  cursor: pointer;
  scroll-snap-align: start;
}

.media-card.active {
  border-color: rgba(17, 120, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(17, 120, 255, 0.32), 0 18px 32px rgba(0, 0, 0, 0.24);
}

.media-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(17, 120, 255, 0.3), rgba(90, 53, 255, 0.2), rgba(255, 91, 132, 0.16)),
    #0b1221;
}

.media-poster.portrait {
  aspect-ratio: 9 / 16;
}

.media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.media-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(3, 7, 13, 0), rgba(3, 7, 13, 0.92));
}

.media-topline {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  z-index: 1;
}

.media-body {
  padding: 14px;
}

.media-title {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.media-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.split-shelves {
  display: grid;
  gap: 18px;
}

.compact-block .media-card {
  min-width: 0;
}

.event-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.event-card,
.setup-card,
.empty-card {
  padding: 18px;
  border: 1px solid var(--panel-border);
}

.event-card h4,
.setup-card h4,
.empty-card h4 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.event-card p,
.setup-card p,
.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.setup-card code,
.empty-card code {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe8ff;
}

.bottom-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 15, 28, 0.82);
}

.bottom-dock a {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 52px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.bottom-dock a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bottom-dock a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

body.theater-mode .app-shell {
  width: min(100%, 1600px);
}

body.theater-mode .hero-stage {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}

@media (min-width: 780px) {
  .app-shell {
    padding: 18px 18px 28px;
  }

  .appbar {
    grid-template-columns: auto minmax(280px, 420px);
    align-items: center;
  }

  .hero-stage {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: end;
  }

  .media-rail {
    grid-auto-columns: minmax(320px, 1fr);
  }

  .compact-rail {
    grid-auto-columns: minmax(240px, 1fr);
  }

  .split-shelves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .hero-stage {
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  }

  .media-rail {
    grid-auto-columns: minmax(280px, 1fr);
  }

  .event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-dock {
    display: none;
  }
}

@media (max-width: 479px) {
  .app-shell {
    padding-inline: 10px;
  }

  .appbar-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-rail {
    grid-auto-columns: minmax(58vw, 1fr);
  }

  .social-links {
    grid-template-columns: 1fr;
  }
}

.event-card[data-event-id] {
  cursor: pointer;
}

