:root {
  --bg: #0b0b0b;
  --bg-elevated: #111111;
  --surface: #151515;
  --surface-2: #1b1b1b;
  --surface-3: #232323;
  --border: #272727;
  --border-strong: #3a3a3a;
  --overlay: rgba(0, 0, 0, 0.72);

  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --text-faint: #6f6f6f;

  --accent: #ff3b3b;
  --accent-hover: #ff5656;
  --accent-ink: #ffffff;

  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 64px;
  --max-w: 1160px;
  --radius: 0;
  --radius-sm: 0;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --surface-3: #e8e8e8;
  --border: #e4e4e4;
  --border-strong: #cfcfcf;
  --overlay: rgba(20, 20, 20, 0.5);

  --text: #141414;
  --text-dim: #565656;
  --text-faint: #8a8a8a;

  --accent: #e11d1d;
  --accent-hover: #c11515;
  --accent-ink: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(var(--max-w), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.header,
main,
.footer {
  position: relative;
  z-index: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 1200;
  transition: width 0.1s linear;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.logo b {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), opacity 0.2s var(--ease);
  white-space: nowrap;
}

.btn-sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: none;
}

.btn-ghost:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

main {
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 12vw, 150px);
  padding-top: calc(var(--nav-h) + clamp(56px, 11vw, 120px));
  padding-bottom: clamp(72px, 10vw, 120px);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 24px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: none;
  border-radius: 0;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--surface);
}

.hero-title {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 12ch;
}

.hero-subtitle {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13px;
}

.hero-meta span {
  padding: 5px 10px;
  border: none;
  border-radius: 0;
  background: var(--surface);
}

.feature {
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.9);
}

.feature-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}

.feature-media img,
.feature-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.feature-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-play svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  padding: 20px;
  box-sizing: content-box;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.25s var(--ease), background 0.2s var(--ease);
}

.feature-play:hover svg {
  transform: scale(1.08);
  background: var(--accent-hover);
}

.feature-play:disabled {
  cursor: default;
}

.feature-play:disabled svg {
  opacity: 0;
}

.feature-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-top: none;
}

.feature-kicker {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.feature-score {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 0;
  background: var(--surface-3);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-dim);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.65;
  margin-top: 6px;
}

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

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.catalog-heading {
  max-width: 52ch;
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease);
}

.search:focus-within {
}

.search svg {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex: 0 0 auto;
}

.search input {
  width: clamp(140px, 22vw, 220px);
  border: none;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.search input::placeholder {
  color: var(--text-faint);
}

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

.chip {
  padding: 7px 14px;
  border: none;
  border-radius: 0;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.chip:hover {
  color: var(--text);
}

.chip.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.shelf-wrap {
  position: relative;
}

.shelf {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}

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

.shelf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: var(--bg-elevated);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.shelf-wrap:hover .shelf-nav {
  opacity: 1;
}

.shelf-nav:hover {
  background: var(--surface-3);
}

.shelf-nav.prev {
  left: -10px;
}

.shelf-nav.next {
  right: -10px;
}

.shelf-nav svg {
  width: 20px;
  height: 20px;
}

.anime-card {
  flex: 0 0 auto;
  width: 172px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.anime-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.anime-card:hover .anime-poster,
.anime-card:focus-visible .anime-poster {
  transform: translateY(-4px);
}

.anime-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anime-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 0;
  background: var(--bg-elevated);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
}

.anime-badge svg {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.anime-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.anime-card:hover .anime-hover,
.anime-card:focus-visible .anime-hover {
  opacity: 1;
}

.anime-hover span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.anime-hover svg {
  width: 14px;
  height: 14px;
}

.anime-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anime-sub {
  font-size: 12.5px;
  color: var(--text-faint);
}

.anime-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text-faint);
  font-size: 26px;
  font-weight: 800;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  animation: pulse 1.4s ease-in-out infinite;
}

.skeleton-feature {
  width: 100%;
  height: 100%;
}

.skeleton-card {
  flex: 0 0 auto;
  width: 172px;
  height: 258px;
  border-radius: var(--radius-sm);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.shelf-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-dim);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease);
  transform-style: preserve-3d;
}

.card:hover {
  background: var(--surface-2);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--accent);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-text {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

.cta {
  display: flex;
  justify-content: center;
  text-align: center;
  background: none;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 60ch;
}

.cta-title {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.cta-subtitle {
  max-width: 48ch;
  color: var(--text-dim);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.7;
}

.footer {
  border-top: none;
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 36px 0 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.footer-logo b {
  color: var(--accent);
}

.footer-tag {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 14.5px;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-download {
  color: var(--accent) !important;
}

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

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.footer-social a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-disclaimer {
  padding-bottom: 16px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.7;
  max-width: 80ch;
}

.footer-bottom {
  padding: 16px 0 32px;
  border-top: none;
  color: var(--text-faint);
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  animation: modal-in 0.3s var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--bg-elevated);
  border: none;
  color: var(--text);
  font-size: 14px;
}

.modal-close:hover {
  background: var(--surface-3);
}

.modal-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-media iframe,
.modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.modal-media .no-trailer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 14px;
  background: var(--surface-2);
}

.modal-body {
  padding: 22px clamp(20px, 4vw, 28px) 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-tags span {
  padding: 5px 11px;
  border-radius: 0;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 12.5px;
}

.modal-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.7;
}

.modal-desc p + p {
  margin-top: 8px;
}

.modal-desc a {
  color: var(--accent);
}

body.modal-open {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .hero-title {
    max-width: none;
  }

  .nav-links {
    display: none;
  }

  .catalog-head {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav .btn-sm {
    display: none;
  }

  .catalog-tools {
    width: 100%;
  }

  .search {
    flex: 1;
  }

  .search input {
    width: 100%;
  }

  .shelf-nav {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .skeleton,
  .skeleton-card {
    animation: none;
  }

  .modal-card {
    animation: none;
  }
}
