/* =========================================================================
   CINEMA PLAYER STYLESHEET
   Trình phát video mượt mà, tối ưu trên mọi điện thoại & thiết bị
   ========================================================================= */

.watch-breadcrumbs {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.watch-breadcrumbs a {
  color: var(--text-secondary);
}

.watch-breadcrumbs a:hover {
  color: var(--primary);
}

.watch-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .watch-title {
    font-size: 16px;
  }
}

/* ================= PLAYER CONTAINER ================= */
.player-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: relative;
  margin-bottom: 14px;
}

.video-screen-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.custom-video-box {
  width: 100%;
  height: 100%;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.html5-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Tap to play overlay */
.video-tap-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.video-tap-play-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  padding-left: 4px;
  box-shadow: 0 0 30px var(--primary-glow);
  transition: transform 0.2s;
}

.video-tap-overlay:hover .video-tap-play-circle {
  transform: scale(1.1);
}

/* ================= SERVER SELECTOR TABS ================= */
.server-tabs-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.server-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.server-label i {
  color: var(--accent-gold);
}

.server-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.btn-server {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-server .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.btn-server:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-server.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.btn-server.active .dot {
  background: #fff;
  box-shadow: 0 0 6px #fff;
}

/* ================= VIDEO TOOLBAR & ACTIONS ================= */
.watch-info-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 24px;
}

.watch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.watch-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watch-cat-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.watch-views-count {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.watch-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-action-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-action-pill.active {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* Telegram CTA Box */
.telegram-cta-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(18, 20, 26, 0.95));
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tg-cta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0f2fe;
  font-size: 13px;
}

.tg-cta-left i {
  color: #38bdf8;
  font-size: 20px;
}

.btn-join-tg-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: #0ea5e9;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-join-tg-pill:hover {
  background: #0284c7;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.5);
}

/* Description Box */
.watch-desc-box {
  margin-top: 12px;
}

.watch-desc-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tags List */
.watch-tags-wrap {
  margin-top: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.watch-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.watch-tag-pill:hover {
  color: #fff;
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.25);
  transform: translateY(-1px);
}

/* ================= THEATER MODE ================= */
body.theater-mode-active #watch-view .layout-cols {
  grid-template-columns: 1fr;
}

body.theater-mode-active #watch-view .sidebar-wrapper {
  margin-top: 24px;
}

/* ================= MOBILE & DESKTOP FULLSCREEN ================= */
.custom-video-box.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding-top: 0 !important;
  z-index: 2147483647 !important;
  border-radius: 0 !important;
  background: #000 !important;
  margin: 0 !important;
}

.custom-video-box.is-fullscreen iframe,
.custom-video-box.is-fullscreen video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

body.player-fullscreen-active {
  overflow: hidden !important;
}

/* NÚT PHÓNG TO TRONG KHUNG VIDEO */
.btn-player-fullscreen {
  display: none !important; /* Ẩn trong khung video ở chế độ thường theo yêu cầu người dùng */
}

/* KHI ĐANG PHÓNG TO TOÀN MÀN HÌNH: HIỆN NÚT THU NHỎ NỔI Ở GÓC TRÊN ĐỂ BẤM THOÁT */
.custom-video-box.is-fullscreen .btn-player-fullscreen {
  display: flex !important;
  position: fixed;
  top: 16px;
  bottom: auto;
  right: 16px;
  z-index: 2147483647;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.custom-video-box.is-fullscreen .btn-player-fullscreen:hover {
  background: #ff3b30;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.6);
}

/* ================= NÚT PHÓNG TO TRONG HÀNG CHỌN SERVER ================= */
.btn-server-fullscreen {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-server-fullscreen:hover,
.btn-server-fullscreen:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 14px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-server-fullscreen i {
  color: var(--primary);
  font-size: 12.5px;
  transition: color 0.2s ease;
}

.btn-server-fullscreen:hover i,
.btn-server-fullscreen:active i {
  color: #fff;
}

@media (max-width: 640px) {
  .btn-server-fullscreen {
    margin-left: auto;
  }
}

