/* ============================================
   Film Fusion - Description Page
   ============================================ */

/* Layout */
.detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-6);
  padding-top: var(--sp-12);
}

/* Title */
.detail-title {
  display: block;
  visibility: visible;
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-8);
  line-height: 1.2;
  color: var(--text-primary);
  opacity: 1;
}

/* Hero Section */
.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
  align-items: stretch;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.detail-trailer {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.trailer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--accent);
  transition: all var(--ease-normal);
}

.trailer-link:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

/* Actions */
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.genre-tag {
  display: inline-block;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--ease-fast);
}

.genre-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.add-watchlist-btn {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--ease-fast);
}

.add-watchlist-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Watched Button */
.watched-btn {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--ease-fast);
}

.watched-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.watched-btn.active {
  color: var(--success);
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.share-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.share-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--ease-fast);
}

.share-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.share-btn.twitter:hover {
  color: #1da1f2;
}
.share-btn.facebook:hover {
  color: #4267b2;
}
.share-btn.whatsapp:hover {
  color: #25d366;
}

/* Synopsis */
.detail-synopsis {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--sp-10);
  max-width: 800px;
}

/* Info Grid */
.detail-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  padding: var(--sp-6);
  margin-bottom: var(--sp-10);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.info-item label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-1);
}

.info-item span {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
}

/* Watch Providers */
.watch-providers {
  margin-bottom: var(--sp-10);
}

.providers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.provider-item {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--ease-fast);
}

.provider-item:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.provider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Box Office */
.box-office {
  margin-bottom: var(--sp-10);
}

.box-office-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  padding: var(--sp-4);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.box-item {
  text-align: center;
}

.box-item label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.box-item span {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.box-item span.positive {
  color: var(--success);
}

.box-item span.negative {
  color: var(--error);
}

/* Videos Gallery */
.videos-section {
  margin-bottom: var(--sp-10);
}

.videos-row {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
}

.video-item {
  flex-shrink: 0;
  width: 280px;
}

.video-item a {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.video-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: all var(--ease-normal);
}

.video-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.video-item .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-full);
  color: white;
}

.video-item p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Images Gallery */
.images-section {
  margin-bottom: var(--sp-10);
}

.images-row {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
}

.gallery-image {
  flex-shrink: 0;
  height: 150px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--ease-normal);
}

.gallery-image:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.gallery-image img {
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* Section Headers */
.detail-section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--sp-6);
}

.detail-section-title::before {
  content: "";
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* Cast */
.cast-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}

.cast-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
}

.cast-photo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--bg-elevated);
  transition: all var(--ease-normal);
}

.cast-member:hover .cast-photo {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.cast-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  max-width: 100px;
}

.cast-character {
  font-size: var(--text-xs);
  color: var(--text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Similar */
.similar-section {
  display: none;
  margin-top: var(--sp-12);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border);
}

.similar-section.visible {
  display: block;
}

.similar-row {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-6);
  scroll-snap-type: x mandatory;
}

.similar-row::-webkit-scrollbar {
  height: 6px;
}

.similar-row::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--radius-full);
}

.similar-card {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--ease-normal);
}

.similar-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}

.similar-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: all var(--ease-slow);
}

.similar-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.35);
}

.similar-card p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  opacity: 0;
  transition: opacity var(--ease-normal);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.similar-card:hover p {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .detail-hero {
    grid-template-columns: 280px 1fr;
    gap: var(--sp-6);
  }
}

@media (max-width: 768px) {
  .detail-page {
    padding: var(--sp-4);
  }

  .detail-title {
    font-size: var(--text-2xl);
    text-align: center;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .detail-poster {
    max-width: 240px;
    margin: 0 auto;
  }

  .detail-actions {
    justify-content: center;
  }

  .detail-synopsis {
    font-size: var(--text-base);
    text-align: center;
  }

  .detail-info {
    justify-content: center;
    text-align: center;
  }

  .cast-grid {
    justify-content: center;
  }

  .cast-photo {
    width: 80px;
    height: 80px;
  }

  .similar-card {
    width: 120px;
  }
}
