﻿@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0c0d10;
  --surface: #16181d;
  --surface-2: #1c1f26;
  --surface-3: #242834;
  --text: #f4f6fb;
  --muted: #a7afc1;
  --accent: #2dd4ff;
  --accent-2: #ff7aa2;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --card-highlight: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f2f3f7;
  --surface-3: #e9ecf2;
  --text: #1c1f2a;
  --muted: #65708a;
  --accent: #3e6bff;
  --accent-2: #ff7aa2;
  --border: rgba(20, 26, 40, 0.08);
  --shadow: 0 18px 50px rgba(26, 34, 52, 0.08);
  --chip-bg: rgba(20, 26, 40, 0.06);
  --card-highlight: rgba(20, 26, 40, 0.04);
}

body[data-theme="red"] {
  --bg: #13090b;
  --surface: #1c0f12;
  --surface-2: #241419;
  --surface-3: #311920;
  --text: #fdeef1;
  --muted: #d4aeb8;
  --accent: #ff5f78;
  --accent-2: #ff9a63;
  --border: rgba(255, 150, 168, 0.2);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --chip-bg: rgba(255, 140, 160, 0.14);
  --card-highlight: rgba(255, 140, 160, 0.08);
}

body[data-theme="gradient"] {
  --bg: #0d1022;
  --surface: rgba(19, 23, 41, 0.9);
  --surface-2: rgba(25, 29, 53, 0.9);
  --surface-3: rgba(34, 39, 68, 0.9);
  --text: #f6f8ff;
  --muted: #b8c0e4;
  --accent: #67d9ff;
  --accent-2: #d37bff;
  --border: rgba(151, 176, 255, 0.24);
  --shadow: 0 24px 60px rgba(5, 8, 24, 0.5);
  --chip-bg: rgba(140, 170, 255, 0.14);
  --card-highlight: rgba(140, 170, 255, 0.08);
}

body[data-theme="purple"] {
  --bg: #120d1f;
  --surface: #1d1530;
  --surface-2: #251a3d;
  --surface-3: #31214f;
  --text: #f7f1ff;
  --muted: #cbb8e7;
  --accent: #b27bff;
  --accent-2: #f286d9;
  --border: rgba(186, 143, 255, 0.22);
  --shadow: 0 24px 60px rgba(7, 4, 14, 0.58);
  --chip-bg: rgba(181, 130, 255, 0.16);
  --card-highlight: rgba(181, 130, 255, 0.09);
}

body[data-theme="neon"] {
  --bg: #010104;
  --surface: rgba(5, 2, 10, 0.97);
  --surface-2: rgba(8, 3, 14, 0.97);
  --surface-3: rgba(13, 5, 22, 0.98);
  --text: #fff7ff;
  --muted: #c9aacd;
  --accent: #ff3df2;
  --accent-2: #8b5cff;
  --border: rgba(255, 61, 242, 0.22);
  --shadow: 0 24px 70px rgba(2, 0, 6, 0.78);
  --chip-bg: rgba(255, 61, 242, 0.08);
  --card-highlight: rgba(255, 116, 246, 0.1);
}

body[data-theme="custom"] {
  --bg: #050509;
  --surface: #11121a;
  --surface-2: #181a26;
  --surface-3: #23263a;
  --text: #f7f7fb;
  --muted: #b8bdd0;
  --accent: #39d2ff;
  --accent-2: #ff7aa2;
  --border: color-mix(in srgb, var(--accent) 30%, transparent);
  --shadow: 0 24px 70px color-mix(in srgb, var(--bg) 68%, black);
  --chip-bg: color-mix(in srgb, var(--accent) 12%, transparent);
  --card-highlight: color-mix(in srgb, var(--accent-2) 9%, transparent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Rubik", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body[data-theme="gradient"] {
  background: linear-gradient(-45deg, #131937, #1a2d63, #3f2f73, #162f4f);
  background-size: 320% 320%;
  animation: vgaGradientTheme 18s ease infinite;
}

body[data-theme="purple"] {
  background: radial-gradient(circle at 12% 10%, #2c1f4d 0%, #170f2a 38%, #0f0a1d 100%);
}

body[data-theme="neon"] {
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 61, 242, 0.14) 0%, transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(139, 92, 255, 0.13) 0%, transparent 36%),
    radial-gradient(circle at 50% 110%, rgba(255, 0, 128, 0.07) 0%, transparent 44%),
    linear-gradient(180deg, #020104 0%, #000 100%);
}

body[data-theme="custom"] {
  background:
    radial-gradient(circle at 14% -10%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 36%),
    radial-gradient(circle at 88% 2%, color-mix(in srgb, var(--accent-2) 14%, transparent) 0%, transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 90%, #000 10%) 0%, var(--bg) 100%);
}

body[data-theme="neon"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 61, 242, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 255, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
  opacity: 0.12;
}

@keyframes vgaGradientTheme {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.side-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50vw;
  background-size: cover;
  background-position: center center;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.side-left {
  left: 0;
  background-image: none;
}

.side-right {
  right: 0;
  background-image: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface) 96%, #0a0b0e 4%), color-mix(in srgb, var(--surface-2) 94%, #0a0b0e 6%)),
    rgba(10, 11, 14, 0.96);
  border-bottom: 1px solid var(--border);
  display: block;
  padding: 12px 28px;
}

.topbar-main {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

body[data-theme="light"] .topbar {
  background: rgba(244, 245, 248, 0.97);
}

body[data-theme="red"] .topbar {
  background: rgba(34, 14, 18, 0.96);
}

body[data-theme="gradient"] .topbar {
  background: rgba(14, 18, 36, 0.96);
}

body[data-theme="purple"] .topbar {
  background: rgba(27, 18, 45, 0.96);
}

body[data-theme="neon"] .topbar {
  background:
    linear-gradient(90deg, rgba(4, 1, 8, 0.98), rgba(9, 2, 15, 0.96)),
    rgba(1, 1, 4, 0.96);
  border-bottom-color: rgba(255, 61, 242, 0.28);
  box-shadow: 0 0 0 1px rgba(139, 92, 255, 0.1), 0 0 18px rgba(255, 61, 242, 0.08);
}

body[data-theme="custom"] .topbar {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--surface) 97%, #000 3%),
      color-mix(in srgb, var(--surface-2) 95%, #000 5%)
    ),
    color-mix(in srgb, var(--bg) 94%, #000 6%);
  border-bottom-color: color-mix(in srgb, var(--accent) 32%, transparent);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--bg) 50%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--surface-2) 68%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--accent) 20%);
}

.brand-mark {
  font-size: 20px;
  color: var(--accent);
}

.brand-name {
  font-size: 18px;
}

.topnav {
  justify-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
  border-radius: 999px;
  padding: 5px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  font-size: 13px;
  color: var(--muted);
}

.topnav > a,
.topnav-catalog-trigger {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topnav > a:hover,
.topnav-catalog-trigger:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--border) 72%, var(--accent) 28%);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.topnav-catalog {
  position: relative;
}

.topnav-catalog summary {
  list-style: none;
}

.topnav-catalog summary::-webkit-details-marker {
  display: none;
}

.topnav-catalog-trigger {
  cursor: pointer;
  user-select: none;
}

.topnav-catalog[open] .topnav-catalog-trigger {
  color: var(--text);
}

.topnav-catalog-caret {
  font-size: 11px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.topnav-catalog[open] .topnav-catalog-caret {
  transform: rotate(180deg);
}

.topnav-catalog-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 240px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--accent) 22%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 96%, transparent)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  z-index: 130;
}

.topnav-catalog[open] .topnav-catalog-menu {
  display: grid;
}

.topnav-catalog:not(.topnav-more) .topnav-catalog-menu {
  grid-template-columns: 1fr;
}

.topnav-more .topnav-catalog-menu {
  left: auto;
  right: 0;
  min-width: min(390px, calc(100vw - 36px));
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.topnav-catalog-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topnav-catalog-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--border) 58%, transparent);
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.topnav-catalog-item:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--border) 68%, var(--accent) 32%);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.button {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--border));
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease;
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
}

.button:hover,
.button.ghost:hover {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 58%, #fff 42%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

.button:active,
.button.ghost:active {
  animation: button-press-pop 0.22s ease;
}

@keyframes button-press-pop {
  0% { transform: scale(1); }
  50% { transform: scale(0.93); }
  100% { transform: scale(1); }
}

.theme-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 36px 8px 14px;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.top-actions .theme-select {
  min-height: 38px;
  max-width: 154px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 13px;
  background-color: color-mix(in srgb, var(--surface-2) 58%, transparent);
}

.top-actions .button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.theme-select option {
  color: #0f1220;
}

body[data-theme="custom"] .side-bg {
  opacity: 0.22;
}

body[data-theme="custom"] .brand,
body[data-theme="custom"] .topnav,
body[data-theme="custom"] .theme-select {
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 7%, transparent);
}

body[data-theme="custom"] .brand-mark,
body[data-theme="custom"] .brand-name {
  text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 26%, transparent);
}

body[data-theme="custom"] .topnav > a:hover,
body[data-theme="custom"] .topnav-catalog-trigger:hover,
body[data-theme="custom"] .topnav-catalog[open] .topnav-catalog-trigger,
body[data-theme="custom"] .topnav-catalog-item:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

body[data-theme="custom"] .theme-select option {
  color: var(--text);
  background: var(--surface);
}

body[data-theme="custom"] .panel,
body[data-theme="custom"] .panel-item,
body[data-theme="custom"] .card,
body[data-theme="custom"] .filter-card,
body[data-theme="custom"] .profile-card,
body[data-theme="custom"] .profile-summary-card,
body[data-theme="custom"] .admin-card,
body[data-theme="custom"] .asset-card,
body[data-theme="custom"] .comment-card,
body[data-theme="custom"] .audio-track-card,
body[data-theme="custom"] .trade-card,
body[data-theme="custom"] .trade-asset-card,
body[data-theme="custom"] .upgrade-choice-card,
body[data-theme="custom"] .upgrade-spin-card,
body[data-theme="custom"] .pack-shop-card,
body[data-theme="custom"] .case-head-panel,
body[data-theme="custom"] .case-loot-panel,
body[data-theme="custom"] .case-spin-panel,
body[data-theme="custom"] .home-spotlight,
body[data-theme="custom"] .home-watch-resume-card,
body[data-theme="custom"] .home-hero-side-card,
body[data-theme="custom"] .home-genre-card,
body[data-theme="custom"] .home-rank-card,
body[data-theme="custom"] .home-poster-card,
body[data-theme="custom"] .home-collection-card {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent), 0 16px 46px color-mix(in srgb, var(--bg) 42%, transparent);
}

body[data-theme="neon"] .side-bg {
  opacity: 0.14;
}

body[data-theme="neon"] .brand,
body[data-theme="neon"] .topnav,
body[data-theme="neon"] .theme-select {
  background: rgba(3, 1, 8, 0.82);
  border-color: rgba(255, 61, 242, 0.3);
  box-shadow: 0 0 0 1px rgba(139, 92, 255, 0.08), 0 0 12px rgba(255, 61, 242, 0.08);
}

body[data-theme="neon"] .brand-mark,
body[data-theme="neon"] .brand-name {
  text-shadow: 0 0 8px rgba(255, 61, 242, 0.46), 0 0 18px rgba(139, 92, 255, 0.24);
}

body[data-theme="neon"] .topnav > a:hover,
body[data-theme="neon"] .topnav-catalog-trigger:hover,
body[data-theme="neon"] .topnav-catalog[open] .topnav-catalog-trigger,
body[data-theme="neon"] .topnav-catalog-item:hover {
  background: rgba(255, 61, 242, 0.12);
  border-color: rgba(255, 61, 242, 0.46);
  box-shadow: inset 0 0 14px rgba(255, 61, 242, 0.07), 0 0 10px rgba(139, 92, 255, 0.08);
}

body[data-theme="neon"] .button,
body[data-theme="neon"] .button.ghost {
  background: rgba(255, 61, 242, 0.05);
  border-color: rgba(255, 61, 242, 0.38);
  box-shadow: inset 0 0 12px rgba(255, 61, 242, 0.04), 0 0 9px rgba(255, 61, 242, 0.06);
}

body[data-theme="neon"] .button:hover,
body[data-theme="neon"] .button.ghost:hover {
  background: linear-gradient(120deg, #ff3df2, #8b5cff);
  border-color: rgba(255, 221, 255, 0.72);
  box-shadow: 0 0 12px rgba(255, 61, 242, 0.32), 0 0 26px rgba(139, 92, 255, 0.2);
}

body[data-theme="neon"] .theme-select option {
  color: #fff7ff;
  background: #09030f;
}

body[data-theme="neon"] .chip,
body[data-theme="neon"] .user-chip {
  border-color: rgba(255, 61, 242, 0.26);
  box-shadow: inset 0 0 10px rgba(255, 61, 242, 0.04);
}

body[data-theme="neon"] .panel,
body[data-theme="neon"] .panel-item,
body[data-theme="neon"] .card,
body[data-theme="neon"] .filter-card,
body[data-theme="neon"] .profile-card,
body[data-theme="neon"] .profile-summary-card,
body[data-theme="neon"] .admin-card,
body[data-theme="neon"] .asset-card,
body[data-theme="neon"] .comment-card,
body[data-theme="neon"] .audio-track-card,
body[data-theme="neon"] .trade-card,
body[data-theme="neon"] .trade-asset-card,
body[data-theme="neon"] .upgrade-choice-card,
body[data-theme="neon"] .upgrade-spin-card,
body[data-theme="neon"] .pack-shop-card,
body[data-theme="neon"] .case-head-panel,
body[data-theme="neon"] .case-loot-panel,
body[data-theme="neon"] .case-spin-panel,
body[data-theme="neon"] .home-spotlight,
body[data-theme="neon"] .home-watch-resume-card,
body[data-theme="neon"] .home-hero-side-card,
body[data-theme="neon"] .home-genre-card,
body[data-theme="neon"] .home-rank-card,
body[data-theme="neon"] .home-poster-card,
body[data-theme="neon"] .home-collection-card {
  background: linear-gradient(180deg, rgba(6, 2, 12, 0.97), rgba(2, 1, 6, 0.98));
  border-color: rgba(255, 61, 242, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 187, 252, 0.08), 0 0 0 1px rgba(139, 92, 255, 0.06), 0 0 14px rgba(255, 61, 242, 0.05);
}

body[data-theme="neon"] .home-spotlight {
  border-color: rgba(255, 61, 242, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 187, 252, 0.09), 0 0 0 1px rgba(139, 92, 255, 0.1), 0 0 28px rgba(255, 61, 242, 0.09);
}

body[data-theme="neon"] .catalog-card:hover,
body[data-theme="neon"] .home-hero-side-card:hover,
body[data-theme="neon"] .home-poster-card:hover,
body[data-theme="neon"] .upgrade-choice-card:hover {
  border-color: rgba(255, 61, 242, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 187, 252, 0.1), 0 0 14px rgba(255, 61, 242, 0.18), 0 0 28px rgba(139, 92, 255, 0.12);
}

body[data-theme="neon"] .form-field input,
body[data-theme="neon"] .form-field select,
body[data-theme="neon"] .form-field textarea,
body[data-theme="neon"] .filter-item input,
body[data-theme="neon"] .filter-item select,
body[data-theme="neon"] .hero-search-form input,
body[data-theme="neon"] .admin-form textarea,
body[data-theme="neon"] .admin-select-search input,
body[data-theme="neon"] .admin-select-search select,
body[data-theme="neon"] .watch-track-select {
  background: rgba(7, 2, 14, 0.86);
  border-color: rgba(255, 61, 242, 0.34);
  color: var(--text);
  box-shadow: inset 0 0 16px rgba(255, 61, 242, 0.06);
}

body[data-theme="neon"] .form-field input:focus,
body[data-theme="neon"] .form-field select:focus,
body[data-theme="neon"] .form-field textarea:focus,
body[data-theme="neon"] .filter-item input:focus,
body[data-theme="neon"] .filter-item select:focus,
body[data-theme="neon"] .hero-search-form input:focus,
body[data-theme="neon"] .admin-form textarea:focus,
body[data-theme="neon"] .admin-select-search input:focus,
body[data-theme="neon"] .admin-select-search select:focus {
  outline: none;
  border-color: rgba(255, 61, 242, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 61, 242, 0.16), 0 0 22px rgba(139, 92, 255, 0.18);
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--border);
}

.user-chip {
  min-height: 38px;
  max-width: 190px;
  padding: 4px 10px 4px 5px;
  gap: 8px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.user-chip-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.user-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trusted-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2c8dff;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.award-chip {
  gap: 10px;
  padding: 6px 14px 6px 8px;
  min-height: 40px;
}

.award-chip-image {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.award-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
}

.award-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 18px;
  justify-content: flex-start;
  margin-top: 8px;
}

.award-showcase-card {
  position: relative;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.award-showcase-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.award-showcase-media {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
}

.award-showcase-media.is-fallback {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.2), rgba(255, 122, 162, 0.25));
}

.award-showcase-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  color: #f5f8ff;
  word-break: break-word;
  background: linear-gradient(180deg, rgba(7, 10, 16, 0), rgba(7, 10, 16, 0.92) 55%);
}

.award-showcase-tooltip {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 15, 0.94);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.award-showcase-card:hover .award-showcase-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.card-rarity-common {
  box-shadow: inset 0 0 0 1px rgba(180, 190, 210, 0.2);
}

.card-rarity-uncommon {
  box-shadow: inset 0 0 0 1px rgba(104, 214, 160, 0.45);
}

.card-rarity-rare {
  box-shadow: inset 0 0 0 1px rgba(92, 167, 255, 0.5);
}

.card-rarity-epic {
  box-shadow: inset 0 0 0 1px rgba(163, 117, 255, 0.55);
}

.card-rarity-legendary {
  box-shadow: inset 0 0 0 1px rgba(255, 183, 74, 0.6);
}

.card-rarity-mythic {
  box-shadow: inset 0 0 0 1px rgba(255, 93, 168, 0.65);
}

.award-picker-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 12px 0;
}

.award-picker-item {
  display: grid;
  grid-template-columns: 18px 44px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 10px;
  cursor: pointer;
}

.award-picker-item input[type="checkbox"] {
  margin: 0;
}

.award-picker-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.award-picker-thumb.is-fallback {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.2), rgba(255, 122, 162, 0.25));
}

.award-picker-label {
  font-size: 13px;
  line-height: 1.3;
}

.chip-active {
  color: var(--text);
  border-color: rgba(45, 212, 255, 0.65);
  background: rgba(45, 212, 255, 0.18);
}

.main {
  padding: 32px 24px 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 36px;
}

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

.hero-search {
  display: block;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-search-form {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px 12px;
}

.hero-search-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  padding: 8px 6px;
  outline: none;
}

.hero-search-form .button {
  margin-left: auto;
}

.home-cinema {
  display: grid;
  gap: 28px;
  padding: 6px 4px 4px;
}

.home-cinema-section {
  display: grid;
  gap: 12px;
}

.home-cinema-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.home-cinema-head h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.home-cinema-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 14px;
}

.home-hero-main,
.home-hero-side-card,
.home-genre-card,
.home-rank-card,
.home-poster-card,
.home-collection-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d0f15;
  color: #ffffff;
}

.home-rank-poster::before,
.home-poster-card::before,
.home-collection-card::before,
.home-genre-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: center;
}

.home-hero-main::before,
.home-hero-side-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(12px);
  opacity: 0.66;
}

.home-hero-main {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  will-change: transform;
}

.home-hero-main::after,
.home-hero-side-card::after,
.home-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.2), rgba(7, 9, 14, 0.9));
}

.home-hero-main > :not(.home-hero-poster),
.home-hero-side-card > :not(.home-hero-poster),
.home-rank-card > *,
.home-poster-card > *,
.home-collection-card > *,
.home-genre-card > * {
  position: relative;
  z-index: 3;
}

.home-hero-poster {
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.26s ease;
}

.home-hero-main-meta {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 11px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.home-hero-main-title {
  font-size: 46px;
  line-height: 1.02;
  max-width: 74%;
  font-weight: 900;
}

.home-hero-main-button {
  align-self: flex-start;
  min-width: 150px;
  justify-content: center;
}

.home-hero-main-empty {
  display: grid;
  place-items: center;
}

.home-hero-side-rail {
  display: grid;
  gap: 12px;
  grid-auto-rows: minmax(0, 1fr);
}

.home-hero-side-card {
  min-height: 148px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  padding: 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .home-hero-main:hover,
  .home-hero-side-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(63, 225, 255, 0.4);
    box-shadow:
      0 16px 34px rgba(2, 8, 20, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .home-hero-main:hover .home-hero-poster,
  .home-hero-side-card:hover .home-hero-poster {
    transform: scale(1.04);
  }
}

.home-hero-side-title {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.home-hero-side-card-empty {
  display: grid;
  place-items: center;
}

.home-genre-rail,
.home-rank-rail,
.home-poster-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-genre-rail::-webkit-scrollbar,
.home-rank-rail::-webkit-scrollbar,
.home-poster-rail::-webkit-scrollbar,
.home-hero-side-rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.home-hero-side-rail {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-genre-rail:focus-visible,
.home-rank-rail:focus-visible,
.home-poster-rail:focus-visible,
.home-hero-side-rail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.home-genre-card {
  flex: 0 0 320px;
  min-height: 240px;
  padding: 18px;
  text-decoration: none;
  background: radial-gradient(130% 140% at 0% 100%, rgba(45, 212, 255, 0.12), rgba(15, 17, 23, 0.95) 58%);
  scroll-snap-align: start;
}

.home-genre-card h3 {
  margin: 0;
  max-width: 92%;
  font-size: clamp(24px, 2.45vw, 32px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.home-genre-stack {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  height: 150px;
}

.home-genre-poster {
  position: absolute;
  inset: auto auto 0 0;
  width: 120px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transform: translateX(calc(var(--stack-index) * 56px)) rotate(calc((var(--stack-index) - 1.5) * 5deg));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.home-genre-card-empty {
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--muted);
}

.home-rank-card {
  flex: 0 0 235px;
  text-decoration: none;
  display: grid;
  gap: 10px;
  background: transparent;
  border: none;
  overflow: visible;
  scroll-snap-align: start;
}

.home-rank-index {
  position: absolute;
  left: -10px;
  top: 42px;
  font-size: 182px;
  line-height: 0.75;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 2px rgba(188, 255, 79, 0.72);
  text-shadow: 0 0 22px rgba(188, 255, 79, 0.32);
  z-index: 1;
  pointer-events: none;
}

.home-rank-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
  z-index: 2;
}

.home-rank-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.03), rgba(10, 12, 18, 0.35));
}

.home-rank-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #f5f7fb;
  padding-left: 12px;
}

.home-rank-card-empty {
  min-height: 220px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.home-poster-card {
  flex: 0 0 220px;
  aspect-ratio: 2 / 3;
  text-decoration: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  scroll-snap-align: start;
}

.home-poster-title {
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.62);
}

.home-poster-meta {
  display: inline-flex;
  align-self: flex-start;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(6, 8, 12, 0.4);
  padding: 4px 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
}

.home-collection-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-collection-card {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
}

.home-collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.1), rgba(11, 14, 20, 0.84));
}

.home-collection-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.home-collection-card strong {
  font-size: 26px;
  line-height: 1.14;
}

.home-collection-card-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
}

.home-cinema {
  gap: 34px;
  padding: 8px 4px 10px;
}

.home-spotlight {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: min(620px, 72vh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 64%, var(--accent) 36%);
  border-radius: 34px;
  padding: clamp(22px, 5vw, 54px);
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 255, 0.24), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(255, 201, 106, 0.17), transparent 32%),
    linear-gradient(135deg, rgba(7, 10, 16, 0.98), rgba(11, 14, 24, 0.92));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.46);
}

.home-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 10, 16, 0.96) 0%, rgba(7, 10, 16, 0.75) 44%, rgba(7, 10, 16, 0.42) 100%),
    linear-gradient(0deg, rgba(7, 10, 16, 0.9) 0%, transparent 58%);
}

.home-spotlight-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--poster-image, none);
  background-size: cover;
  background-position: center 24%;
  opacity: 0.36;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.03);
}

.home-spotlight-noise {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 38% 34%, #000 0%, transparent 76%);
}

.home-spotlight-content {
  max-width: 820px;
  display: grid;
  gap: 16px;
}

.home-eyebrow,
.home-section-kicker,
.home-card-kicker,
.home-resume-label {
  color: color-mix(in srgb, var(--accent) 82%, var(--text) 18%);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-spotlight h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.home-spotlight-copy {
  max-width: 620px;
  margin: 0;
  color: rgba(245, 247, 251, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

.home-spotlight-actions,
.home-spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.home-spotlight-actions {
  margin-top: 4px;
}

.home-spotlight-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 64%, var(--border));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 24%, transparent);
}

.home-spotlight .button.ghost {
  color: #fff;
}

.home-spotlight-meta span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(6, 8, 12, 0.34);
  padding: 6px 11px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.home-watch-resume-card {
  align-self: center;
  justify-self: end;
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--accent) 28%);
  border-radius: 22px;
  padding: 16px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 88%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)),
    color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 12%, transparent);
}

.home-watch-resume-card.has-resume-cover {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.home-resume-cover {
  align-self: center;
  justify-self: start;
  width: 100%;
  min-height: 0;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--text) 18%);
  background-image:
    var(--poster-image),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2) 78%), color-mix(in srgb, var(--accent-2) 18%, var(--surface) 82%));
  background-size: cover, cover;
  background-position: center, center;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.home-resume-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-watch-resume-card strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
}

.home-resume-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.home-resume-content .button {
  align-self: flex-start;
  padding: 8px 15px;
}

.home-spotlight-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(128px, 176px));
  grid-auto-rows: unset;
  justify-content: space-between;
  gap: 14px;
}

.home-spotlight-rail .home-hero-side-card {
  aspect-ratio: 2 / 3;
  min-height: 0;
  padding: 0;
}

.home-spotlight-rail .home-hero-side-card::before {
  display: none;
}

.home-spotlight-rail .home-hero-side-card::after {
  display: block;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.03), rgba(6, 8, 12, 0.58));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.home-spotlight-rail .home-hero-poster {
  background-image:
    var(--poster-image),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface-2) 82%), color-mix(in srgb, var(--accent-2) 16%, var(--surface) 84%));
  background-size: cover;
  background-position: center;
}

.home-spotlight-rail .home-hero-side-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.86);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.home-spotlight-rail .home-hero-side-card:hover::after,
.home-spotlight-rail .home-hero-side-card:focus-visible::after {
  opacity: 1;
}

.home-spotlight-rail .home-hero-side-card:hover .home-hero-side-title,
.home-spotlight-rail .home-hero-side-card:focus-visible .home-hero-side-title {
  opacity: 1;
  transform: translateY(0);
}

.home-spotlight-rail .home-hero-side-card-empty {
  aspect-ratio: auto;
  min-height: 178px;
  padding: 14px;
}

.home-spotlight-rail .home-hero-side-card-empty .home-hero-side-title {
  display: block;
}

.home-signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-signal-strip a {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, var(--accent) 24%);
  border-radius: 22px;
  padding: 17px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 92%, transparent), color-mix(in srgb, var(--surface) 96%, transparent));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-signal-strip a::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0.46;
}

.home-signal-strip span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.home-signal-strip strong {
  font-size: 22px;
  line-height: 1.08;
}

.home-card-kicker {
  display: block;
  margin-bottom: 8px;
}

.home-news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .home-signal-strip a:hover {
    transform: translateY(-3px);
    border-color: rgba(45, 212, 255, 0.34);
    box-shadow: 0 16px 34px rgba(2, 8, 20, 0.38);
  }
}

.filters {
  margin: 24px 0;
}

.filter-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
}

.filter-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.filter-actions .button {
  min-height: 36px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.filter-item label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.filter-item input,
.filter-item select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 8px 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 360px;
  box-shadow: inset 0 1px 0 var(--card-highlight);
}

.case-opening {
  position: relative;
  overflow: hidden;
}

.case-opening::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, rgba(45, 212, 255, 0.0), rgba(45, 212, 255, 0.6), rgba(45, 212, 255, 0.0));
  animation: caseSpin 1.2s linear infinite;
  opacity: 0.6;
}

@keyframes caseSpin {
  to { transform: rotate(360deg); }
}

.case-wheel {
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-height: 98px;
  transition: min-height 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.case-wheel::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(45, 212, 255, 0), rgba(45, 212, 255, 0.95), rgba(45, 212, 255, 0));
  pointer-events: none;
  z-index: 2;
}

.case-wheel-track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 98px;
  will-change: transform;
  transition: padding 0.35s ease, min-height 0.35s ease, gap 0.35s ease;
}

.case-wheel-item {
  width: 92px;
  min-width: 92px;
  display: grid;
  justify-items: center;
  gap: 5px;
  background: var(--surface);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.35s ease, width 0.35s ease, min-width 0.35s ease;
}

.case-wheel-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.case-wheel-thumb.is-fallback {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.18), rgba(255, 122, 162, 0.18));
}

.case-wheel-label {
  width: 100%;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-wheel.is-spinning {
  min-height: 118px;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border) 40%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent), 0 12px 34px rgba(0, 0, 0, 0.28);
}

.case-wheel.is-spinning .case-wheel-track {
  min-height: 118px;
  padding: 12px 14px;
  gap: 10px;
}

.case-wheel.is-spinning .case-wheel-item {
  width: 102px;
  min-width: 102px;
  transform: scale(1.04);
}

.case-drop-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: flex-start;
}

.case-head-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.case-loot-panel,
.case-spin-panel {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.case-head-panel h1,
.case-head-panel p {
  margin: 0;
}

.case-drop-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-height: 86px;
  width: 100%;
}

.case-spin-panel {
  position: relative;
}

.case-drop-thumb {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.case-drop-thumb.is-empty {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.18), rgba(255, 122, 162, 0.18));
}

.case-drop-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.card-cover {
  height: 160px;
  background-size: cover;
  background-position: center;
  display: block;
}

.poster-cover {
  position: relative;
  overflow: hidden;
  background-color: var(--surface-3);
}

.poster-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: top center;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.55;
}

.poster-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 11, 16, 0.08), rgba(9, 11, 16, 0.3));
}

.poster-cover .poster-media {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: top center;
  transform: scale(1.04);
  transform-origin: center;
}

.poster-cover > :not(.poster-media) {
  position: relative;
  z-index: 3;
}

.card-cover.poster-cover {
  height: auto;
  aspect-ratio: 2 / 3;
}

.card-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

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

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.catalog-card {
  min-height: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  transform-origin: center;
}

.catalog-card-cover {
  position: relative;
  height: 260px;
}

.catalog-card-cover.poster-cover {
  height: auto;
}

.catalog-card-cover.poster-cover::before {
  content: none;
}

.catalog-card-cover .poster-media {
  transform: none;
  transition: transform 0.26s ease;
}

@media (hover: hover) and (pointer: fine) {
  .catalog-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(63, 225, 255, 0.4);
    box-shadow:
      0 16px 34px rgba(2, 8, 20, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .catalog-card:hover .catalog-card-cover .poster-media {
    transform: scale(1.025);
  }
}

.catalog-rating-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(12, 16, 24, 0.25);
  background: #3bb35a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.catalog-rating-badge-empty {
  background: rgba(8, 12, 20, 0.86);
  border-color: rgba(255, 255, 255, 0.18);
}

.catalog-card-body {
  padding: 14px 16px 16px;
  gap: 8px;
}

.catalog-card-body h3 {
  line-height: 1.25;
  min-height: 44px;
}

.catalog-card-meta {
  margin-bottom: 2px;
}

.catalog-chip-row {
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
}

.catalog-chip {
  flex: 0 1 calc(50% - 4px);
  min-width: 0;
  max-width: calc(50% - 4px);
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 10px;
}

.catalog-load-more {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 24px;
}

.catalog-load-more .chip-row {
  justify-content: center;
}

.catalog-load-status {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
}

.catalog-load-sentinel {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.news-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.news-feed-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.news-feed-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 12px;
}

.news-feed-item-no-cover {
  grid-template-columns: 1fr;
}

.news-feed-item .news-feed-body:only-child {
  grid-column: 1 / -1;
}

.news-feed-cover {
  min-height: 130px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  display: block;
}

.news-feed-body {
  display: grid;
  gap: 8px;
}

.news-feed-body h3 {
  margin: 0;
}

.news-feed-body p {
  margin: 0;
  color: var(--muted);
}

.news-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.news-card-cover {
  height: 180px;
}

.news-detail {
  display: grid;
  gap: 14px;
}

.news-detail-cover {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.news-detail-body h1 {
  margin: 0;
}

.news-detail-text {
  font-size: 15px;
  line-height: 1.6;
}

.news-admin-thumb {
  width: 220px;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.empty {
  grid-column: 1 / -1;
  background: var(--surface);
  border-radius: 22px;
  padding: 32px;
  border: 1px dashed var(--border);
  text-align: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border);
}

.detail-cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  background-color: var(--surface-3);
  border: 1px solid var(--border);
}

.detail-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: top center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.56;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 11, 16, 0.08), rgba(9, 11, 16, 0.32));
}

.detail-cover-media {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: var(--poster-image);
  background-size: cover;
  background-position: top center;
  transform: scale(1.05);
  transform-origin: center;
}

.detail-info h1 {
  margin-top: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(63, 225, 255, 0.12);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.meta-grid span {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.detail-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-disclaimer {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-panels {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
}

.panel h2 {
  margin-top: 0;
}

.panel[id] {
  scroll-margin-top: 120px;
}

.panel-list {
  display: grid;
  gap: 12px;
}

.panel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.episode-panel-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.episode-panel-link:hover {
  border-color: rgba(45, 212, 255, 0.35);
}

.title-episode-dubs {
  margin-top: 8px;
}

.panel-title {
  font-weight: 600;
}

.panel-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--accent);
  font-size: 12px;
}

.manga-volume-list {
  display: grid;
  gap: 16px;
}

.manga-volume-group {
  display: grid;
  gap: 10px;
}

.manga-volume-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manga-volume-heading h3 {
  margin: 0;
}

.manga-chapter-item {
  align-items: center;
}

.manga-chapter-title {
  font-weight: 700;
}

.manga-chapter-actions {
  justify-content: flex-end;
}

.manga-reader-panel {
  display: grid;
  gap: 16px;
}

.manga-reader-panel-scroll {
  padding: 0;
  border: 0;
  background: transparent;
}

.manga-reader-panel-page {
  padding: 14px;
}

.manga-reader-scroll {
  display: grid;
  gap: 0;
  justify-items: center;
}

.manga-reader-page {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 92%, #000 8%);
}

.manga-reader-panel-scroll .manga-reader-page {
  width: min(100%, 1040px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.manga-reader-page img {
  display: block;
  width: 100%;
  height: auto;
}

.manga-reader-single {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.manga-reader-page-single {
  width: min(1240px, 100%);
  border-radius: 10px;
}

.manga-reader-nav {
  justify-content: center;
  align-items: center;
}

.people-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.people-row {
  align-items: flex-start;
  gap: 12px;
}

.people-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.people-chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 46%, transparent) transparent;
}

.people-chat-message.panel-item {
  display: grid;
  gap: 7px;
  width: min(88%, 520px);
  align-items: stretch;
  justify-content: stretch;
  padding: 13px 15px;
  line-height: 1.45;
}

.people-chat-message.is-mine {
  align-self: flex-end;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface-2)), var(--surface-2));
}

.people-chat-message.is-theirs {
  align-self: flex-start;
}

.people-chat-message-author {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.people-chat-message-body {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
}

.people-chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.people-chat-message-meta span + span::before {
  content: "•";
  margin-right: 6px;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.people-message-form {
  margin-top: 14px;
}

.people-message-compose {
  display: grid;
  gap: 10px;
}

.people-message-compose .form-field {
  margin-bottom: 0;
}

.people-message-compose textarea {
  min-height: 110px;
  resize: vertical;
}

.people-message-compose .button {
  width: min(280px, 100%);
  justify-self: end;
}

.profile-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border);
}

.profile-summary-card {
  grid-template-columns: 140px 1fr 100px;
  align-items: stretch;
}

.profile-summary-main {
  display: grid;
  gap: 14px;
}

.profile-summary-meta-row {
  display: flex;
  justify-content: flex-end;
}

.profile-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.profile-summary-head h1 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-user-id {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--chip-bg);
}

.profile-last-seen-chip {
  display: inline-flex;
  align-items: center;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(20, 24, 33, 0.58);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="light"] .profile-last-seen-chip {
  background: rgba(255, 255, 255, 0.7);
}

body[data-theme="red"] .profile-last-seen-chip {
  background: rgba(48, 22, 30, 0.58);
}

body[data-theme="gradient"] .profile-last-seen-chip {
  background: rgba(23, 33, 62, 0.58);
}

body[data-theme="purple"] .profile-last-seen-chip {
  background: rgba(44, 27, 75, 0.6);
}

.profile-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  background-image: var(--avatar-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--surface-3);
  border: 1px solid var(--border);
}

.avatar-media {
  display: none;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.profile-stats > div:nth-child(5) {
  grid-column: 1;
}

.profile-stats > div:nth-child(6) {
  grid-column: 2;
}

.profile-stats > div:nth-child(7) {
  grid-column: 3;
}

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

.profile-xp-sidebar {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 12px 10px;
}

.profile-xp-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-xp-rail {
  width: 20px;
  height: 130px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.profile-xp-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #39d2ff 0%, #ff7aa2 100%);
}

.profile-xp-meta {
  font-size: 12px;
  text-align: center;
}

.profile-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.profile-stat-cards .panel-item {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.profile-stat-cards .panel-item strong {
  font-size: 18px;
}

.profile-charts-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.profile-chart-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
}

.profile-chart-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.profile-chart-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
}

.profile-pie {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.profile-chart-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.profile-chart-legend li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  padding: 7px 10px;
}

.profile-chart-legend-item {
  border-left: 3px solid var(--segment-color);
}

.profile-chart-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--segment-color);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.profile-chart-legend-item strong {
  color: var(--segment-color);
}

.profile-chart-legend-item--extra {
  display: none !important;
}

.profile-chart-legend.is-expanded .profile-chart-legend-item--extra {
  display: flex !important;
}

.profile-chart-toggle {
  margin-top: 10px;
}

.login {
  display: grid;
  place-items: center;
  min-height: 60vh;
}

.login-panel {
  width: min(420px, 100%);
}

.logout-form {
  margin: 0;
}

.admin-card {
  margin-bottom: 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-form textarea {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
}

.upload-status {
  display: none;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  gap: 8px;
}

.upload-status.active {
  display: grid;
}

.upload-form.is-uploading {
  opacity: 0.8;
}

.upload-status progress {
  width: 100%;
  height: 8px;
}

.upload-status progress[data-indeterminate="1"] {
  opacity: 0.95;
}

.upload-status progress[data-indeterminate="1"]::-webkit-progress-value {
  background-image: linear-gradient(
    90deg,
    rgba(79, 196, 244, 0.85) 0%,
    rgba(255, 122, 176, 0.9) 50%,
    rgba(79, 196, 244, 0.85) 100%
  );
  background-size: 240px 100%;
  animation: upload-indeterminate-stripes 1.1s linear infinite;
}

.upload-status progress[data-indeterminate="1"]::-moz-progress-bar {
  background-image: linear-gradient(
    90deg,
    rgba(79, 196, 244, 0.85) 0%,
    rgba(255, 122, 176, 0.9) 50%,
    rgba(79, 196, 244, 0.85) 100%
  );
  background-size: 240px 100%;
  animation: upload-indeterminate-stripes 1.1s linear infinite;
}

@keyframes upload-indeterminate-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 240px 0;
  }
}

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

.admin-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-form input[type="file"] {
  max-width: 260px;
}

.admin-home-hero-live-preview {
  margin-top: 12px;
}

.admin-home-hero-preview {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.admin-home-hero-card {
  position: relative;
  min-height: 120px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 82%, #000 18%);
  display: grid;
  gap: 8px;
  align-content: end;
  padding: 10px;
}

.admin-home-hero-card.is-main {
  min-height: 256px;
}

.admin-home-hero-card:not(.is-empty)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.08), rgba(8, 10, 16, 0.88));
  z-index: 1;
}

.admin-home-hero-card > * {
  position: relative;
  z-index: 2;
}

.admin-home-hero-card .poster-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.admin-home-hero-card .poster-media::before,
.admin-home-hero-card .poster-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--poster-image);
  background-position: center;
  background-repeat: no-repeat;
}

.admin-home-hero-card .poster-media::before {
  background-size: cover;
  filter: blur(10px);
  transform: scale(1.1);
  opacity: 0.65;
}

.admin-home-hero-card .poster-media::after {
  background-size: contain;
}

.admin-home-hero-card strong {
  font-size: 18px;
  line-height: 1.16;
}

.admin-home-hero-card .muted {
  color: rgba(255, 255, 255, 0.88);
}

.admin-home-hero-card.is-empty {
  border-style: dashed;
  align-content: center;
}

.admin-charts-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.admin-chart-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
}

.admin-chart-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.admin-bar-chart {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  align-items: end;
}

.admin-bar-item {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.admin-bar-value {
  font-size: 11px;
  color: var(--muted);
}

.admin-bar-track {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
}

.admin-bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #22d8e3, #0ea7b7);
  min-height: 2px;
}

.admin-bar-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

.admin-online-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 18px;
}

.admin-online-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.admin-online-card h3 {
  margin: 0;
  font-size: 15px;
}

.admin-online-chart {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  height: 170px;
   display: flex;
   align-items: stretch;
   gap: 8px;
   padding: 8px 10px 8px 6px;
  overflow: visible;
}

.admin-online-y-axis {
  position: relative;
  flex: 0 0 34px;
  font-size: 11px;
  color: var(--muted);
}

.admin-online-y-axis span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  white-space: nowrap;
}

.admin-online-plot {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.admin-online-plot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.admin-online-gridline {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 0.45;
  stroke-dasharray: 2 2;
}

.admin-online-area {
  fill: rgba(45, 212, 255, 0.15);
}

.admin-online-line {
  fill: none;
  stroke: #22d8e3;
  stroke-width: 1.7;
}

.admin-online-dot {
  fill: #7be8ff;
  pointer-events: none;
}

.admin-online-card[data-tone="day"] .admin-online-area {
  fill: rgba(255, 122, 162, 0.15);
}

.admin-online-card[data-tone="day"] .admin-online-line {
  stroke: #ff7aa2;
}

.admin-online-card[data-tone="day"] .admin-online-dot {
  fill: #ff9dbb;
}

.admin-online-card[data-tone="month"] .admin-online-area {
  fill: rgba(123, 131, 255, 0.16);
}

.admin-online-card[data-tone="month"] .admin-online-line {
  stroke: #8d93ff;
}

.admin-online-card[data-tone="month"] .admin-online-dot {
  fill: #b0b4ff;
}

.admin-online-hotspots {
  position: absolute;
  inset: 0;
}

.admin-online-hotspot {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.admin-online-hotspot::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  min-width: 170px;
  max-width: 240px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(8, 11, 18, 0.94);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 7;
}

.admin-online-hotspot:hover::after,
.admin-online-hotspot:focus-visible::after {
  opacity: 1;
}

.admin-online-axis {
  position: relative;
  height: 18px;
  margin-left: 42px;
  width: calc(100% - 42px);
  font-size: 11px;
  color: var(--muted);
}

.admin-online-axis span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.dub-stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  display: grid;
  gap: 8px;
}

.dub-stats-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.dub-stats-row > span:first-child {
  min-width: 0;
  line-height: 1.25;
}

.dub-stats-row > span:first-child a {
  color: var(--text);
  text-decoration: none;
}

.dub-stats-row > span:first-child a:hover {
  color: var(--accent);
}

.dub-stats-row .chip {
  white-space: nowrap;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.asset-list {
  display: grid;
  gap: 12px;
}

.asset-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.asset-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.asset-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bg-editor {
  margin: 12px 0;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 340px) minmax(260px, 1fr);
  align-items: start;
}

.bg-editor-visuals {
  display: grid;
  gap: 10px;
}

.bg-editor-preview {
  position: relative;
  min-height: 300px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background-color: var(--surface-3);
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: auto 100%;
  cursor: crosshair;
  overflow: hidden;
}

.bg-editor-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, transparent 49%, rgba(255, 255, 255, 0.2) 49%, rgba(255, 255, 255, 0.2) 51%, transparent 51%),
    linear-gradient(to bottom, transparent 49%, rgba(255, 255, 255, 0.2) 49%, rgba(255, 255, 255, 0.2) 51%, transparent 51%);
  pointer-events: none;
}

.bg-editor-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bg-editor-tip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.bg-site-mock {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 120px;
}

.bg-site-mock-side {
  position: relative;
  overflow: hidden;
  background-color: #090a0e;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 100%;
}

.bg-site-mock-side-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 100%;
  will-change: transform;
}

.bg-site-mock-center {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 17, 24, 0.95), rgba(10, 11, 16, 0.95));
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.bg-editor-controls {
  display: grid;
  gap: 8px;
}

.bg-editor-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 8px;
}

.bg-editor-row label {
  font-size: 13px;
  color: var(--muted);
}

.bg-editor-row input[type="range"] {
  width: 100%;
}

.bg-editor-row input[type="number"] {
  width: 100%;
}

.bg-editor-row-toggle {
  grid-template-columns: 110px 1fr;
}

.bg-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.bg-invert-button {
  min-width: 168px;
}

.bg-invert-button.is-active {
  border-color: rgba(45, 212, 255, 0.6);
  color: var(--accent);
}

.episode-admin-list {
  display: grid;
  gap: 14px;
}

.episode-admin-card {
  display: grid;
  gap: 14px;
}

.episode-admin-card h3 {
  margin: 0 0 8px;
}

.episode-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.episode-admin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.episode-admin-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.episode-admin-block h4 {
  margin: 0 0 10px;
}

.episode-admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.episode-admin-actions .async-form {
  display: grid;
  gap: 8px;
}

.episode-admin-actions .async-form .upload-status {
  min-width: 220px;
}

.episode-item-list {
  display: grid;
  gap: 10px;
}

.episode-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.episode-item-variant {
  align-items: center;
}

.episode-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.episode-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.episode-inline-form input,
.episode-inline-form select {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  min-width: 120px;
}

.episode-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.episode-check input {
  margin: 0;
  width: auto;
}

.episode-file-path {
  margin-top: 4px;
  font-size: 12px;
  word-break: break-all;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field input {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.form-field select {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.admin-select-search {
  display: grid;
  gap: 8px;
}

.admin-select-search input {
  width: 100%;
}

.admin-select-search select[data-select-search-target] {
  padding: 8px 10px;
  line-height: 1.35;
}

.admin-select-search-native-hidden {
  display: none !important;
}

.admin-visual-picker {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 6px;
  display: grid;
  gap: 6px;
}

.admin-visual-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 7px 8px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.admin-visual-option:hover {
  border-color: rgba(45, 212, 255, 0.35);
  background: rgba(45, 212, 255, 0.1);
}

.admin-visual-option.is-selected {
  border-color: rgba(45, 212, 255, 0.68);
  background: rgba(45, 212, 255, 0.16);
}

.admin-visual-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
}

.admin-visual-thumb.is-fallback {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.18), rgba(255, 122, 162, 0.18));
  font-size: 16px;
}

.admin-visual-label {
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  word-break: break-word;
}

.admin-visual-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-select-search-meta {
  min-height: 16px;
  font-size: 12px;
  color: var(--muted);
}

.form-errors {
  background: rgba(255, 92, 133, 0.15);
  border: 1px solid rgba(255, 92, 133, 0.3);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.field-errors {
  color: #ff8ca7;
  font-size: 12px;
  margin-top: 6px;
}

.footer {
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: inherit;
  border-bottom: 1px dashed transparent;
}

.footer-contacts a:hover {
  color: var(--text);
  border-bottom-color: currentColor;
}

.muted {
  color: var(--muted);
}

.comment-list {
  gap: 10px;
}

.comment-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
}

.comment-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  background-color: var(--surface-3);
}

.comment-avatar-link {
  display: block;
  line-height: 0;
}

.comment-body {
  display: grid;
  gap: 6px;
}

.comment-header {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.comment-header .panel-title a {
  color: inherit;
  text-decoration: none;
}

.comment-header .panel-title a:hover {
  text-decoration: underline;
}

.comment-card--staff {
  border-color: rgba(45, 212, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 255, 0.15);
}

/* Future-ready style presets for special comments. */
.comment-card--neon {
  border-color: rgba(255, 122, 162, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 162, 0.2);
}

.comment-card--gold {
  border-color: rgba(255, 214, 102, 0.65);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.22);
}

.review-reactions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.review-reaction-form {
  margin: 0;
}

.review-reaction-form .review-reaction-chip {
  cursor: pointer;
  font: inherit;
}

.review-reaction-chip.is-active {
  color: var(--text);
  border-color: rgba(45, 212, 255, 0.6);
  background: rgba(45, 212, 255, 0.18);
}

.review-reaction-chip.is-active.is-negative {
  border-color: rgba(255, 122, 162, 0.65);
  background: rgba(255, 122, 162, 0.2);
}

.watch-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.watch-title-block h1 {
  margin-bottom: 0;
}

.watch-back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.watch-head-actions,
.watch-episode-nav-actions,
.watch-autonext-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.watch-next-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 58%, #fff 42%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 26%, transparent);
}

.watch-player-panel {
  margin-bottom: 16px;
}

.watch-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.watch-panel-head h2 {
  margin: 0 0 6px;
}

.watch-player-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.watch-player-option {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.watch-player-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.watch-player-option:hover,
.watch-player-option.is-active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  box-shadow: inset 0 1px 0 var(--card-highlight), 0 14px 32px color-mix(in srgb, var(--accent) 16%, transparent);
}

.watch-player-option.is-active::after {
  content: "Выбран";
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.watch-hotkey-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.watch-episode-nav {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.watch-episode-nav h2 {
  margin: 0 0 6px;
}

.watch-autonext {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

.watch-autonext[hidden] {
  display: none;
}

.watch-autonext p {
  margin: 4px 0 0;
}

.player-status {
  margin-top: 10px;
  font-size: 13px;
}

.player-video-wrap {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #07090e;
}

.player-video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-artplayer-wrap {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #07090e;
  min-height: 320px;
}

.player-artplayer-wrap .artplayer-app {
  width: 100%;
  min-height: 320px;
}

.player-iframe-wrap {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0c0d10;
}

.player-iframe-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  border: 0;
}

.audio-track-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.audio-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.audio-track-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.audio-track-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 255, 0.45);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audio-track-meta {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audio-track-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-track-rating-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.audio-track-rating-form input[type="number"] {
  width: 76px;
}

.watch-track-select {
  min-width: 200px;
}

.watch-track-select.is-active {
  color: var(--text);
  border-color: rgba(45, 212, 255, 0.65);
  background: rgba(45, 212, 255, 0.18);
}

.watch-quality-button {
  cursor: pointer;
  font: inherit;
}

.watch-quality-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.watch-quality-inline {
  margin-top: 12px;
}

.watch-ad-banner-panel {
  padding: 12px;
}

.watch-ad-banner-link {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.watch-ad-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.watch-ad-banner-link:hover .watch-ad-banner-image {
  filter: brightness(1.04);
}

.watch-party-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.watch-party-link-input {
  flex: 1 1 420px;
  min-width: 220px;
}

.watch-party-friends-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.watch-party-friend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.watch-party-friend-item input[type="checkbox"] {
  accent-color: var(--accent);
}

.watch-party-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-avatar-preview-wrap {
  margin-bottom: 10px;
}

.profile-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-image: var(--avatar-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-avatar-preview-media {
  display: none;
}

.profile-bg-preview-wrap {
  margin: 14px 0 10px;
}

.profile-bg-site-preview {
  min-height: 190px;
}

.profile-bg-site-preview .bg-site-mock-side {
  min-height: 190px;
}

.profile-bg-site-preview .bg-site-mock-center {
  font-size: 13px;
}

.custom-theme-form {
  margin-top: 14px;
}

.custom-theme-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.custom-theme-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.custom-theme-color-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.custom-theme-color-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.custom-theme-color-field input[type="color"] {
  width: 100%;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 12px;
  padding: 4px;
  background: var(--surface);
  cursor: pointer;
}

.custom-theme-color-field em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.custom-theme-preview {
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 42%),
    radial-gradient(circle at 100% 8%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 38%),
    var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.custom-theme-preview-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.custom-theme-preview-top span {
  color: var(--accent);
  font-weight: 800;
}

.custom-theme-preview-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.custom-theme-preview-card h3 {
  margin: 0;
  color: var(--text);
}

.custom-theme-preview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.custom-theme-preview-card .button {
  width: fit-content;
}

.trade-partner-picker {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.trade-compose-panel h2,
.trade-column h3,
.trade-side h4 {
  margin-top: 0;
}

.trade-offer-form {
  display: grid;
  gap: 14px;
}

.trade-meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trade-columns {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.trade-column {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 12px;
}

.trade-inventory-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.trade-asset-card {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 156px;
  cursor: pointer;
}

.trade-asset-card input[type="checkbox"] {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}

.trade-asset-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
}

.trade-asset-preview.is-empty {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.18), rgba(255, 122, 162, 0.18));
}

.trade-asset-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.trade-asset-type {
  font-size: 12px;
  color: var(--muted);
}

.trade-cards {
  display: grid;
  gap: 12px;
}

.trade-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.trade-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.trade-card-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.trade-side {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.trade-mini-list {
  display: grid;
  gap: 8px;
}

.trade-mini-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.trade-mini-preview {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
}

.trade-mini-preview.is-empty {
  background: linear-gradient(160deg, rgba(45, 212, 255, 0.18), rgba(255, 122, 162, 0.18));
}

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

.trade-card-actions form {
  margin: 0;
}

.trade-counter-block {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px;
}

.trade-counter-block summary {
  cursor: pointer;
  font-weight: 600;
}

.trade-counter-form {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.market-compose-form {
  display: grid;
  gap: 14px;
}

.market-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.upgrade-battle-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 420px) minmax(240px, 1fr);
  align-items: start;
}

.upgrade-battle-center {
  justify-items: center;
  text-align: center;
}

.upgrade-battle-status {
  min-height: 44px;
}

.upgrade-battle-summary,
.upgrade-battle-results {
  justify-content: center;
}

.upgrade-battle-results {
  min-height: 36px;
}

.upgrade-card-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.upgrade-choice-card {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  min-height: 86px;
  transition:
    transform 0.12s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.upgrade-choice-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
}

.upgrade-choice-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 58%, #fff 42%);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent);
}

.upgrade-choice-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.upgrade-choice-card .trade-asset-name,
.upgrade-choice-card .trade-asset-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-choice-preview {
  width: 60px;
  min-height: 84px;
  aspect-ratio: auto;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.upgrade-spin-wheel-wrap-inline {
  margin-top: 6px;
  margin-bottom: 4px;
  width: min(240px, 66vw);
}

body.upgrade-open-lock {
  overflow: hidden;
}

.upgrade-spin-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.84);
  backdrop-filter: blur(4px);
}

.upgrade-spin-overlay[hidden] {
  display: none !important;
}

.upgrade-spin-card {
  width: min(560px, 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, #000 12%), var(--surface));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  padding: 18px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.upgrade-spin-card > h3,
.upgrade-spin-card > .muted {
  margin: 0;
  text-align: center;
}

.upgrade-spin-wheel-wrap {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.upgrade-spin-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 20px solid color-mix(in srgb, var(--text) 92%, #fff 8%);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.upgrade-spin-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--border) 72%, #fff 28%);
  background:
    conic-gradient(
      from -90deg,
      color-mix(in srgb, var(--accent) 74%, #22d3ee 26%) 0deg var(--upgrade-success-deg, 90deg),
      color-mix(in srgb, #ef4444 82%, #7f1d1d 18%) var(--upgrade-success-deg, 90deg) 360deg
    );
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.05), 0 12px 34px rgba(0, 0, 0, 0.45);
  will-change: transform;
  transform: rotate(0deg);
}

.upgrade-spin-wheel::after {
  content: '';
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 85%, #000 15%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

#card-upgrade-result-row {
  justify-content: center;
  min-height: 38px;
}

#card-upgrade-close,
#card-upgrade-close.button,
#card-upgrade-close.button.ghost {
  background: transparent !important;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)) !important;
  box-shadow: none !important;
}

#card-upgrade-close:hover,
#card-upgrade-close.button:hover,
#card-upgrade-close.button.ghost:hover,
#card-upgrade-close:active,
#card-upgrade-close.button:active,
#card-upgrade-close.button.ghost:active {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent) !important;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)) !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .home-cinema {
    gap: 20px;
  }

  .home-cinema-head h2 {
    font-size: 28px;
  }

  .home-hero-main {
    min-height: 330px;
    padding: 16px;
  }

  .home-hero-main-title {
    font-size: 34px;
    max-width: 100%;
  }

  .home-hero-main-button {
    min-width: 130px;
  }

  .home-hero-side-card {
    min-height: 118px;
  }

  .home-genre-card {
    flex-basis: 255px;
    min-height: 210px;
    padding: 14px;
  }

  .home-genre-card h3 {
    font-size: 28px;
  }

  .home-genre-stack {
    left: 16px;
    right: 16px;
  }

  .home-genre-poster {
    width: 95px;
    height: 126px;
    transform: translateX(calc(var(--stack-index) * 44px)) rotate(calc((var(--stack-index) - 1.5) * 4deg));
  }

  .home-rank-card {
    flex-basis: 200px;
  }

  .home-rank-index {
    top: 34px;
    left: -6px;
    font-size: 140px;
  }

  .home-rank-title {
    font-size: 19px;
    padding-left: 8px;
  }

  .home-poster-card {
    flex-basis: 170px;
  }

  .home-poster-title {
    font-size: 17px;
  }

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

  .upgrade-battle-layout {
    grid-template-columns: 1fr;
  }

  .upgrade-card-grid {
    max-height: 300px;
  }

  .upgrade-choice-card {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 76px;
    padding: 7px;
  }

  .upgrade-choice-preview {
    width: 52px;
    min-height: 72px;
  }

  .upgrade-battle-center {
    order: -1;
  }

  .upgrade-spin-wheel-wrap-inline {
    width: min(210px, 72vw);
  }

  .upgrade-spin-card {
    padding: 14px;
    border-radius: 14px;
  }

  .upgrade-spin-pointer {
    border-left-width: 11px;
    border-right-width: 11px;
    border-top-width: 16px;
  }
}

.pack-shop-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 250px));
  justify-content: flex-start;
  align-items: start;
}

.pack-shop-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 84%, #000 16%), var(--surface));
  display: grid;
  gap: 12px;
  padding: 12px;
  max-width: 250px;
}

.pack-shop-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 78%, #fff 22%);
  border-radius: 12px;
  min-height: 0;
  aspect-ratio: 3 / 4.4;
  display: grid;
  place-items: center;
  padding: 24px 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 70%, #151722 30%), color-mix(in srgb, var(--surface) 76%, #0d1018 24%));
}

.pack-shop-visual.has-art {
  background-image: var(--pack-art);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.pack-shop-visual::before,
.pack-shop-visual::after {
  content: none;
}

.pack-shop-fallback {
  font-size: 56px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.pack-shop-body {
  display: grid;
  gap: 10px;
}

.pack-shop-body .muted {
  margin: 0;
}

.pack-shop-actions {
  margin: 0;
}

.pack-content-details summary {
  cursor: pointer;
  font-weight: 600;
}

body.pack-open-lock {
  overflow: hidden;
}

.pack-open-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pack-open-overlay.is-closing {
  animation: pack-overlay-hide 0.18s ease forwards;
}

@keyframes pack-overlay-hide {
  from { opacity: 1; }
  to { opacity: 0; }
}

.pack-open-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 8, 20, 0.9);
  backdrop-filter: blur(3px);
}

.pack-open-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.pack-open-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  padding: 0;
}

.pack-open-dialog > h2,
.pack-open-dialog > .muted {
  text-align: center;
}

.pack-open-dialog > .muted {
  margin-left: auto;
  margin-right: auto;
}

.pack-open-wrap {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: center;
}

.pack-open-stage {
  position: relative;
  width: min(460px, 94vw);
  min-height: min(680px, 82vh);
  display: grid;
  place-items: center;
}

.pack-open-pack {
  position: relative;
  width: min(390px, 86vw);
  aspect-ratio: 3 / 4.3;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.pack-open-pack.has-art {
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.45));
}

.pack-open-pack::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.12) 0%, rgba(8, 11, 18, 0.46) 60%, rgba(8, 11, 18, 0.66) 100%);
  z-index: 1;
  pointer-events: none;
}

.pack-open-pack.has-art::before {
  display: none;
}

.pack-open-pack-half {
  position: absolute;
  left: 0;
  right: 0;
  border: 2px solid rgba(18, 20, 28, 0.9);
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 82%, #0e111a 18%), color-mix(in srgb, var(--surface) 82%, #0e111a 18%));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.56s cubic-bezier(0.22, 0.81, 0.2, 1), opacity 0.46s ease;
  z-index: 0;
}

.pack-open-pack-half-top {
  top: 0;
  height: calc(50% + 2px);
  background-position: center top;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  transform-origin: center top;
}

.pack-open-pack-half-bottom {
  bottom: -2px;
  height: calc(50% + 2px);
  background-position: center bottom;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  transform-origin: center bottom;
}

.pack-open-pack.has-art .pack-open-pack-half {
  background-image: var(--pack-art);
  border: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(7, 10, 18, 0.78);
  box-shadow: none;
}

.pack-open-pack.has-art .pack-open-pack-half-top,
.pack-open-pack.has-art .pack-open-pack-half-bottom {
  top: 0;
  bottom: 0;
  height: auto;
}

.pack-open-pack.has-art .pack-open-pack-half-top {
  clip-path: inset(0 0 49.8% 0 round 14px 14px 0 0);
}

.pack-open-pack.has-art .pack-open-pack-half-bottom {
  clip-path: inset(49.8% 0 0 0 round 0 0 14px 14px);
}

.pack-open-pack-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 88px;
  z-index: 2;
  transition: opacity 0.24s ease;
}

.pack-open-pack-hint {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  z-index: 3;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.pack-open-pack-hint {
  bottom: 18px;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0.88;
}

.pack-open-pack:hover .pack-open-pack-hint {
  opacity: 1;
}

.pack-open-pack.is-opened .pack-open-pack-half-top {
  transform: translate(-26px, -200px) rotate(-12deg);
  opacity: 0;
}

.pack-open-pack.is-opened .pack-open-pack-half-bottom {
  transform: translate(26px, 200px) rotate(12deg);
  opacity: 0;
}

.pack-open-pack.is-opened .pack-open-pack-hint,
.pack-open-pack.is-opened .pack-open-pack-fallback {
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
}

.pack-open-pack[hidden],
.pack-drop-card[hidden] {
  display: none !important;
}

.pack-open-reveal-glow {
  position: absolute;
  width: min(420px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, #ffffff 66%) 0%, transparent 68%);
  opacity: 0.18;
  filter: blur(8px);
  pointer-events: none;
}

.pack-drop-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 14px;
  width: min(440px, 92vw);
  display: grid;
  gap: 10px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.pack-drop-media-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pack-drop-media {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.pack-drop-media.is-fallback {
  display: grid;
  place-items: center;
  font-size: 52px;
  background: var(--surface);
}

.pack-drop-card.is-visible {
  animation: pack-card-show 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pack-card-show {
  from { transform: scale(0.9) translateY(28px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1650;
  width: min(940px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, #000 6%);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 900px) {
  .admin-home-hero-preview {
    grid-template-columns: 1fr;
  }

  .admin-home-hero-card.is-main {
    min-height: 190px;
  }

  .custom-theme-layout {
    grid-template-columns: 1fr;
  }

  .cookie-consent {
    width: calc(100% - 20px);
    bottom: 10px;
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent .button {
    width: 100%;
  }

  .side-bg {
    display: none;
  }

  .topbar {
    padding: 10px 14px;
  }

  .topbar-main {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .brand {
    justify-self: flex-start;
  }

  .topnav {
    justify-self: stretch;
    width: 100%;
    justify-content: flex-start;
    border-radius: 18px;
    gap: 6px;
  }

  .topnav-catalog {
    width: auto;
  }

  .topnav-catalog-trigger {
    justify-content: center;
  }

  .topnav-catalog-menu,
  .topnav-more .topnav-catalog-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 8px;
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-actions .theme-select {
    max-width: none;
  }

  .user-chip {
    max-width: min(100%, 240px);
  }

  .topnav > a,
  .topnav-catalog-trigger {
    padding-inline: 11px;
  }

  .pack-shop-grid {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .pack-shop-card {
    max-width: none;
  }

  .pack-shop-visual {
    min-height: 0;
  }

  .pack-open-close {
    top: 12px;
    right: 12px;
  }

  .pack-open-dialog > .muted {
    max-width: 92%;
  }

  .pack-open-stage {
    min-height: min(620px, 78vh);
  }

  .pack-open-pack {
    width: min(340px, 88vw);
  }

  .people-layout {
    grid-template-columns: 1fr;
  }

  .people-chat-message.panel-item {
    width: min(96%, 520px);
  }

  .people-message-compose .button {
    width: 100%;
    justify-self: stretch;
  }

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

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

  .home-hero-side-rail {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    grid-auto-rows: 1fr;
    overflow-x: auto;
    padding-bottom: 8px;
  }

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

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

  .detail-cover {
    max-width: 320px;
    margin: 0 auto;
  }

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

  .profile-summary-card {
    grid-template-columns: 1fr;
  }

  .profile-summary-meta-row {
    justify-content: flex-start;
  }

  .profile-last-seen-chip {
    max-width: 100%;
  }

  .profile-summary-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .profile-stats > div:nth-child(5),
  .profile-stats > div:nth-child(6),
  .profile-stats > div:nth-child(7) {
    grid-column: auto;
  }

  .profile-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-panel-actions {
    justify-content: flex-start;
  }

  .profile-xp-sidebar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .profile-chart-layout {
    grid-template-columns: 1fr;
  }

  .profile-pie {
    width: 130px;
    height: 130px;
  }

  .award-showcase-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .award-showcase-card {
    min-height: 0;
  }

  .award-showcase-media-wrap {
    aspect-ratio: 1 / 1.25;
  }

  .award-showcase-tooltip {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-top: 10px;
  }

  .bg-editor {
    grid-template-columns: 1fr;
  }

  .bg-editor-preview {
    min-height: 220px;
  }

  .bg-editor-row {
    grid-template-columns: 1fr;
  }

  .bg-editor-row-toggle {
    grid-template-columns: 1fr;
  }

  .bg-site-mock {
    grid-template-columns: 44px 1fr 44px;
    min-height: 96px;
  }

  .episode-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .episode-item-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .episode-inline-form {
    width: 100%;
  }

  .comment-card {
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .comment-avatar {
    width: 42px;
    height: 42px;
  }

  .player-iframe-wrap iframe {
    min-height: 220px;
  }

  .audio-track-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .trade-partner-picker {
    align-items: stretch;
  }

  .trade-columns {
    grid-template-columns: 1fr;
  }

  .news-feed-item {
    grid-template-columns: 1fr;
  }

  .news-feed-cover {
    min-height: 180px;
  }

  .news-admin-thumb {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 900px) {
  .home-spotlight {
    grid-template-columns: 1fr;
    min-height: 560px;
  }

  .home-watch-resume-card {
    max-width: none;
    justify-self: stretch;
    width: 100%;
  }

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

  .home-spotlight-rail {
    grid-template-columns: repeat(5, minmax(132px, 156px));
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

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

  .watch-head,
  .watch-episode-nav {
    grid-template-columns: 1fr;
  }

  .watch-head-actions,
  .watch-episode-nav-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  .topbar {
    padding: 10px;
  }

  .topbar-main {
    gap: 8px;
  }

  .brand {
    min-height: 38px;
    padding-inline: 10px;
  }

  .brand-mark {
    font-size: 18px;
  }

  .brand-name {
    font-size: 16px;
  }

  .topnav {
    flex-wrap: nowrap;
    gap: 3px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .topnav > a,
  .topnav-catalog-trigger {
    min-height: 30px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .topnav-catalog-caret {
    font-size: 9px;
  }

  .top-actions {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .top-actions .theme-select {
    flex: 0 1 132px;
    max-width: 132px;
    min-height: 36px;
    font-size: 12px;
  }

  .user-chip {
    min-height: 36px;
    max-width: 138px;
    padding-right: 8px;
  }

  .user-chip-avatar {
    width: 26px;
    height: 26px;
  }

  .top-actions .button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .panel[id] {
    scroll-margin-top: 168px;
  }

  .home-spotlight {
    min-height: auto;
    border-radius: 24px;
    padding: 22px;
  }

  .home-spotlight::after {
    background:
      linear-gradient(180deg, rgba(7, 10, 16, 0.68) 0%, rgba(7, 10, 16, 0.95) 70%),
      linear-gradient(90deg, rgba(7, 10, 16, 0.74), rgba(7, 10, 16, 0.44));
  }

  .home-spotlight h1 {
    max-width: 100%;
    font-size: clamp(34px, 11vw, 50px);
    overflow-wrap: break-word;
  }

  .home-spotlight-actions {
    align-items: stretch;
  }

  .home-spotlight-actions .button {
    justify-content: center;
  }

  .home-spotlight-rail {
    grid-template-columns: repeat(5, minmax(126px, 148px));
  }

  .watch-panel-head,
  .watch-autonext {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .watch-player-option {
    min-height: 0;
  }

  .watch-head-actions .button,
  .watch-episode-nav-actions .button,
  .watch-autonext-actions,
  .watch-autonext-actions .button {
    width: 100%;
  }

  .watch-head-actions,
  .watch-episode-nav-actions,
  .watch-autonext-actions {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .home-watch-resume-card.has-resume-cover {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .home-resume-cover {
    min-height: 138px;
  }
}

@media (max-width: 520px) {
  .home-signal-strip {
    grid-template-columns: 1fr;
  }

  .home-spotlight-actions {
    flex-direction: column;
  }

  .home-spotlight-meta {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme="gradient"] {
    animation: none;
    background-position: 50% 50%;
  }

  .home-signal-strip a,
  .home-hero-main,
  .home-hero-side-card,
  .home-hero-poster,
  .catalog-card,
  .catalog-card-cover .poster-media {
    transition: none;
  }

  .catalog-card:hover,
  .catalog-card:hover .catalog-card-cover .poster-media {
    transform: none;
  }
}

[data-kill] {
  border-color: rgba(177, 120, 255, 0.78);
  color: #f2e7ff;
  background:
    linear-gradient(140deg, rgba(122, 68, 244, 0.36), rgba(215, 120, 255, 0.24));
}

body[data-theme="light"] [data-kill] {
  color: #4f2a8f;
  border-color: rgba(128, 72, 214, 0.65);
  background:
    linear-gradient(140deg, rgba(189, 156, 255, 0.48), rgba(238, 186, 255, 0.54));
}

