:root {
  --color-primary: #667eea;
  --color-primary-light: #7c8ff5;
  --color-primary-dark: #5568d3;
  --color-secondary: #764ba2;
  --color-accent: #00d4ff;
  --color-accent-glow: rgba(0, 212, 255, 0.3);

  --color-bg-primary: #181818;
  --color-bg-secondary: #13131a;
  --color-bg-tertiary: #1a1a24;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);

  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-tertiary: rgba(255, 255, 255, 0.5);
  --color-text-muted: rgba(255, 255, 255, 0.35);

  --color-error: #ef4444;

  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--color-accent-glow);

  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  --gradient-primary-reverse: linear-gradient(
    135deg,
    var(--color-secondary) 0%,
    var(--color-primary) 100%
  );
  --gradient-overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  --gradient-card: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );

  --font-primary:
    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-secondary: "Montserrat", sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --z-base: 1;
  --z-fixed: 1030;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body > header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: 9999;
}

.skip-to-main:focus {
  top: 0;
}

.cast-page-container {
  margin: 0 auto;
  padding: 1rem 0.8rem;
  margin-bottom: 50px;
  background: linear-gradient(
    180deg,
    var(--color-bg-primary) 0%,
    var(--color-bg-secondary) 70%,
    var(--color-bg-primary) 100%
  );
}

.cast-page-header {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  margin-bottom: 3rem;
  transition: transform var(--transition-base);
  animation: fadeInUp 0.8s var(--transition-bounce);
}

.cast-page-header:hover {
  transform: translateY(-2px);
}

.movie-poster-wrapper {
  position: relative;
  width: 180px;
  flex-shrink: 0;
  isolation: isolate;
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform var(--transition-slow) var(--transition-bounce);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  border: 2px solid #ffffff22;
  border-radius: 10px;
  background-color: #1e1e1e;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  height: fit-content;
  display: flex;
  align-self: center;
}

.movie-poster-figure {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 3 / 4;
  transition: all var(--transition-base);
  border: 1px solid #333;
}

.movie-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow) var(--transition-smooth);
}

.movie-poster-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(0, 210, 106, 0.15) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.movie-info-wrapper {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  overflow-wrap: anywhere;
  flex: 1;
  justify-content: center;
}

.movie-title {
  font-family: var(--font-secondary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  word-wrap: break-word;
  transition: color var(--transition-base);
  font-family: "Acme", sans-seri;
}

.movie-title:hover {
  color: var(--color-accent);
}

.loading-skeleton {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 25%,
    var(--color-bg-card-hover) 50%,
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer3 1.5s infinite;
  border-radius: var(--radius-md);
  height: 1.2em;
  width: 250px;
}

@keyframes shimmer3 {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.movie-metadata {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  font-size: 15px;
  line-height: 1;
}

.content-year-type {
  align-items: center;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
}

.content-year-type:hover {
  color: var(--color-text-primary);
}

.cast-crew-stats {
  display: flex;
  align-items: center;
}

.cast-crew-stats .stat-item {
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    transform var(--transition-base);
}

.cast-crew-stats .stat-item span {
  font-weight: 700;
  color: inherit;
}

.cast-crew-stats .stat-item label {
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  flex-wrap: nowrap;
}

.cast-crew-stats .stat-box {
  cursor: pointer;
}

.cast-crew-stats .stat-box {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 6px;
  flex-wrap: wrap;
  border: 1px solid transparent;
}

.cast-crew-stats .cast-box {
  background: rgba(40, 49, 44, 0.15);
  border-color: #48bb78;
}

.cast-crew-stats .crew-box {
  background: rgba(30, 31, 39, 0.15);
  border-color: #667eea;
}

.cast-crew-stats .separator {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.creator-director-info {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.creator-director-info .creator-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: #2a2a2a;
  border: 1px solid #444;
  font-size: 12px;
  width: auto;
}

.creator-director-info .creator-row:not(:last-child) {
  margin-bottom: 0.35rem;
}

.creator-director-info .creator-row:hover {
  background: #333;
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.creator-director-info .person-link {
  cursor: pointer;
  color: #b7c6da;
  font-weight: 500;
  white-space: nowrap;
}

.creator-director-info .person-link:hover {
  text-decoration: underline;
}

.full-cast-section {
  animation: fadeIn 1s var(--transition-base) 0.3s backwards;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-secondary);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  padding-left: 10px;
}

.section-title i {
  color: var(--color-accent);
}

.cast-count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 5px 10px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 18px;
}

#cast-total {
  font-weight: 700;
  color: var(--color-accent);
}

.count-label {
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  min-height: 400px;
  text-align: center;
}

.state-message {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-top: 1.5rem;
}

.state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.error-icon {
  color: var(--color-error);
}

.empty-icon {
  color: var(--color-text-muted);
}

.loading-spinner {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.spinner-circle {
  width: 16px;
  height: 16px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: bounce 1.4s infinite ease-in-out;
}

.spinner-circle:nth-child(1) {
  animation-delay: -0.32s;
}
.spinner-circle:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  margin-top: 1.5rem;
  background: var(--color-error);
  color: white;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.retry-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.retry-btn:active {
  transform: translateY(0);
}

.retry-btn i {
  transition: transform var(--transition-base);
}

.retry-btn:hover i {
  transform: rotate(180deg);
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cast-card {
  position: relative;
  display: block;
  background: transparent;
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: fadeInUp 0.5s ease backwards;
}

.cast-card.skeleton {
  pointer-events: none;
}

.cast-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.cast-card:nth-child(1) {
  animation-delay: 0s;
}
.cast-card:nth-child(2) {
  animation-delay: 0.05s;
}
.cast-card:nth-child(3) {
  animation-delay: 0.1s;
}
.cast-card:nth-child(4) {
  animation-delay: 0.15s;
}
.cast-card:nth-child(5) {
  animation-delay: 0.2s;
}
.cast-card:nth-child(6) {
  animation-delay: 0.25s;
}
.cast-card:nth-child(7) {
  animation-delay: 0.3s;
}
.cast-card:nth-child(8) {
  animation-delay: 0.35s;
}
.cast-card:nth-child(9) {
  animation-delay: 0.4s;
}
.cast-card:nth-child(10) {
  animation-delay: 0.45s;
}

.actor-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1c1c;
  border-radius: inherit;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cast-card:hover .actor-gallery {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.7);
}

.actor-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.cast-card:hover .actor-gallery img {
  transform: scale(1.05);
}

.cast-card.skeleton .actor-gallery {
  background: linear-gradient(90deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.actor-gallery:empty::before {
  content: "\f007";
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.12);
}

.actor-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
  line-height: 1.5;
}

.actor-name {
  font-size: 17px;
  font-weight: 600;
  color: #e5e5e5;
  line-height: 1.3;
  margin: 0;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.cast-card:hover .actor-name {
  color: #ffffff;
}

.character-name {
  font-size: 15px;
  font-weight: 400;
  color: #a3a3a3;
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.cast-card:hover .character-name {
  color: #b8b8b8;
}

.cast-card.skeleton .actor-name,
.cast-card.skeleton .character-name {
  background: linear-gradient(90deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  color: transparent;
  border-radius: 4px;
  height: 1em;
}

.actor-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 0 10px;
}

.actor-year {
  font-weight: 500;
  color: #737373;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cast-card:hover .actor-year {
  color: #8c8c8c;
}

.actor-episodes {
  font-weight: 600;
  color: #00d26a;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cast-card:hover .actor-episodes {
  color: #00e676;
}

.cast-card.skeleton .actor-year,
.cast-card.skeleton .actor-episodes {
  background: linear-gradient(90deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  color: transparent;
  border-radius: 4px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(100px);
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.scroll-top-btn:active {
  transform: translateY(-2px);
}

.scroll-top-btn i {
  font-size: 1.25rem;
}

.crew-section {
  width: 100%;
  margin: 30px auto 0;
}

.crew-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.crew-section-header {
  margin-top: 30px;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #4a5568;
  position: relative;
}

.crew-section-header:first-child {
  margin-top: 0px;
}

.crew-section-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.crew-section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #f7fafc;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.crew-section-title i {
  font-size: 1.15rem;
  color: #667eea;
}

.crew-card {
  background: transparent;
  border-radius: 0;
  padding: 0.75rem 0;
  box-shadow: none;
  border-left: none;
  border-bottom: 1px solid #4a5568;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s ease-out backwards;
  margin-bottom: 0;
  display: block;
  width: 100%;
}

.crew-card:last-child {
  border-bottom: none;
}

.crew-card:hover {
  background: rgba(255, 255, 255, 0.03);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.crew-card[style*="cursor: pointer"]:hover {
  cursor: pointer;
}

.crew-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.crew-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
  transition: all 0.25s ease;
}

.crew-card:hover .crew-icon {
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

.crew-details {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.crew-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f7fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
  max-width: 300px;
  transition: color 0.2s ease;
}

.crew-card:hover .crew-name {
  color: #667eea;
}

.crew-role {
  font-size: 0.85rem;
  color: #cbd5e0;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.crew-year {
  font-size: 0.85rem;
  color: #cbd5e0;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.crew-episodes {
  font-size: 0.85rem;
  color: #a5b4fc;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.crew-card .episode-badge {
  display: none;
}

@media (max-width: 470px) {
  .cast-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .cast-card {
    border-radius: 6px;
    margin-bottom: 8px;
  }
  .actor-gallery {
    margin-bottom: 8px;
  }
  .actor-info {
    gap: 5px;
  }
  .actor-name {
    font-size: 15px;
  }
  .character-name {
    font-size: 13px;
  }
  .actor-meta {
    font-size: 12px;
    gap: 0 10px;
  }
}
@media (max-width: 428px) {
  .actor-name {
    font-size: 14px;
  }
  .character-name {
    font-size: 12px;
  }
  .actor-meta {
    font-size: 11px;
    gap: 0 10px;
  }
  .section-header {
    margin-bottom: 20px;
  }
  .section-title {
    gap: 7px;
    font-size: 26px;
    padding-left: 10px;
  }
  .cast-count {
    gap: 0.5rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16.5px;
  }
}

@media (max-width: 400px) {
  .cast-page-container {
    margin: 0 auto;
    padding: 1rem 0.8rem;
    margin-bottom: 50px;
  }
  .cast-page-header {
    gap: 10px;
    margin-bottom: 3rem;
  }
  .movie-poster-wrapper {
    width: 160px;
  }
  .movie-poster-figure {
    border-radius: 10px;
  }
  .movie-info-wrapper {
    gap: 8px;
  }
  .movie-title {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .movie-metadata {
    gap: 10px;
    font-size: 12px;
  }
  .cast-crew-stats .stat-item {
    border-radius: 8px;
    font-size: 11px;
    gap: 8px;
  }
  .cast-crew-stats .stat-box {
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .creator-director-info .creator-row {
    padding: 0.4rem 0.6rem;
    font-size: 10px;
  }
  .creator-director-info .creator-row:not(:last-child) {
    margin-bottom: 0.35rem;
  }
}

@media (max-width: 398px) {
  .actor-name {
    font-size: 12px;
  }
  .character-name {
    font-size: 11px;
  }
  .actor-meta {
    font-size: 10px;
    gap: 0 10px;
  }
}

@media (max-width: 360px) {
  .cast-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cast-card {
    border-radius: 6px;
    margin-bottom: 8px;
  }
  .actor-gallery {
    margin-bottom: 8px;
  }
  .actor-info {
    gap: 5px;
  }
  .actor-name {
    font-size: 13px;
  }
  .character-name {
    font-size: 12px;
  }
  .actor-meta {
    font-size: 11px;
    gap: 0 10px;
  }
}

@media (max-width: 340px) {
  .cast-page-container {
    margin: 0 auto;
    margin-bottom: 50px;
  }
  .cast-page-header {
    gap: 10px;
    margin-bottom: 3rem;
  }
  .movie-poster-wrapper {
    width: 140px;
  }
  .movie-poster-figure {
    border-radius: 10px;
  }
  .movie-info-wrapper {
    gap: 8px;
  }
  .movie-title {
    font-size: 13px;
    letter-spacing: 2px;
  }
  .movie-metadata {
    gap: 10px;
    font-size: 12px;
  }
  .cast-crew-stats .stat-item {
    border-radius: 8px;
    font-size: 10px;
    gap: 8px;
  }
  .cast-crew-stats .stat-box {
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
  }
  .creator-director-info .creator-row {
    padding: 0.4rem 0.6rem;
    font-size: 9px;
  }
  .creator-director-info .creator-row:not(:last-child) {
    margin-bottom: 0.35rem;
  }
}

@media (min-width: 570px) {
  .cast-page-container {
    padding: 1.1rem 0.9rem;
  }

  .movie-poster-wrapper {
    width: 180px;
  }

  .movie-title {
    font-size: 19px;
  }

  .movie-metadata {
    font-size: 15.5px;
  }

  .section-title {
    font-size: 33px;
    gap: 8px;
  }
}

@media (min-width: 640px) {
  .cast-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .actor-name {
    font-size: 12px;
  }
  .character-name {
    font-size: 10px;
  }
  .actor-meta {
    font-size: 10px;
  }
}

@media (min-width: 760px) {
  .cast-page-container {
    padding: 1.2rem 1rem;
  }

  .cast-page-header {
    gap: 18px;
    margin-bottom: 3.5rem;
  }

  .movie-poster-wrapper {
    width: 190px;
  }

  .movie-info-wrapper {
    gap: 12px;
  }

  .movie-title {
    font-size: 21px;
  }

  .movie-metadata {
    font-size: 16px;
  }

  .cast-crew-stats .stat-item {
    font-size: 15px;
    gap: 10px;
  }

  .creator-director-info .creator-row {
    font-size: 13px;
    padding: 0.45rem 0.7rem;
  }

  .section-header {
    margin-bottom: 22px;
  }

  .section-title {
    font-size: 35px;
    gap: 9px;
    padding-left: 11px;
  }

  .cast-count {
    font-size: 19px;
    padding: 6px 11px;
  }

  .cast-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .actor-name {
    font-size: 18px;
  }

  .character-name {
    font-size: 16px;
  }

  .actor-meta {
    font-size: 13.5px;
  }

  .crew-section {
    margin-top: 35px;
  }

  .crew-section-header {
    margin-top: 35px;
    padding-bottom: 0.8rem;
  }

  .crew-section-title {
    font-size: 1.45rem;
    gap: 0.7rem;
  }

  .crew-section-title i {
    font-size: 1.2rem;
  }

  .crew-card {
    padding: 0.85rem 0;
  }

  .crew-icon {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }

  .crew-name {
    font-size: 1rem;
    max-width: 350px;
  }

.crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 0.875rem;
  }

  .scroll-top-btn {
    width: 58px;
    height: 58px;
  }

  .scroll-top-btn i {
    font-size: 1.3rem;
  }
}

@media (min-width: 990px) {
  .cast-page-container {
    padding: 1.3rem 1.1rem;
  }

  .cast-page-header {
    gap: 22px;
    margin-bottom: 4rem;
  }

  .movie-poster-wrapper {
    width: 205px;
  }

  .movie-info-wrapper {
    gap: 14px;
  }

  .movie-title {
    font-size: 23px;
    letter-spacing: 2.5px;
  }

  .movie-metadata {
    font-size: 16.5px;
  }

  .cast-crew-stats .stat-item {
    font-size: 15.5px;
    gap: 12px;
  }

  .cast-crew-stats .stat-box {
    padding: 5px 10px;
  }

  .creator-director-info .creator-row {
    font-size: 13.5px;
    padding: 0.5rem 0.8rem;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 38px;
    gap: 10px;
    padding-left: 12px;
  }

  .cast-count {
    font-size: 20px;
    padding: 6px 12px;
  }

  .cast-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
  }

  .actor-info {
    gap: 6px;
  }

  .actor-name {
    font-size: 18.5px;
  }

  .character-name {
    font-size: 16.5px;
  }

  .actor-meta {
    font-size: 14px;
    gap: 0 12px;
  }

  .crew-section {
    margin-top: 40px;
  }

  .crew-section-header {
    margin-top: 40px;
    padding-bottom: 0.85rem;
  }

  .crew-section-title {
    font-size: 1.55rem;
    gap: 0.75rem;
  }

  .crew-section-title i {
    font-size: 1.25rem;
  }

  .crew-card {
    padding: 0.9rem 0;
  }

  .crew-info {
    gap: 1.1rem;
  }

  .crew-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .crew-details {
    gap: 1.75rem;
  }

  .crew-name {
    font-size: 1.05rem;
    max-width: 400px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 0.9rem;
  }

  .scroll-top-btn {
    width: 60px;
    height: 60px;
    bottom: 2.25rem;
    right: 2.25rem;
  }

  .scroll-top-btn i {
    font-size: 1.35rem;
  }
}

@media (min-width: 1200px) {
  .cast-page-container {
    padding: 1.4rem 1.5rem;
  }

  .cast-page-header {
    gap: 25px;
    margin-bottom: 4.5rem;
  }

  .movie-poster-wrapper {
    width: 210px;
  }

  .movie-info-wrapper {
    gap: 16px;
  }

  .movie-title {
    font-size: 25px;
    letter-spacing: 3px;
  }

  .movie-metadata {
    font-size: 17px;
  }

  .cast-crew-stats .stat-item {
    font-size: 16px;
    gap: 14px;
  }

  .creator-director-info .creator-row {
    font-size: 14px;
    padding: 0.55rem 0.9rem;
  }

  .section-header {
    margin-bottom: 26px;
  }

  .section-title {
    font-size: 40px;
    gap: 11px;
    padding-left: 13px;
  }

  .cast-count {
    font-size: 21px;
    padding: 7px 13px;
  }

  .cast-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  .cast-card {
    margin-bottom: 10px;
  }

  .actor-gallery {
    margin-bottom: 10px;
  }

  .actor-info {
    gap: 7px;
  }

  .actor-name {
    font-size: 19px;
  }

  .character-name {
    font-size: 17px;
  }

  .actor-meta {
    font-size: 14.5px;
  }

  .crew-section {
    margin-top: 45px;
  }

  .crew-section-header {
    margin-top: 45px;
    padding-bottom: 0.9rem;
  }

  .crew-section-title {
    font-size: 1.65rem;
    gap: 0.8rem;
  }

  .crew-section-title i {
    font-size: 1.3rem;
  }

  .crew-card {
    padding: 1rem 0;
  }

  .crew-info {
    gap: 1.2rem;
  }

  .crew-icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .crew-details {
    gap: 2rem;
  }

  .crew-name {
    font-size: 1.1rem;
    max-width: 450px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 0.925rem;
  }

  .scroll-top-btn {
    width: 62px;
    height: 62px;
    bottom: 2.5rem;
    right: 2.5rem;
  }

  .scroll-top-btn i {
    font-size: 1.4rem;
  }
}

@media (min-width: 1400px) {
  .cast-page-container {
    padding: 1.5rem 1.6rem;
  }

  .cast-page-header {
    gap: 28px;
    margin-bottom: 5rem;
  }

  .movie-poster-wrapper {
    width: 235px;
  }

  .movie-info-wrapper {
    gap: 18px;
  }

  .movie-title {
    font-size: 27px;
  }

  .movie-metadata {
    font-size: 17.5px;
  }

  .cast-crew-stats .stat-item {
    font-size: 16.5px;
    gap: 16px;
  }

  .creator-director-info .creator-row {
    font-size: 14.5px;
    padding: 0.6rem 1rem;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 42px;
    gap: 12px;
    padding-left: 14px;
  }

  .cast-count {
    font-size: 22px;
    padding: 7px 14px;
  }

  .cast-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
  }

  .actor-name {
    font-size: 19.5px;
  }

  .character-name {
    font-size: 17.5px;
  }

  .actor-meta {
    font-size: 15px;
  }

  .crew-section {
    margin-top: 50px;
  }

  .crew-section-header {
    margin-top: 50px;
    padding-bottom: 0.95rem;
  }

  .crew-section-title {
    font-size: 1.75rem;
  }

  .crew-section-title i {
    font-size: 1.35rem;
  }

  .crew-card {
    padding: 1.1rem 0;
  }

  .crew-info {
    gap: 1.25rem;
  }

  .crew-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .crew-details {
    gap: 2.25rem;
  }

  .crew-name {
    font-size: 1.125rem;
    max-width: 500px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 0.95rem;
  }

  .scroll-top-btn {
    width: 64px;
    height: 64px;
  }

  .scroll-top-btn i {
    font-size: 1.45rem;
  }
}

@media (min-width: 1600px) {
  .cast-page-container {
    padding: 1.6rem 1.8rem;
  }

  .cast-page-header {
    gap: 32px;
    margin-bottom: 5.5rem;
  }

  .movie-poster-wrapper {
    width: 240px;
  }

  .movie-info-wrapper {
    gap: 20px;
  }

  .movie-title {
    font-size: 29px;
    letter-spacing: 3.5px;
  }

  .movie-metadata {
    font-size: 18px;
  }

  .cast-crew-stats .stat-item {
    font-size: 17px;
  }

  .creator-director-info .creator-row {
    font-size: 15px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 44px;
    padding-left: 15px;
  }

  .cast-count {
    font-size: 23px;
    padding: 8px 15px;
  }

  .cast-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
  }

  .actor-name {
    font-size: 18px;
  }

  .character-name {
    font-size: 17px;
  }

  .actor-meta {
    font-size: 14px;
  }

  .crew-section {
    margin-top: 55px;
  }

  .crew-section-header {
    margin-top: 55px;
  }

  .crew-section-title {
    font-size: 1.85rem;
  }

  .crew-section-title i {
    font-size: 1.4rem;
  }

  .crew-card {
    padding: 1.15rem 0;
  }

  .crew-icon {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .crew-name {
    font-size: 1.15rem;
    max-width: 550px;
  }

.crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 0.975rem;
  }

  .scroll-top-btn {
    width: 66px;
    height: 66px;
    bottom: 2.75rem;
    right: 2.75rem;
  }

  .scroll-top-btn i {
    font-size: 1.5rem;
  }
}

@media (min-width: 1900px) {
  .cast-page-container {
    padding: 1.7rem 2rem;
  }

  .cast-page-header {
    gap: 36px;
    margin-bottom: 6rem;
  }

  .movie-poster-wrapper {
    width: 260px;
  }

  .movie-info-wrapper {
    gap: 22px;
  }

  .movie-title {
    font-size: 32px;
    letter-spacing: 4px;
  }

  .movie-metadata {
    font-size: 19px;
  }

  .cast-crew-stats .stat-item {
    font-size: 18px;
    gap: 18px;
  }

  .cast-crew-stats .stat-box {
    padding: 6px 12px;
  }

  .creator-director-info .creator-row {
    font-size: 16px;
    padding: 0.65rem 1.1rem;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 46px;
    gap: 13px;
    padding-left: 16px;
  }

  .cast-count {
    font-size: 24px;
    padding: 8px 16px;
  }

  .cast-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 22px;
  }

  .actor-info {
    gap: 8px;
  }

  .actor-name {
    font-size: 21px;
  }

  .character-name {
    font-size: 19px;
  }

  .actor-meta {
    font-size: 16px;
  }

  .crew-section {
    margin-top: 60px;
  }

  .crew-section-header {
    margin-top: 60px;
    padding-bottom: 1rem;
  }

  .crew-section-title {
    font-size: 2rem;
    gap: 0.9rem;
  }

  .crew-section-title i {
    font-size: 1.5rem;
  }

  .crew-card {
    padding: 1.2rem 0;
  }

  .crew-info {
    gap: 1.35rem;
  }

  .crew-icon {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .crew-details {
    gap: 2.5rem;
  }

  .crew-name {
    font-size: 1.2rem;
    max-width: 600px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 1rem;
  }

  .scroll-top-btn {
    width: 68px;
    height: 68px;
    bottom: 3rem;
    right: 3rem;
  }

  .scroll-top-btn i {
    font-size: 1.55rem;
  }
}

@media (min-width: 2500px) {
  .cast-page-container {
    padding: 1.8rem 2.2rem;
  }

  .cast-page-header {
    gap: 42px;
    margin-bottom: 7rem;
  }

  .movie-poster-wrapper {
    width: 280px;
  }

  .movie-info-wrapper {
    gap: 26px;
  }

  .movie-title {
    font-size: 36px;
    letter-spacing: 4.5px;
  }

  .movie-metadata {
    font-size: 20px;
  }

  .cast-crew-stats .stat-item {
    font-size: 19px;
    gap: 20px;
  }

  .creator-director-info .creator-row {
    font-size: 17px;
    padding: 0.7rem 1.2rem;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-title {
    font-size: 50px;
    gap: 14px;
    padding-left: 18px;
  }

  .cast-count {
    font-size: 26px;
    padding: 9px 18px;
  }

  .cast-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 26px;
  }

  .actor-info {
    gap: 9px;
  }

  .actor-name {
    font-size: 22px;
  }

  .character-name {
    font-size: 20px;
  }

  .actor-meta {
    font-size: 17px;
  }

  .crew-section {
    margin-top: 70px;
  }

  .crew-section-header {
    margin-top: 70px;
    padding-bottom: 1.1rem;
  }

  .crew-section-title {
    font-size: 2.25rem;
    gap: 1rem;
  }

  .crew-section-title i {
    font-size: 1.65rem;
  }

  .crew-card {
    padding: 1.3rem 0;
  }

  .crew-info {
    gap: 1.5rem;
  }

  .crew-icon {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .crew-details {
    gap: 3rem;
  }

  .crew-name {
    font-size: 1.3rem;
    max-width: 700px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 1.05rem;
  }

  .scroll-top-btn {
    width: 72px;
    height: 72px;
    bottom: 3.5rem;
    right: 3.5rem;
  }

  .scroll-top-btn i {
    font-size: 1.65rem;
  }
}

@media (min-width: 3800px) {
  .cast-page-container {
    padding: 2rem 1.8rem;
    max-width: 3600px;
  }

  .cast-page-header {
    gap: 50px;
    margin-bottom: 8rem;
  }

  .movie-poster-wrapper {
    width: 320px;
  }

  .movie-info-wrapper {
    gap: 30px;
  }

  .movie-title {
    font-size: 42px;
    letter-spacing: 5px;
  }

  .movie-metadata {
    font-size: 22px;
  }

  .cast-crew-stats .stat-item {
    font-size: 21px;
    gap: 24px;
  }

  .cast-crew-stats .stat-box {
    padding: 7px 14px;
    border-radius: 8px;
  }

  .creator-director-info .creator-row {
    font-size: 19px;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
  }

  .section-header {
    margin-bottom: 42px;
  }

  .section-title {
    font-size: 56px;
    gap: 16px;
    padding-left: 20px;
  }

  .cast-count {
    font-size: 28px;
    padding: 10px 20px;
    border-radius: 8px;
  }

  .cast-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 32px;
  }

  .actor-info {
    gap: 10px;
  }

  .actor-name {
    font-size: 24px;
  }

  .character-name {
    font-size: 22px;
  }

  .actor-meta {
    font-size: 18px;
    gap: 0 14px;
  }

  .crew-section {
    margin-top: 80px;
  }

  .crew-section-header {
    margin-top: 80px;
    padding-bottom: 1.2rem;
  }

  .crew-section-title {
    font-size: 2.5rem;
    gap: 1.1rem;
  }

  .crew-section-title i {
    font-size: 1.8rem;
  }

  .crew-card {
    padding: 1.5rem 0;
  }

  .crew-info {
    gap: 1.75rem;
  }

  .crew-icon {
    width: 58px;
    height: 58px;
    font-size: 1.55rem;
    border-radius: 10px;
  }

  .crew-details {
    gap: 3.5rem;
  }

  .crew-name {
    font-size: 1.45rem;
    max-width: 900px;
  }

  .crew-role,
  .crew-year,
  .crew-episodes {
    font-size: 1.15rem;
  }

  .scroll-top-btn {
    width: 78px;
    height: 78px;
    bottom: 4rem;
    right: 4rem;
  }

  .scroll-top-btn i {
    font-size: 1.8rem;
  }
}
