/* ==========================================================================
   ANISHIFT - ANIME DETAILS PAGE STYLES (anime-details.css)
   Purely dedicated styles that inherit 100% of tokens from style.css
   Compatible with Light & Dark themes
   ========================================================================== */

/* --------------------------------------------------
   1. HERO DETAIL CARD (Matches user mockup image)
   -------------------------------------------------- */
.details-hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  box-shadow: none; /* No box-shadow */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.25s, border-color 0.25s;
}

/* Anime Banner Background (Black and White Grayscale) */
.details-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(1.18);
  -webkit-filter: grayscale(100%) contrast(1.18);
  opacity: 0.20;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease, background-image 0.4s ease;
}

[data-theme="dark"] .details-hero-bg,
[data-theme="oled"] .details-hero-bg,
[data-theme="navy"] .details-hero-bg {
  opacity: 0.24;
  filter: grayscale(100%) contrast(1.22) brightness(0.85);
  -webkit-filter: grayscale(100%) contrast(1.22) brightness(0.85);
}

/* Glass Gradient Overlay Mask */
.details-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card) 26%,
    rgba(255, 255, 255, 0.88) 60%,
    rgba(255, 255, 255, 0.40) 100%
  );
  z-index: 2;
  pointer-events: none;
}

[data-theme="dark"] .details-hero-mask {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card) 26%,
    rgba(18, 18, 20, 0.88) 60%,
    rgba(18, 18, 20, 0.45) 100%
  );
}

[data-theme="oled"] .details-hero-mask {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card) 26%,
    rgba(8, 8, 10, 0.92) 60%,
    rgba(8, 8, 10, 0.45) 100%
  );
}

[data-theme="navy"] .details-hero-mask {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-card) 26%,
    rgba(38, 37, 59, 0.90) 60%,
    rgba(38, 37, 59, 0.45) 100%
  );
}

/* Hero Content Flex Layout */
.details-hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 32px;
  padding: 32px;
  align-items: flex-start;
}

/* --------------------------------------------------
   2. HERO POSTER & METADATA
   -------------------------------------------------- */
/* Poster Box matching user screenshot */
.details-poster-box {
  width: 215px;
  min-width: 215px;
  aspect-ratio: 2 / 2.95;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: none; /* No box-shadow */
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  position: relative;
  flex-shrink: 0;
}

.details-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.details-poster-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border-radius: var(--radius-md);
}

.details-poster-box:hover .details-poster-img {
  transform: scale(1.02);
}

/* Info Column Next to Poster */
.details-meta-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Breadcrumb */
.details-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.details-breadcrumb a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.details-breadcrumb a:hover {
  color: var(--text-main);
}

.details-breadcrumb .bc-sep {
  font-size: 11px;
  opacity: 0.6;
}

.details-breadcrumb .bc-current {
  color: var(--text-main);
  font-weight: 600;
}

/* Title */
.details-main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-top: 2px;
}

/* Alternative Title matching user screenshot */
.details-alt-title {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
  margin-top: -6px;
  margin-bottom: 2px;
}

/* Badges Row */
.details-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Action Buttons Row */
.details-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 2px;
}

/* v4.02 Status Button Styling */
.btn-request-anime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-request-anime.ready-watch {
  background: var(--accent-primary, #1e90ff) !important;
  color: #ffffff !important;
  cursor: pointer;
  border: none;
}
.btn-request-anime.ready-watch:hover {
  background: var(--accent-primary-hover, #0d80f2) !important;
}

.btn-request-anime.btn-requested {
  background: #3a3951 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  cursor: not-allowed;
  opacity: 0.95;
}

.btn-request-anime.btn-request-regular {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none;
  cursor: pointer;
}
.btn-request-anime.btn-request-regular:hover {
  background: #dc2626 !important;
}

.btn-request-anime.btn-request-admin {
  background: #f59e0b !important;
  color: #000000 !important;
  border: none;
  font-weight: 700;
  cursor: pointer;
}
.btn-request-anime.btn-request-admin:hover {
  background: #d97706 !important;
}

/* Disabled Upcoming Badge Button */
.btn-upcoming-disabled {
  background: rgba(148, 163, 184, 0.12) !important;
  color: var(--text-muted, #94a3b8) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ADD TO LIST button - Exact match between home.html hero and anime-details.html */
.btn-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 700;
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-details:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary, #1e90ff);
  color: var(--accent-primary, #1e90ff);
}

.btn-details.active,
.btn-details.in-list {
  border-color: var(--accent-green, #10b981) !important;
  color: var(--accent-green, #10b981) !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

/* Favorite Circular Heart Button matching user screenshot */
.btn-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: none;
}

.btn-fav:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-dim);
  color: #ef4444;
}

.btn-fav.active {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
}

/* Synopsis */
.details-synopsis-wrap {
  margin-top: 2px;
}

.details-synopsis-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.synopsis-toggle-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  display: inline-block;
  transition: color 0.15s ease;
}

.synopsis-toggle-btn:hover {
  color: var(--accent-primary-hover);
}

/* Share Box inside Hero */
.details-share-wrap {
  margin-top: 8px;
  max-width: 380px;
}

/* --------------------------------------------------
   3. LOWER 2-COLUMN MAIN CONTENT GRID
   -------------------------------------------------- */
.details-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  margin-bottom: 36px;
}

.details-content-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.details-sidebar-col {
  width: 330px;
  min-width: 330px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --------------------------------------------------
   4. SIDEBAR: › INFORMATION & ● GENRES WIDGETS
   -------------------------------------------------- */
.side-widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: none; /* No box-shadow */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.25s, border-color 0.25s;
}

.side-widget-header {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-table {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

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

.info-row:first-child {
  padding-top: 0;
}

.info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.info-val {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.info-val.score-val {
  color: var(--accent-star);
  font-weight: 700;
}

.genre-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Grayscale banner background layer for sidebar cards matching home.html */
.side-widget-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-widget-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: none; /* No box-shadow */
  cursor: pointer;
}

.side-widget-item:hover {
  transform: translateY(-2px);
  border-color: var(--text-dim);
  box-shadow: none;
}

.side-item-thumb,
.side-item-info {
  position: relative;
  z-index: 1;
}

.side-item-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(1.18);
  -webkit-filter: grayscale(100%) contrast(1.18);
  opacity: 0.26;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

[data-theme="dark"] .side-item-bg,
[data-theme="oled"] .side-item-bg,
[data-theme="navy"] .side-item-bg {
  opacity: 0.32;
  filter: grayscale(100%) contrast(1.22) brightness(0.9);
  -webkit-filter: grayscale(100%) contrast(1.22) brightness(0.9);
}

.side-widget-item:hover .side-item-bg {
  opacity: 0.44;
  transform: scale(1.05);
}

/* --------------------------------------------------
   5. MORE SEASONS SECTION (Matches User Screenshot)
   -------------------------------------------------- */
.seasons-section {
  margin-bottom: 24px;
}

.seasons-scroll-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.season-card {
  position: relative;
  width: 140px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: none;
  padding: 4px;
  text-align: center;
}

.season-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.season-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(1.1);
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.25s ease;
  background-color: var(--bg-hover);
}

.season-card:hover .season-card-bg {
  transform: scale(1.08);
  filter: brightness(0.5) saturate(1.2);
}

.season-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.35) 0%, rgba(10, 15, 29, 0.8) 100%);
  pointer-events: none;
}



.season-card-title {
  position: relative;
  z-index: 2;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  transition: color 0.2s ease;
  pointer-events: none;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.season-card-sub {
  position: relative;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  margin-top: 1px;
}

.season-card.active {
  border: 2px solid var(--accent-primary) !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.season-card.active .season-card-title {
  color: var(--accent-primary);
}

.season-card.active .season-card-overlay {
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.25) 0%, rgba(10, 15, 29, 0.7) 100%);
}

/* --------------------------------------------------
   6. CAST & CHARACTERS SECTION
   -------------------------------------------------- */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.cast-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: none; /* No box shadow */
}

.cast-card:hover {
  border-color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: none;
}

.cast-half-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cast-photo {
  width: 44px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg-hover);
  flex-shrink: 0;
}

.cast-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cast-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cast-role {
  font-size: 11px;
  color: var(--text-muted);
}

.cast-half-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
  text-align: right;
}

.cast-show-more-wrap {
  text-align: center;
  margin-top: 10px;
}

/* No box shadows for anime cards */
.anime-card {
  box-shadow: none !important;
}

/* --------------------------------------------------
   7. RESPONSIVE DESIGN (DESKTOP, TABLET & MOBILE)
   -------------------------------------------------- */
@media (max-width: 1100px) {
  .details-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .details-sidebar-col {
    width: 100%;
    min-width: 0;
  }

  .info-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px 24px;
  }
}

@media (max-width: 768px) {
  .details-hero-section {
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }

  .details-hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 20px 16px;
  }

  .details-poster-box {
    width: 165px;
    min-width: 165px;
  }

  .details-breadcrumb {
    justify-content: center;
    font-size: 11.5px;
  }

  .details-main-title {
    font-size: 22px;
    word-break: break-word;
  }

  .details-alt-title {
    text-align: center;
    font-size: 12.5px;
  }

  .details-badges-row {
    justify-content: center;
    gap: 6px;
  }

  .details-actions-row {
    justify-content: center;
    width: 100%;
    gap: 10px;
  }

  .btn-watch-now,
  .btn-request-anime,
  .btn-add-list {
    flex: 1;
    min-width: 125px;
    justify-content: center;
    text-align: center;
  }

  .details-synopsis-wrap {
    text-align: left;
  }

  .details-share-wrap {
    margin: 4px auto 0;
    width: 100%;
    max-width: 100%;
  }

  .cast-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .details-hero-content {
    padding: 16px 12px;
    gap: 14px;
  }

  .details-poster-box {
    width: 138px;
    min-width: 138px;
  }

  .details-main-title {
    font-size: 18px;
    line-height: 1.3;
  }

  .details-alt-title {
    font-size: 11.5px;
  }

  .meta-chip {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .details-actions-row {
    gap: 8px;
  }

  .btn-watch-now,
  .btn-request-anime,
  .btn-add-list {
    font-size: 11.5px;
    padding: 8px 12px;
    min-width: 110px;
  }

  .btn-fav {
    width: 35px;
    height: 35px;
    font-size: 13px;
  }

  .details-synopsis-text {
    font-size: 12.5px;
    line-height: 1.55;
  }

  .info-table {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cast-card {
    padding: 7px 8px;
  }

  .cast-photo {
    width: 38px;
    height: 50px;
  }

  .cast-name {
    font-size: 11.5px;
  }

  .cast-role {
    font-size: 10px;
  }
}
