:root {
  --bg: #f7f4ff;
  --bg-2: #ece4ff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-2: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(94, 73, 162, 0.2);
  --text: #281f3a;
  --muted: #655b85;
  --accent: #7b4dff;
  --accent-2: #a363ff;
  --accent-soft: rgba(123, 77, 255, 0.12);
  --danger: #cf4374;
  --input-bg: rgba(255, 255, 255, 0.84);
  --shadow: 0 24px 58px rgba(87, 65, 160, 0.15);
  --player-bg: #090710;
}

body[data-theme="dark"] {
  --bg: #0f0c1d;
  --bg-2: #1a1430;
  --panel: rgba(20, 16, 37, 0.8);
  --panel-2: rgba(17, 13, 31, 0.9);
  --panel-border: rgba(177, 158, 239, 0.24);
  --text: #f1eaff;
  --muted: #b4a9d8;
  --accent: #9a6dff;
  --accent-2: #7a4fff;
  --accent-soft: rgba(154, 109, 255, 0.24);
  --danger: #f17198;
  --input-bg: rgba(13, 10, 27, 0.72);
  --shadow: 0 24px 62px rgba(1, 0, 8, 0.46);
  --player-bg: #030209;
}

* {
  box-sizing: border-box;
}

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

body {
  padding: 16px;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 18%, var(--bg-2), var(--bg));
  overflow-x: hidden;
}

body.auth-locked .app-shell,
body.auth-locked .history-drawer,
body.auth-locked .drawer-backdrop {
  display: none;
}

.stars {
  position: fixed;
  inset: -100%;
  pointer-events: none;
  z-index: -3;
  will-change: transform;
}

.stars-far {
  opacity: 0.26;
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.95) 0.9px, transparent 1.6px),
    radial-gradient(circle at 66% 42%, rgba(255, 255, 255, 0.72) 1px, transparent 1.8px),
    radial-gradient(circle at 38% 78%, rgba(255, 255, 255, 0.84) 0.9px, transparent 1.6px);
  background-size: 320px 320px;
  animation: starsDriftFar 180s linear infinite;
}

.stars-mid {
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 20% 32%, rgba(255, 255, 255, 0.92) 1.1px, transparent 1.9px),
    radial-gradient(circle at 76% 62%, rgba(255, 255, 255, 0.7) 1px, transparent 1.9px),
    radial-gradient(circle at 42% 14%, rgba(255, 255, 255, 0.76) 1.2px, transparent 1.9px);
  background-size: 260px 260px;
  animation: starsDriftMid 140s linear infinite;
}

.stars-near {
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.96) 1.35px, transparent 2.1px),
    radial-gradient(circle at 62% 54%, rgba(255, 255, 255, 0.8) 1.25px, transparent 2.1px),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.72) 1.2px, transparent 2.1px);
  background-size: 200px 200px;
  animation: starsDriftNear 95s linear infinite;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(58px);
  z-index: -2;
  opacity: 0.44;
  animation: floaty 9s ease-in-out infinite alternate;
}

.ambient-left {
  width: 320px;
  height: 320px;
  background: #9a70ff;
  left: -110px;
  top: -95px;
}

.ambient-right {
  width: 360px;
  height: 360px;
  background: #6b43ea;
  right: -120px;
  bottom: -110px;
}

.app-shell {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.panel {
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.topbar:hover,
.continue-panel:hover,
.watch-panel:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--panel-border));
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent),
    0 18px 44px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hidden {
  display: none !important;
}

.topbar {
  position: relative;
  z-index: 15;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-pill {
  text-decoration: none;
  padding: 10px 13px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #5d39db);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.brand-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.brand-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.brand-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.search-input-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 21px;
  transform: translateY(-50%);
  color: var(--muted);
  display: inline-flex;
  pointer-events: none;
}

input,
button,
select {
  min-height: 42px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
}

input {
  width: 100%;
  border: 1px solid var(--panel-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px 0 36px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

input:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--panel-border));
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

a {
  transition: color 0.2s ease, text-decoration-color 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.type-picker {
  position: relative;
}

.ghost-btn,
.icon-btn {
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  color: var(--text);
  padding: 0 12px;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 8px 20px color-mix(in srgb, var(--accent) 20%, transparent);
}

.type-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 170px;
  padding: 8px;
  border-radius: 13px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 6px;
  transform-origin: top left;
  animation: menuIn 0.2s ease;
  z-index: 25;
}

.type-option {
  min-height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.type-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 72%, var(--panel-border));
}

.type-option--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  position: relative;
  align-items: center;
}

.icon-btn {
  width: 42px;
  padding: 0;
  font-size: 16px;
}

.profile-btn {
  width: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.profile-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 10px 20px color-mix(in srgb, var(--accent) 18%, transparent);
}

.profile-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, 78vw);
  border-radius: 13px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  padding: 10px;
  display: grid;
  gap: 10px;
  z-index: 45;
  animation: menuIn 0.2s ease;
}

.profile-card-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
}

.profile-card-head img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--panel-border);
}

.profile-card-meta {
  display: grid;
  gap: 2px;
}

.profile-card-meta strong {
  font-size: 14px;
  line-height: 1.2;
}

.profile-card-meta span {
  font-size: 12px;
  color: #53d782;
}

.profile-logout-btn {
  min-height: 38px;
}

.theme-icon {
  display: inline-block;
  transition: transform 0.24s ease;
}

.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(1, 0, 10, 0.33);
  overflow: hidden;
  animation: menuIn 0.2s ease;
  z-index: 22;
}

.search-dropdown-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-dropdown-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.count-pill {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.results-list {
  max-height: min(56vh, 540px);
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.results-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
}

.result-card,
.continue-card,
.history-item {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover,
.continue-card:hover,
.history-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 14px 30px color-mix(in srgb, var(--accent) 16%, transparent);
}

.result-card {
  grid-template-columns: 82px 1fr;
  padding: 8px;
}

.result-card--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result-card img,
.continue-card img,
.history-item img,
.result-card .poster-placeholder,
.continue-card .poster-placeholder,
.history-item .poster-placeholder,
.spotlight-card .poster-placeholder {
  object-fit: cover;
  border-radius: 10px;
  background: rgba(140, 124, 200, 0.2);
}

.result-card img,
.result-card .poster-placeholder {
  width: 82px;
  height: 118px;
}

.poster-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px;
}

.result-card-text,
.continue-card-text,
.history-item-text {
  display: grid;
  gap: 4px;
  align-content: center;
}

.result-card-text strong,
.continue-card-text strong,
.history-item-text strong {
  font-size: 14px;
  line-height: 1.25;
}

.result-card-text span,
.continue-card-text span,
.history-item-text span {
  font-size: 12px;
  color: var(--muted);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-row span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--panel-border) 84%, transparent);
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
}

.status {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--muted);
}

.status.status--error {
  color: var(--danger);
}

.page {
  display: grid;
  gap: 10px;
}

.home-page {
  grid-template-columns: 1fr;
}

.home-hero {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.home-hero-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.home-hero-title {
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text);
}

.home-spotlight {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.home-spotlight.home-spotlight--featured {
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
}

.spotlight-card {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  min-height: 0;
  padding: 10px;
  background: color-mix(in srgb, var(--panel-2) 84%, transparent);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 10px;
  align-content: start;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 16px 34px color-mix(in srgb, var(--accent) 18%, transparent);
}

.spotlight-card img,
.spotlight-card .poster-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
}

.spotlight-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.spotlight-card span {
  color: var(--muted);
  font-size: 12px;
}

.continue-panel {
  padding: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.continue-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.continue-list.continue-list--featured {
  grid-template-columns: repeat(auto-fit, minmax(290px, 360px));
  justify-content: flex-start;
}

.continue-card {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  padding: 10px;
  min-height: 0;
  align-content: start;
}

.continue-card img,
.continue-card .poster-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  border-radius: 11px;
}

.continue-card-text {
  align-content: start;
}

.continue-card-text strong {
  font-size: 15px;
}

.history-item img,
.history-item .poster-placeholder {
  width: 74px;
  height: 106px;
}

.watch-page {
  grid-template-columns: 1fr;
}

.watch-panel {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.watch-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 38px);
  letter-spacing: -0.03em;
}

.watch-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.source-picker {
  position: relative;
  width: min(460px, 100%);
}

.source-picker-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--text);
  text-align: left;
  padding: 0 44px 0 12px;
  position: relative;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.source-picker-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 10px 24px color-mix(in srgb, var(--accent) 18%, transparent);
}

.source-picker-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-66%) rotate(45deg);
  opacity: 0.8;
}

.source-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border-radius: 13px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  padding: 8px;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  z-index: 20;
  animation: menuIn 0.2s ease;
}

.source-option {
  min-height: 42px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--text);
  text-align: left;
  padding: 7px 10px;
  display: grid;
  gap: 2px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.source-option:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 16%, transparent);
}

.source-option strong {
  font-size: 13px;
  line-height: 1.2;
}

.source-option span {
  font-size: 11px;
  color: var(--muted);
}

.source-option--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.variant-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.filter-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-box label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.filter-box select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-box select:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--panel-border));
}

.player-stage-wrap {
  display: flex;
  justify-content: center;
}

.player-stage {
  width: min(980px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: var(--player-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-stage iframe,
.player-stage video {
  width: 100%;
  height: 100%;
  border: 0;
}

.external-player {
  width: min(560px, 92%);
  display: grid;
  gap: 12px;
  text-align: center;
  color: #efe6ff;
}

.external-player h3 {
  margin: 0;
  font-size: 18px;
}

.external-player p {
  margin: 0;
  color: #cbbde8;
}

.external-player-btn {
  justify-self: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--panel-border));
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
}

.player-actions {
  display: flex;
  justify-content: center;
}

.player-action-btn {
  min-height: 40px;
  padding: 0 14px;
}

.empty-player {
  color: #d8cff8;
  opacity: 0.85;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 14, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 40;
}

.drawer-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

.history-drawer {
  position: fixed;
  right: 16px;
  top: 82px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(74vh, 760px);
  transform: translateY(-8px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  z-index: 45;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.history-drawer--open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.history-drawer-head {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
}

.history-drawer-head h3 {
  margin: 0;
}

.history-drawer-list {
  padding: 10px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.history-item {
  grid-template-columns: 74px 1fr;
  padding: 8px;
  min-height: 118px;
}

.theme-wave {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  z-index: 70;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: color-mix(in srgb, #06040f 72%, transparent);
  z-index: 120;
}

.auth-panel {
  width: min(460px, 100%);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.auth-panel h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-twitch-btn {
  min-height: 42px;
}

.auth-pending {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
}

.auth-message {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

.theme-wave--run {
  animation: waveSpread 0.45s ease-out forwards;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes waveSpread {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.82;
  }
  100% {
    transform: translate(-50%, -50%) scale(100);
    opacity: 0;
  }
}

@keyframes floaty {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(12px);
  }
}

@keyframes starsDriftFar {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-320px, -180px, 0);
  }
}

@keyframes starsDriftMid {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-260px, -220px, 0);
  }
}

@keyframes starsDriftNear {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-200px, -300px, 0);
  }
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .continue-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

}

@media (max-width: 780px) {
  body {
    padding: 10px;
  }

  .topbar {
    padding: 10px;
  }

  .brand-block {
    justify-content: space-between;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .ghost-btn,
  .icon-btn,
  input,
  select,
  .source-picker-btn {
    min-height: 40px;
  }

  .result-card {
    grid-template-columns: 70px 1fr;
  }

  .result-card img,
  .result-card .poster-placeholder {
    width: 70px;
    height: 100px;
  }

  .continue-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .continue-card img,
  .continue-card .poster-placeholder {
    width: 100%;
    max-height: 320px;
  }

  .history-item {
    grid-template-columns: 62px 1fr;
    min-height: 100px;
  }

  .history-item img,
  .history-item .poster-placeholder {
    width: 62px;
    height: 88px;
  }

  .history-drawer {
    right: 10px;
    top: 70px;
    width: calc(100vw - 20px);
    max-height: 72vh;
  }

  .variant-filters {
    grid-template-columns: 1fr;
  }

  .player-stage {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
