:root {
  --bg: #000000;
  --bg-elev: #0d0d0f;
  --surface: rgba(20, 20, 24, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --accent: #e50914;
  --radius-pill: 100px;
  --radius-card: 10px;
  --font-display: "Bebas Neue", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --tap-min: 52px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noise {
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.not-tesla {
  position: relative;
  z-index: 50;
  margin: 0;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(229, 9, 20, 0.25);
  border-bottom: 1px solid rgba(229, 9, 20, 0.35);
}

.not-tesla[hidden] {
  display: none !important;
}

.overlay-fullscreen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.overlay-fullscreen[hidden] {
  display: none !important;
}

.overlay-fullscreen__panel {
  max-width: 26rem;
  width: 100%;
  padding: 1.5rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
}

.overlay-fullscreen__title {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.overlay-fullscreen__text {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.overlay-fullscreen__text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.overlay-fullscreen__cta {
  width: 100%;
  min-height: var(--tap-min);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.overlay-fullscreen__cta:hover,
.overlay-fullscreen__cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* Header */
.app-header {
  position: relative;
  z-index: 20;
  padding: 0.75rem 1.25rem 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.65) 70%, transparent 100%);
}

.app-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.65rem;
}

.app-header__inner > * {
  margin: 0.35rem 0.5rem 0.35rem 0;
}

.app-brand {
  display: flex;
  align-items: center;
}

.app-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e50914, #831010);
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
  margin-right: 0.65rem;
}

.app-brand__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.app-brand__tag {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.open-url--header {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 420px;
  margin: 0;
}

.open-url__row {
  display: flex;
  align-items: stretch;
}

.open-url__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-right: 8px;
}

.open-url__input::placeholder {
  color: var(--muted);
}

.open-url__input:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.open-url__btn {
  flex-shrink: 0;
  min-width: 3.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.open-url__btn:hover,
.open-url__btn:focus-visible {
  background: #e8e8ed;
}

/* Filter pills */
.filter-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 0.85rem;
  overflow: hidden;
  text-align: center;
}

.filter-nav__track {
  display: inline-flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.35rem 0.5rem;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-pill);
  max-width: 100%;
  vertical-align: top;
}

.filter-nav__track::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 0 1.35rem;
  margin: 0 0.25rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.filter-pill:hover,
.filter-pill:focus-visible {
  color: var(--text);
}

.filter-pill.is-active {
  background: #fff;
  color: #000;
}

/* Hero carousel */
.hero {
  position: relative;
  z-index: 10;
  margin-top: -0.25rem;
}

.hero__slider {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  -webkit-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.hero__slider::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 300px;
  min-height: 52vh;
  max-height: 480px;
  -webkit-scroll-snap-align: start;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1.25rem 1.75rem;
}

.hero-slide[hidden] {
  display: none !important;
}

.hero-slide__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
}

.hero-slide--netflix .hero-slide__bg {
  background:
    radial-gradient(ellipse 90% 80% at 80% 20%, rgba(229, 9, 20, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 60% at 10% 90%, rgba(180, 0, 20, 0.5), transparent 50%),
    linear-gradient(165deg, #1a0508 0%, #0a0a0a 50%, #000 100%);
}

.hero-slide--disney .hero-slide__bg {
  background:
    radial-gradient(ellipse 80% 70% at 70% 10%, rgba(1, 126, 254, 0.35), transparent 50%),
    radial-gradient(ellipse 60% 50% at 20% 100%, rgba(80, 0, 120, 0.4), transparent 45%),
    linear-gradient(165deg, #0a1628 0%, #000 100%);
}

.hero-slide--hulu .hero-slide__bg {
  background:
    radial-gradient(ellipse 85% 70% at 75% 30%, rgba(28, 231, 131, 0.25), transparent 55%),
    linear-gradient(165deg, #0c1812 0%, #000 100%);
}

.hero-slide--xbox .hero-slide__bg {
  background:
    radial-gradient(ellipse 80% 70% at 20% 20%, rgba(16, 124, 16, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(0, 80, 0, 0.35), transparent 45%),
    linear-gradient(165deg, #061a08 0%, #000 100%);
}

.hero-slide--youtube .hero-slide__bg {
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(255, 0, 0, 0.28), transparent 50%),
    linear-gradient(165deg, #1a0a0a 0%, #000 100%);
}

.hero-slide--spotify .hero-slide__bg {
  background:
    radial-gradient(ellipse 80% 70% at 30% 20%, rgba(29, 185, 84, 0.35), transparent 50%),
    linear-gradient(165deg, #0a1a10 0%, #000 100%);
}

.hero-slide__inner {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.hero-slide__badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border-radius: 4px;
}

.hero-slide__logo {
  display: block;
  max-width: 200px;
  width: 55vw;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.5rem;
}

.hero-slide__logo--wide {
  max-height: 40px;
}

.hero-slide__logo--icon {
  max-height: 64px;
  max-width: 72px;
}

.hero-slide__logo--invert {
  filter: brightness(0) invert(1);
}

.hero-slide__headline {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero-slide__copy {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 28em;
  line-height: 1.5;
}

.hero-slide__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  background: #fff;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-slide__cta:hover,
.hero-slide__cta:focus-visible {
  background: #f0f0f5;
  -webkit-transform: scale(1.02);
  transform: scale(1.02);
  outline: none;
}

.hero__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.65rem 1rem 0.25rem;
}

.hero__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  margin: 0 0.22rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero__dots button.is-active {
  background: #fff;
  -webkit-transform: scale(1.15);
  transform: scale(1.15);
}

/* Content rows */
.app-main {
  position: relative;
  z-index: 10;
  padding: 1.25rem 0 2.5rem;
}

.content-row {
  margin-bottom: 1.75rem;
}

.content-row[hidden] {
  display: none !important;
}

.content-row__head {
  padding: 0 1.25rem 0.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.content-row__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.poster-row {
  list-style: none;
  margin: 0;
  padding: 0.25rem 1.25rem 0.5rem;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.poster-row li {
  flex-shrink: 0;
  margin-right: 0.65rem;
}

.poster-row li:last-child {
  margin-right: 0;
}

.poster-row::-webkit-scrollbar {
  height: 6px;
}

.poster-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.poster {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 195px;
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 1rem 0.65rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: -webkit-transform 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.poster__shine {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 45%, transparent 100%);
  pointer-events: none;
}

.poster:hover,
.poster:focus-visible {
  -webkit-transform: scale(1.06);
  transform: scale(1.06);
  z-index: 2;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  outline: none;
}

.poster__logo {
  position: relative;
  z-index: 1;
  max-width: 78%;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.poster__logo--wide {
  max-height: 36px;
  max-width: 88%;
}

.poster__logo--mono {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  max-height: 48px;
  max-width: 52%;
}

.poster__name {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  opacity: 0.92;
}

.poster--netflix {
  background: linear-gradient(160deg, #b20710 0%, #221 100%);
}
.poster--youtube {
  background: linear-gradient(160deg, #c00 0%, #1a1a1a 100%);
}
.poster--disney {
  background: linear-gradient(160deg, #113ccf 0%, #0a0a20 100%);
}
.poster--max {
  background: linear-gradient(160deg, #6b2d8a 0%, #120818 100%);
}
.poster--hulu {
  background: linear-gradient(160deg, #1ce783 0%, #0d2818 100%);
}
.poster--prime {
  background: linear-gradient(160deg, #00a8e1 0%, #0a1a22 100%);
}
.poster--paramount {
  background: linear-gradient(160deg, #0064ff 0%, #0a1528 100%);
}
.poster--peacock {
  background: linear-gradient(160deg, #2d2d2d 0%, #000 100%);
}
.poster--apple {
  background: linear-gradient(160deg, #3a3a3c 0%, #0d0d0d 100%);
}
.poster--espn {
  background: linear-gradient(160deg, #e52534 0%, #1a0808 100%);
}
.poster--twitch {
  background: linear-gradient(160deg, #6441a5 0%, #140a22 100%);
}
.poster--xbox {
  background: linear-gradient(160deg, #107c10 0%, #0a1a0a 100%);
}
.poster--nvidia {
  background: linear-gradient(160deg, #76b900 0%, #141a0a 100%);
}
.poster--amazon {
  background: linear-gradient(160deg, #ff9900 0%, #2a1a05 100%);
}
.poster--spotify {
  background: linear-gradient(160deg, #1db954 0%, #0a1a10 100%);
}
.poster--applemusic {
  background: linear-gradient(160deg, #fc3c44 0%, #1a0a0c 100%);
}
.poster--ytmusic {
  background: linear-gradient(160deg, #f00 0%, #1a0a0a 100%);
}
.poster--tidal {
  background: linear-gradient(160deg, #333 0%, #000 100%);
}

.app-foot {
  position: relative;
  z-index: 10;
  padding: 0.5rem 1.25rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.app-foot p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 560px) {
  .hero-slide__headline {
    font-size: 3.25rem;
  }
}

@media (min-width: 900px) {
  .hero-slide {
    min-height: 420px;
    padding: 2rem 2.5rem 2.25rem;
  }

  .poster {
    width: 155px;
    height: 232px;
    min-height: 232px;
  }
}
