/* ============================================
   ROLLIT — PERSON PAGE CSS
   ============================================ */

.person-hero {
  background: linear-gradient(135deg, #0e1020 0%, #1a0e20 50%, #0e1a20 100%);
  border-bottom: 0.5px solid var(--border);
  padding: 3rem 2.5rem 2.5rem;
}
.person-hero-inner {
  max-width: var(--content-max, 1100px); margin: 0 auto;
  display: flex; gap: 2.5rem; align-items: flex-start;
}
.person-poster-wrap { flex-shrink: 0; }
.person-poster { width: 180px; height: 260px; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.7); display: block; }
.person-poster-ph { width: 180px; height: 260px; background: var(--surface2); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--dim); }

.person-hero-info { flex: 1; min-width: 0; padding-top: 4px; }
.person-dept-tag { display: inline-flex; align-items: center; background: rgba(107,159,232,.1); border: 0.5px solid rgba(107,159,232,.25); border-radius: 5px; padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--info); text-transform: uppercase; letter-spacing: .6px; margin-bottom: .8rem; }
.person-hero-name { font-family: 'Bebas Neue', sans-serif; font-size: 3.5rem; line-height: .9; letter-spacing: 2px; margin-bottom: .6rem; }
.person-hero-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .9rem; }
.person-hero-meta span { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.person-bio { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 560px; font-weight: 300; }

.person-hero-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 4px; min-width: 130px; }
.person-score-block { text-align: center; }
.person-score-big { font-family: 'Bebas Neue', sans-serif; font-size: 3rem; color: var(--gold); line-height: 1; }
.person-score-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.person-rate-main-btn { display: flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--gold); color: #1a1000; font-weight: 600; font-size: 13px; border: none; border-radius: 10px; cursor: pointer; font-family: inherit; transition: all .18s; white-space: nowrap; }
.person-rate-main-btn:hover { background: #f0d57a; transform: translateY(-1px); }
.person-frame-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; background: rgba(255,255,255,.04); color: var(--text); font-weight: 600; font-size: 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; cursor: pointer; font-family: inherit; transition: all .18s; white-space: nowrap; }
.person-frame-btn:hover { border-color: rgba(232,201,107,.5); color: var(--gold); background: rgba(232,201,107,.08); transform: translateY(-1px); }

/* Credits scrollable row */
.credits-scroll-wrap { position: relative; margin-bottom: 1rem; overflow: visible; }
.credits-scroll { display: flex; gap: 12px; overflow-x: auto; overflow-y: visible; padding: 16px 4px; scrollbar-width: none; scroll-behavior: smooth; }
.credits-scroll::-webkit-scrollbar { display: none; }

.scroll-arrow { position: absolute; top: 50%; transform: translateY(-60%); z-index: 10; width: 34px; height: 34px; border-radius: 50%; background: rgba(9,10,15,.9); border: 0.5px solid var(--border2); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .18s; font-size: 16px; }
.scroll-arrow:hover { background: var(--surface2); border-color: rgba(255,255,255,.2); }
.scroll-arrow.left { left: -16px; }
.scroll-arrow.right { right: -16px; }

.credit-card { flex: 0 0 120px; background: var(--surface); border: 0.5px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s; }
.credit-card:hover { transform: translateY(-3px) scale(1.02); border-color: var(--border2); }
.credit-poster { width: 100%; height: 170px; object-fit: cover; display: block; }
.credit-poster-ph { width: 100%; height: 170px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 24px; }
.credit-body { padding: 7px 9px 9px; }
.credit-title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.credit-year { font-size: 10px; color: var(--muted); }
.credit-sc { font-size: 11px; color: var(--gold); margin-top: 3px; }

/* Person cards on homepage */
.person-card { flex: 0 0 100px; text-align: center; cursor: pointer; transition: transform .18s; padding: 4px 2px; }
.person-card:hover { transform: translateY(-3px); }
.person-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface2); margin: 0 auto 7px;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue',sans-serif; font-size: 1.3rem; color: var(--gold);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  position: relative;
}
.person-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;  /* image clips itself, not the container */
  display: block;
}
.person-card:hover .person-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232,201,107,.15), 0 6px 16px rgba(0,0,0,.35);
  transform: scale(1.08);
}
.person-name { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; }
.person-dept { font-size: 10px; color: var(--muted); margin-top: 2px; }
.person-sc { font-size: 11px; color: var(--gold); margin-top: 3px; }

/* Cast cards on title page */
.cast-scroll-wrap { position: relative; }
.cast-card { flex: 0 0 90px; text-align: center; cursor: pointer; transition: transform .18s; }
.cast-card:hover { transform: translateY(-2px); }
.cast-avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--surface2); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-family: 'Bebas Neue',sans-serif; font-size: 1.4rem; color: var(--gold); border: 1.5px solid var(--border2);  transition: border-color .18s; }
.cast-card:hover .cast-avatar { border-color: rgba(232,201,107,.4); }
.cast-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cast-name { font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.cast-role { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.cast-sc { font-size: 11px; color: var(--gold); margin-top: 3px; }

/* ---- CURSOR & HOVER FIXES ---- */
.cast-card, .person-card, .credit-card { cursor: pointer; }

/* Clear visual link indicator on cast hover */
.cast-card:hover .cast-name { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Crew tag hover */
.crew-tag {
  background: var(--surface);
  border: 0.5px solid var(--border2);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  overflow: hidden;
}
/* Subtle left accent line */
.crew-tag::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity .2s;
  border-radius: 3px 0 0 3px;
}
.crew-tag:hover {
  border-color: rgba(232,201,107,.4);
  background: rgba(232,201,107,.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.crew-tag:hover::before { opacity: 1; }
.crew-tag:hover .crew-tag-name { color: var(--gold); }

/* Cursor shows it's clickable */
.crew-tag:hover { cursor: pointer; }

.crew-tag-job {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px; font-weight: 600;
}
.crew-tag-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: color .18s;
  display: flex; align-items: center; gap: 5px;
}
/* Arrow icon appears on hover */
.crew-tag-name::after {
  content: '↗';
  font-size: 11px; color: var(--gold);
  opacity: 0; transition: opacity .18s;
}
.crew-tag:hover .crew-tag-name::after { opacity: 1; }

/* ============================================================
   FILMOGRAPHY — RANKED LIST
   ============================================================ */
.credits-ranked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px 10px 10px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
  text-decoration: none;
  color: var(--text);
}
.credit-row:hover {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateX(3px);
}

.credit-rank {
  font-family: 'Bebas Neue', sans-serif;
  min-width: 36px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.credit-thumb {
  flex-shrink: 0;
  width: 46px; height: 64px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface2);
}
.credit-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.credit-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 18px;
}

.credit-info {
  flex: 1; min-width: 0;
}
.credit-title-text {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px; color: var(--text);
  transition: color .18s;
}
.credit-row:hover .credit-title-text { color: var(--gold); }

.credit-meta-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.credit-year {
  font-size: 12px; color: var(--muted);
}
.credit-type-badge {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 1px 7px; border-radius: 5px;
  background: rgba(255,255,255,.05);
  border: 0.5px solid var(--border2);
  color: var(--muted);
}
.credit-role-badge {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 5px;
  border: 0.5px solid;
  letter-spacing: .3px;
  max-width: 200px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.credit-score-col {
  flex-shrink: 0;
  min-width: 70px;
  display: flex; align-items: center; justify-content: flex-end;
}

.credit-arrow {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 14px;
  transition: color .18s, transform .18s;
}
.credit-row:hover .credit-arrow {
  color: var(--gold);
  transform: translateX(3px);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .person-hero { padding: 2rem 1.1rem 1.5rem; }
  .person-hero-inner { flex-wrap: wrap; gap: 1.25rem 1.5rem; }
  .person-poster, .person-poster-ph { width: 110px; height: 160px; }
  .person-hero-name { font-size: 2.3rem; }
  .person-hero-right { min-width: 0; width: 100%; flex-direction: row; justify-content: flex-start; gap: 18px; }
}
