:root {
  --bg: #030407;
  --card-bg: #0a0c14;
  --text-main: #f0f2f5;
  --text-muted: #8b92a5;
  --border-glow: rgba(255, 255, 255, 0.08);
  --radius: 3cqw;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(10, 12, 20, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 12, 20, 0.8) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--text-main);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
  min-height: 100vh;
}

.theme-cyan {
  --accent: #00f0ff;
  --accent-glow: rgba(0, 240, 255, 0.42);
  --accent-dim: rgba(0, 240, 255, 0.12);
}

.theme-magenta {
  --accent: #ff0055;
  --accent-glow: rgba(255, 0, 85, 0.42);
  --accent-dim: rgba(255, 0, 85, 0.12);
}

.theme-yellow {
  --accent: #ffb703;
  --accent-glow: rgba(255, 183, 3, 0.42);
  --accent-dim: rgba(255, 183, 3, 0.12);
}

.card-container {
  display: flex;
  gap: 6vw;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}

.anime-card-base,
.cyber-card {
  position: relative;
  width: min(210px, 46vw);
  container-type: inline-size;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 15cqw 30cqw rgba(0, 0, 0, 0.8),
    inset 0 0 0 0.3cqw var(--border-glow);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.38s ease;
}

.anime-card-base:hover,
.cyber-card:hover {
  transform: translate3d(0, -2cqw, 0) scale(1.02);
  box-shadow:
    0 20cqw 40cqw rgba(0, 0, 0, 0.9),
    0 0 15cqw var(--accent-dim),
    inset 0 0 0 0.3cqw var(--accent);
}

.anime-card-base:focus-visible,
.cyber-card:focus-visible {
  outline: none;
  box-shadow:
    0 20cqw 40cqw rgba(0, 0, 0, 0.9),
    0 0 15cqw var(--accent-dim),
    inset 0 0 0 0.3cqw var(--accent),
    0 0 0 2px rgba(255, 255, 255, 0.18);
}

.anime-top-image,
.cyber-poster-area {
  position: relative;
  width: 100%;
  aspect-ratio: 450 / 638;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #111;
}

.anime-image-banner,
.cyber-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  filter: saturate(1.1) contrast(1.05);
  will-change: transform, filter;
  transition: transform 0.7s ease, filter 0.7s ease;
}

.anime-card-base:hover .anime-image-banner,
.anime-card-base:hover .cyber-poster,
.cyber-card:hover .anime-image-banner,
.cyber-card:hover .cyber-poster {
  transform: scale(1.06);
  filter: saturate(1.2) contrast(1.1) brightness(1.08);
}

.poster-overlay,
.movie-card__fade,
.movie-card__fade--bottom {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.poster-overlay,
.movie-card__fade--bottom {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, transparent 20%, transparent 60%, var(--card-bg) 100%);
}

.top-badge-left {
  position: absolute;
  top: 3.5cqw;
  left: 3.5cqw;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(4px);
  border: 0.2cqw solid var(--border-glow);
  padding: 1.5cqw 2.5cqw;
  border-radius: 1.5cqw;
  font-size: 3.5cqw;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  gap: 1.5cqw;
  align-items: center;
  z-index: 2;
}

.badge-separator {
  width: 0.4cqw;
  height: 3.5cqw;
  background: var(--accent);
  border-radius: 1cqw;
  box-shadow: 0 0 3cqw var(--accent);
}

.top-badge-right {
  position: absolute;
  top: 3.5cqw;
  right: 3.5cqw;
  background: var(--accent);
  color: #000;
  padding: 1.2cqw 2.5cqw;
  border-radius: 1.5cqw;
  font-size: 4.2cqw;
  font-weight: 900;
  font-family: "Courier New", Courier, monospace;
  display: flex;
  align-items: center;
  gap: 1cqw;
  box-shadow: 0 0 10cqw var(--accent-glow);
  z-index: 2;
}

.star-icon {
  width: 3.5cqw;
  height: 3.5cqw;
  fill: #000;
  flex-shrink: 0;
}

.status-pill {
  position: absolute;
  bottom: 12cqw;
  right: 3.5cqw;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  border: 0.2cqw solid rgba(255, 255, 255, 0.1);
  padding: 1cqw 2cqw;
  border-radius: 4cqw;
  font-size: 3cqw;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 1.5cqw;
  color: #fff;
  z-index: 2;
}

.status-dot {
  width: 2cqw;
  height: 2cqw;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 5cqw var(--accent), 0 0 10cqw var(--accent);
  will-change: opacity, transform;
  animation: pulse 2s infinite;
}

.animation-paused {
  animation-play-state: paused !important;
}

.cyber-data-panel,
.movie-card__body {
  position: relative;
  z-index: 2;
  margin-top: -8cqw;
  padding: 4.5cqw 4cqw 4.2cqw;
  border-radius: 4cqw 4cqw var(--radius) var(--radius);
  background: rgba(10, 12, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 0.2cqw solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  overflow: hidden;
}

.panel-bg-banner {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-size: cover;
  background-position: center;
  z-index: -1;
  filter: saturate(1.5) blur(2px);
  mix-blend-mode: screen;
}

.title-group {
  display: flex;
  flex-direction: column;
  gap: 0.5cqw;
}

.main-title {
  font-size: 6.5cqw;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2cqw 4cqw rgba(0, 0, 0, 0.8);
}

.jp-title {
  font-size: 3.8cqw;
  color: var(--accent);
  font-family: monospace;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 2cqw var(--accent-glow);
}

.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-wrapper--tight {
  mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
}

.tags-track {
  display: flex;
  gap: 1.5cqw;
  width: max-content;
  will-change: transform;
  animation: marquee-scroll 12s linear infinite;
}

.text-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marquee-scroll 10s linear infinite;
}

.tags-track:hover,
.text-track:hover {
  animation-play-state: paused;
}

.tag {
  font-size: 3.2cqw;
  font-weight: 600;
  padding: 1.2cqw 2.5cqw;
  background: rgba(255, 255, 255, 0.05);
  border: 0.2cqw solid rgba(255, 255, 255, 0.1);
  border-radius: 1cqw;
  color: #cbd5e1;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.anime-card-base:hover .tag,
.cyber-card:hover .tag {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5cqw;
  padding-top: 3cqw;
  border-top: 0.2cqw solid rgba(255, 255, 255, 0.08);
}

.grid-item {
  display: flex;
  align-items: center;
  gap: 2cqw;
  min-width: 0;
}

.grid-item--full {
  grid-column: 1 / -1;
  padding-bottom: 0.5cqw;
}

.grid-icon {
  width: 4cqw;
  height: 4cqw;
  fill: var(--text-muted);
  flex-shrink: 0;
}

.grid-text {
  display: flex;
  flex-direction: column;
  gap: 0.2cqw;
  overflow: hidden;
  width: 100%;
}

.grid-label {
  font-size: 2.5cqw;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.grid-value,
.marquee-text-item {
  font-size: 3.8cqw;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anime-card-meta-line {
  display: none;
}

.anime-card-skeleton {
  width: min(210px, 46vw);
  container-type: inline-size;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(10, 12, 20, 0.74);
  box-shadow: var(--shadow);
  border: 0.2cqw solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.skeleton-img {
  aspect-ratio: 450 / 638;
  width: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

.skeleton-body {
  padding: 4.5cqw 4cqw 4.2cqw;
  display: grid;
  gap: 2.5cqw;
}

.skeleton-line,
.skeleton-chip {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

.skeleton-line--lg {
  height: 5.5cqw;
  width: 88%;
}

.skeleton-line--sm {
  height: 3.8cqw;
  width: 58%;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2cqw;
}

.skeleton-chip {
  height: 8cqw;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(-50% - 0.75cqw), 0, 0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@container (max-width: 320px) {
  .anime-card-base,
  .cyber-card,
  .anime-card-skeleton {
    border-radius: 1.6cqw;
  }

  .cyber-data-panel,
  .movie-card__body {
    padding: 5.12cqw 4.61cqw 4.61cqw;
  }
}

@media (max-width: 640px) {
  .anime-card-base,
  .cyber-card,
  .anime-card-skeleton {
    width: min(46vw, 205px);
  }

  .main-title {
    font-size: 7.2cqw;
  }

  .grid-value,
  .marquee-text-item {
    font-size: 4cqw;
  }
}
