  :root {
  --card_bg: #0a0b10;
  --panel: rgba(16, 18, 28, 0.82);
  --panel-2: rgba(10, 12, 20, 0.72);
  --text: #f6f7fb;
  --genre_colour: rgb(210, 255, 66);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 22px 60px rgba(0, 0, 0, .56);
  --radius: 3.101cqw; /* 6px / 390px */
  --blur: 4.615cqw;   /* 18px / 390px */
}
* { box-sizing: border-box; }

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 10.256cqw; /* 40px gap relative to card width */
  justify-content: center;
}

.anime-card-base {
  position: relative;
  /* Control the entire scale by changing this width */
  width: min(190px, 43vw); 
  container-type: inline-size;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 22, 34, .35), rgba(8, 9, 14, .95));
  box-shadow: var(--shadow);
  border: 0.256cqw solid rgba(255, 255, 255, .06); /* 1px */
  transform: translateZ(0);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.anime-card-base:hover {
  transform: translateY(-1.538cqw) scale(1.01);
  box-shadow: 0 7.692cqw 20.512cqw rgba(0, 0, 0, .68);
  border-color: rgba(255, 255, 255, .12);
}

.anime-top-image {
  position: relative;
  aspect-ratio: 0.82 / 1;
  width: 100%;
  overflow: hidden;
}

.anime-image-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.05);
}

.movie-card__fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.movie-card__fade--top {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 180, 80, .42), transparent 34%);
  mix-blend-mode: screen;
  opacity: .9;
}

.movie-card__fade--bottom {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 40%, rgba(5, 6, 10, .2) 65%, rgba(5, 6, 10, .86) 100%);
}

.anime-top-image::before {
  content: "";
  position: absolute;
  inset: -0.512cqw; /* -2px */
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .16), transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(73, 214, 255, .12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 26%);
  pointer-events: none;
}

.movie-card__body {
  position: relative;
  z-index: 2;
  margin-top: -0.256cqw;
  padding: 5.641cqw 5.641cqw 5.128cqw; /* 22px, 22px, 20px */
  background: linear-gradient(180deg, rgba(14, 16, 24, .72), rgba(10, 11, 17, .96));
  backdrop-filter: blur(3.589cqw); /* 14px */
  -webkit-backdrop-filter: blur(3.589cqw);
}

.anime-title {
  margin: 0 0 2.564cqw; /* 10px */
  font-size: 8.82cqw; /* Converted from 2.15rem baseline */
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
  color: #f7f8fc;
}

.anime-genres {
  margin: 0 0 4.615cqw; /* 18px */
  color: var(--genre_colour);
  font-size: 6.358cqw; /* ~1.03rem */
  font-weight: 500;
  letter-spacing: -.01em;
}

.anime-metadata {
  display: flex;
  align-items: center;
  gap: 4.614cqw; /* 12px */
  flex-wrap: wrap;
}

.anime-card__chip-svg {
  height: 13.554cqw; /* 40px */
  padding: 0 3.589cqw; /* 14px */
  border-radius: 256cqw; /* Large pill */
  display: inline-flex;
  align-items: center;
  gap: 2.051cqw; /* 8px */
  background: rgba(33, 38, 52, .72);
  border: 0.256cqw solid rgba(255, 255, 255, .06);
  color: rgba(117,255,236,0.839);
  font-size: 4.59cqw; /* ~.98rem */
  font-weight: 700;
  letter-spacing: -.01em;
  box-shadow: inset 0 0.256cqw 0 rgba(255, 255, 255, .05);
}

.anime-card__badge {
  width: 4.102cqw; /* 16px */
  height: 4.102cqw;
  fill: currentColor;
}

.anime-card__badge--time {
  padding: 0 4.102cqw; /* 16px */
}

.anime-card__chip-svg--rating {
  color: rgba(255,18,239,0.839);
  border-radius: 2.564cqw; /* 10px */
  padding-left: 2.564cqw;
  padding-right: 4.102cqw;
}

.anime-card__chip-svg--pg13 {
  border-radius: 2.564cqw;
  color: #ff1111;
  border-color: rgba(39, 240, 164, .28);
  background: rgba(13, 51, 37, .58);
  text-shadow: 0 0 4.102cqw rgba(39, 240, 164, .18);
}

.movie-card__accent {
  position: absolute;
  right: -4.615cqw; /* -18px */
  bottom: -4.615cqw;
  width: 40.615cqw; /* 96px */
  height: 40.615cqw;
  border-radius: 45%;
  filter: blur(0.051cqw);
  opacity: .95;
  z-index: -1;
}

.anime-card__orange {
  background: radial-gradient(circle at 30% 30%, #ffb04d 0%, #ff9d2e 45%, rgba(255, 157, 46, 0) 72%);
  box-shadow: 0 0 15.384cqw rgba(255, 157, 46, .45);
}

.anime-card__blue {
  background: radial-gradient(circle at 30% 30%, #63e4ff 0%, #28c6ff 45%, rgba(40, 198, 255, 0) 72%);
  box-shadow: 0 0 15.384cqw rgba(40, 198, 255, .38);
}

/* Theme variants scaling */
.card--orange .anime-top-image {
  background: linear-gradient(180deg, #2a1404, #090b10);
}

.card--blue .anime-top-image {
  background: linear-gradient(180deg, #04233a, #090b10);
}

/* Premium Year Label Logic */
.anime-year-label {
  position: absolute;
  top: 6.8cqw;    /* Precisely calculated offset */
  left: -11.5cqw;  /* Precisely calculated offset */
  width: 50cqw;   /* Ribbon length */
  padding: 1.2cqw 0;
  transform: rotate(-40deg);
  z-index: 20;
  text-align: center;
  font-weight: 900;
  font-size: 6cqw;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 0.5cqw 2.5cqw rgba(0, 0, 0, 0.4);
  pointer-events: none;
  
  /* Glassy premium finish */
  backdrop-filter: blur(4px);
  border-top: 0.25cqw solid rgba(255, 255, 255, 0.2);
  border-bottom: 0.25cqw solid rgba(0, 0, 0, 0.1);
}

/* Color Matching: Orange Theme */
.card--orange .anime-year-label {
  background: linear-gradient(90deg, #ffb04d, #ff9d2e);
  color: #2a1404; /* Dark contrast for premium look */
  text-shadow: 0 0.25cqw 0.5cqw rgba(255, 176, 77, 0.3);
}

/* Color Matching: Blue Theme */
.card--blue .anime-year-label {
  background: linear-gradient(90deg, #63e4ff, #28c6ff);
  color: #04233a; /* Dark contrast for premium look */
  text-shadow: 0 0.25cqw 0.5cqw rgba(99, 228, 255, 0.3);
}

/* Subtle gloss overlay for the label */
.anime-year-label::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}
@container (max-width: 320px) {
  .anime-card-base {
    border-radius: 1.6cqw; /* Proportional to the 26px/480px original mobile feel */
  }
  .movie-card__body {
    padding: 5.12cqw 4.61cqw 4.61cqw;
  }
}
/* --- SKELETON LOADING STATE --- */
.anime-card-skeleton {
  width: min(190px, 43vw);
  aspect-ratio: 0.82 / 1.6; /* Matches the approximate height of a full card */
  background: var(--panel);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  border: 0.256cqw solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0; /* Ensures they don't squash in the flex container */
}

/* The Shimmer Effect */
.anime-card-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: shimmer-slide 1.5s infinite;
}

@keyframes shimmer-slide {
  100% {
    transform: translateX(100%);
  }
}

/* Specific skeleton sub-elements for better realism */
.skeleton-img { width: 100%; height: 60%; background: rgba(255,255,255,0.05); }
.skeleton-text { 
  margin: 15px; 
  height: 20px; 
  width: 70%; 
  background: rgba(255,255,255,0.05); 
  border-radius: 4.101cqw; 
}
#recommendedAnimeCardsContainer {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 16px;
  padding: 8px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#recommendedAnimeCardsContainer > * {
  flex: 0 0 auto;
}