body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: white;
  overflow-x: hidden;
  background-color: #0b0204;
}

/* ===== HỆ THỐNG BACKGROUND CHUYỂN CẢNH LIÊN TỤC ===== */
.bg-slider {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: brightness(0.28) contrast(1.1);
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.bg-slide.active {
  opacity: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(11,2,4,0.2) 10%, rgba(11,2,4,0.95) 100%);
  z-index: -1;
}

#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #be123c, #f43f5e);
  box-shadow: 0 0 15px #be123c;
  z-index: 999;
}

/* ===== CẤU TRÚC GIAO DIỆN PHÂN ĐOẠN ===== */
.scene {
  min-height: 85vh; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
  padding: 40px 20px; 
  box-sizing: border-box;
}

.scene.active { 
  opacity: 1; 
  transform: translateY(0); 
}

.title {
  font-size: 60px;
  font-family: 'Playfair Display', serif;
  text-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 17px;
  max-width: 600px;
  color: #fb7185;
  font-weight: 300;
  margin-top: 10px;
}

.card {
  max-width: 850px;
  width: 100%;
  background: rgba(15, 3, 6, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 24px;
  padding: 35px;
  box-sizing: border-box;
}

.card h2 {
  font-size: 26px;
  color: #f43f5e;
  font-family: 'Playfair Display', serif;
  margin-bottom: 20px;
}

.poem-text {
  font-size: 16px; 
  line-height: 2; 
  color: #e2d5de; 
  margin: 0;
  white-space: pre-line;
  font-style: italic;
}

.video-scene-card {
  max-width: 850px !important;
  overflow: hidden !important;
}

/* ===== KHUNG PHÁT LỚN CHI TIẾT HAI CỘT ===== */
.main-player {
  width: 100%;
  max-width: 800px; 
  margin: 0 auto;
  display: none; 
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #f43f5e;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.4);
  background: #000;
  padding: 15px;
  box-sizing: border-box;
}

.close-player-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(11, 2, 4, 0.85);
  color: white;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  z-index: 10;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Đảm bảo khung hiển thị thông tin Hồng Nhan luôn chuẩn 2 cột */
.player-flex-container {
  display: flex !important;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Đảm bảo hình ảnh/video bên trái không bị vỡ khung */
.media-box-left {
  flex: 1;
  max-width: 400px; /* Điều chỉnh kích thước ảnh phù hợp với thiết kế của bạn */
}

.media-box-left {
  flex: 1.2;
  max-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.media-box-left img, .media-box-left video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.info-box-right {
  flex: 0.8;
  background: rgba(20, 10, 15, 0.95);
  border: 1px solid #fb7185;
  border-radius: 8px;
  padding: 20px;
  text-align: left;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-title {
  font-family: 'Playfair Display', serif;
  color: #fb7185;
  font-size: 19px;
  margin-bottom: 15px;
  border-bottom: 1px dashed rgba(251, 113, 133, 0.3);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.info-item span {
  color: #fda4af;
  font-weight: 600;
}

/* ===== SLIDER HIỂN THỊ DANH SÁCH ===== */
.slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 15px;
  padding-bottom: 10px;
}

.video-track {
  display: flex;
  gap: 15px;
  width: max-content;
  animation: scrollInfinite 28s linear infinite; 
}

.slider-container:hover .video-track,
.slider-container.paused .video-track {
  animation-play-state: paused;
}

.video-card {
  width: 150px;
  background: rgba(20, 5, 8, 0.8);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(244,63,94,0.15);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: #f43f5e;
}

.video-thumb {
  width: 100%;
  height: 230px; 
  background: #000;
  overflow: hidden;
  position: relative;
}

.video-thumb video, .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  pointer-events: none; 
}

.video-card.is-video .video-thumb::after {
  content: '▶';
  font-size: 13px;
  color: #f43f5e;
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(11, 2, 4, 0.7);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(244,63,94,0.3);
}

.video-info {
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  color: #e2d5de;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #140508;
  border-top: 1px solid rgba(244,63,94,0.1);
}

@keyframes scrollInfinite {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}

/* Trạm Lưu Giữ Ký Ức (Chạy sang trái) */
.track-left {
  animation: scrollLeft 30s linear infinite;
}

/* Tuyệt Sắc Giai Nhân (Chạy sang phải) */
.track-right {
  animation: scrollRight 30s linear infinite;
}

@keyframes scrollLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scrollRight {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.btn {
  margin-top: 20px;
  padding: 13px 35px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.4);
}

/* Responsive di động */
@media (max-width: 768px) {
  .title { font-size: 42px; }
  .card { padding: 25px 15px; }
  .video-card { width: 130px; }
  .video-thumb { height: 190px; }
  
  .player-flex-container {
    flex-direction: column;
  }
  .media-box-left {
    max-height: 350px;
  }
}

.video-thumb img, .video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Giúp ảnh/video bên trong hàng trượt không bị bóp méo */
}