/**
 * Person Detail (Actor / Director) & Person Catalog V2 Stylesheet
 * Sorozat.cc - Light Purple Design System
 */

/* Container */
.person-detail-v2 {
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 40px;
  font-family: inherit;
}

/* Hero Card */
.pd-hero-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}

.pd-hero-flex {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.pd-hero-avatar-wrap {
  width: 210px;
  flex-shrink: 0;
}

.pd-hero-avatar {
  width: 100%;
  height: 290px;
  border-radius: 14px;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 24px rgba(85, 110, 230, 0.12);
  background: #f8f9fa;
  display: block;
}

.pd-hero-content {
  flex: 1;
  min-width: 0;
}

.pd-hero-name {
  font-size: 2.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.pd-hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 14px;
}

.pd-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-hero-meta-item i {
  color: #556ee6;
  font-size: 16px;
}

.pd-hero-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(85, 110, 230, 0.1);
  color: #556ee6;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.pd-known-for {
  font-size: 13.5px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.5;
  background: rgba(85, 110, 230, 0.03);
  border-left: 3px solid #556ee6;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
}

.pd-known-for strong {
  color: #1e293b;
  font-weight: 700;
}

.pd-known-for a {
  color: #556ee6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.pd-known-for a:hover {
  color: #3b50b2;
  text-decoration: underline;
}

.pd-bio-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 18px;
  max-height: 100px;
  overflow-y: auto;
  padding-right: 6px;
}

.pd-bio-text::-webkit-scrollbar {
  width: 4px;
}
.pd-bio-text::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.pd-btn-primary {
  background: #556ee6;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(85, 110, 230, 0.25);
}
.pd-btn-primary:hover {
  background: #465cd0;
  transform: translateY(-1px);
}

.pd-btn-outline {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155 !important;
}
.pd-btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pd-btn-imdb {
  background: #f5c518;
  color: #000000 !important;
  font-weight: 800;
}
.pd-btn-imdb:hover {
  background: #e2b616;
  transform: translateY(-1px);
}

.pd-btn-tmdb {
  background: #01b4e4;
  color: #ffffff !important;
  font-weight: 800;
}
.pd-btn-tmdb:hover {
  background: #0099c2;
  transform: translateY(-1px);
}

/* Stats Bar */
.pd-stats-bar {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  margin-bottom: 24px;
}

.pd-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(85, 110, 230, 0.08);
  color: #556ee6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.pd-stat-info {
  display: flex;
  flex-direction: column;
}

.pd-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

/* Navigation Tabs */
.pd-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.pd-tab-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-tab-btn:hover {
  color: #556ee6;
  background: rgba(85, 110, 230, 0.05);
}

.pd-tab-btn.active {
  background: #556ee6;
  color: #ffffff;
}

/* Section Title */
.pd-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-section-title i {
  color: #556ee6;
}

/* Featured Grid */
.pd-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.pd-work-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.pd-work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(85, 110, 230, 0.12);
  border-color: rgba(85, 110, 230, 0.3);
}

.pd-work-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #f1f5f9;
}

.pd-work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pd-work-card:hover .pd-work-img {
  transform: scale(1.05);
}

.pd-work-rating {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(33, 37, 41, 0.9);
  backdrop-filter: blur(4px);
  color: #f1b44c;
  font-weight: 800;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.pd-work-type-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.pd-work-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pd-work-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.pd-work-title:hover {
  color: #556ee6;
}

.pd-work-meta {
  font-size: 11px;
  color: #64748b;
}

/* Filmography Table */
.pd-table-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  margin-bottom: 26px;
  overflow-x: auto;
}

.pd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pd-table th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 2px solid #edf2f7;
  text-align: left;
}

.pd-table td {
  padding: 11px 14px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.pd-table tr:hover td {
  background: rgba(85, 110, 230, 0.025);
}

.pd-table-year {
  font-weight: 700;
  color: #64748b;
  width: 70px;
}

.pd-table-title-link {
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  transition: color 0.15s;
}

.pd-table-title-link:hover {
  color: #556ee6;
}

.pd-table-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}

.pd-table-badge.film {
  background: rgba(85, 110, 230, 0.1);
  color: #556ee6;
}

.pd-table-badge.series {
  background: rgba(52, 195, 143, 0.1);
  color: #34c38f;
}

.pd-table-role {
  color: #64748b;
  font-size: 12.5px;
  font-style: italic;
}

/* Sidebar Panels */
.pd-side-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
}

.pd-side-title {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pd-info-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 12.5px;
}

.pd-info-row:last-child {
  border-bottom: none;
}

.pd-info-label {
  color: #64748b;
  font-weight: 600;
}

.pd-info-value {
  color: #1e293b;
  font-weight: 700;
  text-align: right;
}

/* Related People Grid */
.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pd-related-item {
  text-align: center;
  text-decoration: none;
  display: block;
}

.pd-related-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 3px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: transform 0.2s ease;
}

.pd-related-item:hover .pd-related-avatar {
  transform: scale(1.05);
  border-color: #556ee6;
}

.pd-related-name {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Popularity / Rating Box */
.pd-rating-score-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.pd-rating-score-big {
  font-size: 2rem;
  font-weight: 900;
  color: #1e293b;
  line-height: 1;
}

.pd-rating-stars {
  color: #f1b44c;
  font-size: 16px;
  display: flex;
  gap: 2px;
}

.pd-rating-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pd-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

.pd-rating-bar-track {
  flex: 1;
  height: 5px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.pd-rating-bar-fill {
  height: 100%;
  background: #f1b44c;
  border-radius: 10px;
}

/* Person Catalog (Listing Page) Styles */
.pd-catalog-header {
  margin-bottom: 22px;
}

.pd-catalog-controls {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.pd-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.pd-search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}

.pd-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}

.pd-search-input:focus {
  border-color: #556ee6;
}

.pd-sort-select {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  outline: none;
  background: #ffffff;
}

.pd-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.pd-person-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.pd-person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(85, 110, 230, 0.12);
  border-color: rgba(85, 110, 230, 0.4);
}

.pd-person-card-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #f8fafc;
}

.pd-avatar-placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(85, 110, 230, 0.08) 0%, rgba(85, 110, 230, 0.18) 100%) !important;
  color: #556ee6 !important;
}

.pd-person-card-avatar.pd-avatar-placeholder {
  font-size: 44px;
}

.pd-hero-avatar.pd-avatar-placeholder {
  font-size: 72px;
  width: 100%;
  height: 100%;
  min-height: 250px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 4px solid #ffffff;
}

.pd-related-avatar.pd-avatar-placeholder {
  font-size: 22px;
  border-radius: 8px;
}

.pd-person-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.pd-person-card-count {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 10px;
}

.pd-person-card-btn {
  font-size: 11px;
  font-weight: 700;
  color: #556ee6;
  background: rgba(85, 110, 230, 0.08);
  padding: 4px 12px;
  border-radius: 6px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .pd-hero-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .pd-hero-avatar-wrap {
    width: 180px;
  }
  .pd-hero-avatar {
    height: 240px;
  }
  .pd-hero-meta-row {
    justify-content: center;
  }
  .pd-hero-actions {
    justify-content: center;
  }
  .pd-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .pd-hero-card {
    padding: 18px;
  }
  .pd-hero-name {
    font-size: 1.6rem;
  }
  .pd-featured-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .pd-catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pd-person-card-avatar {
    width: 85px;
    height: 85px;
  }
}

/* Catalog Pagination Box */
.pd-pagination-box {
  width: 100%;
  margin-top: 28px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.pd-pagination-box nav {
  width: 100%;
}

.pd-pagination-box .pagination {
  margin-bottom: 0;
  gap: 4px;
}

.pd-pagination-box .page-item .page-link {
  border-radius: 8px;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
  border-color: #e2e8f0;
  padding: 6px 12px;
}

.pd-pagination-box .page-item.active .page-link {
  background: #556ee6;
  border-color: #556ee6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(85, 110, 230, 0.35);
}

.pd-pagination-box .page-item .page-link:hover {
  background: rgba(85, 110, 230, 0.08);
  border-color: #556ee6;
  color: #556ee6;
}

