/* Toffee-style Live TV Site - Category Section Full Layout */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #14141f;
  --bg-card-hover: #1a1a28;
  --accent: #e85d04;
  --accent-hover: #f48c42;
  --accent-soft: rgba(232, 93, 4, 0.2);
  --accent-pink: #ff2e83;
  --accent-pink-hover: #ff5aa5;
  --text: #f5f5f7;
  --text-muted: #8e8e93;
  --border: #2a2a35;
  --live-badge: #e63946;
  --radius: 12px;
  --header-height: 64px;
  --section-bg: #0b0014;
  --container-max: 1280px;
  --section-padding-x: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #0a0013 0%, #12001f 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.25rem;
}

.logo-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

@media (max-width: 480px) {
  .logo-tagline {
    display: none;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--accent-soft);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visitor-counter {
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.btn-search,
.btn-user {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-search:hover,
.btn-user:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.btn-signin {
  width: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.header-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.header-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-add-tv.header-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-add-tv.header-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-form {
  padding: 0 20px 20px;
}

.modal-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.modal-form input,
.modal-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 16px;
}

.modal-form input:focus,
.modal-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  color: #e63946;
  font-size: 0.875rem;
  margin-bottom: 12px;
  min-height: 1.2em;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: var(--accent-hover);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  /* Keep above header/player UI so it always appears */
  z-index: 2000;
  display: none;
  pointer-events: auto;
}

.search-overlay.open {
  display: block;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.search-results {
  max-width: 600px;
  margin: 12px auto 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-results .channel-card {
  margin-bottom: 8px;
}

/* Hero Slider */
.hero-slider {
  margin-top: var(--header-height);
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 50%, rgba(232, 93, 4, 0.12) 100%);
  background-size: cover;
  background-position: center;
}

.hero-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 10, 15, 0.85) 0%, transparent 50%);
  pointer-events: none;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-slide .hero-badge {
  display: inline-block;
  background: var(--live-badge);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-slide-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-slide-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Category sections – Section Container (Exact Layout) */
.category-section {
  width: 100%;
  margin: 40px 0 30px;
  background: #0b0014;
}

.category-section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 60px;
}

.category-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  height: 40px;
}

.category-section .section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.category-section .see-all {
  font-size: 14px;
  color: #ff2e83;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
}

.category-section .see-all:hover {
  color: #ff4fa1;
}

.channel-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.channel-row::-webkit-scrollbar {
  display: none;
}

/* Circle channel card (category row) – 92px desktop */
.channel-row .channel-card--circle {
  flex: 0 0 92px;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.channel-row .channel-card--circle:hover {
  transform: none;
  border: none;
  box-shadow: none;
}

.channel-row .channel-card--circle .card-circle-wrap {
  position: relative;
  flex-shrink: 0;
}

.channel-row .channel-card--circle .thumb {
  width: 92px;
  height: 92px;
  min-width: 92px;
  min-height: 92px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  position: relative;
}

.channel-row .channel-card--circle:hover .thumb {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.channel-row .channel-card--circle .thumb img {
  max-width: 60px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}

.channel-row .channel-card--circle .thumb span {
  font-size: 2rem;
  color: #333;
}

.channel-row .channel-card--circle .live-badge-row {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff2e83;
  color: white;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.channel-row .channel-card--circle .channel-card-name {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-row .channel-card--circle .info {
  display: none;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.btn-play:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-play-icon {
  font-size: 0.9rem;
}

/* Hero (legacy single hero - keep for any reuse) */

/* Sections */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

#live.section {
  margin-top: var(--header-height);
  padding-top: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.see-all {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.see-all:hover {
  text-decoration: underline;
}

/* Tabs */
.section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* STV-style download bar */
.stv-download-bar {
  text-align: center;
  margin-top: var(--header-height);
  padding: 12px 0 4px;
}

.stv-download-btn {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.stv-download-btn:hover {
  background: #22c55e;
}

/* STV full layout: blurred bg + player left + sidebar right */
.stv-main {
  position: relative;
  min-height: calc(100vh - var(--header-height) - 80px);
  padding: 16px 6px 24px;
}

.stv-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, #1e3a5f 0%, #0f172a 35%, #0c4a6e 70%, #0e7490 100%);
  background-size: cover;
  background-position: center;
}

.stv-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><filter id="f"><feTurbulence baseFrequency="0.02" numOctaves="2"/><feColorMatrix values="0 0 0 0 0.2 0 0 0 0 0.4 0 0 0 0 0.6 0 0 0 0.4 0"/></filter></defs><rect width="100%25" height="100%25" filter="url(%23f)" opacity="0.15"/></svg>') center/cover;
  pointer-events: none;
}

.stv-layout {
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.stv-player-col {
  flex: 1 1 70%;
  min-width: 0;
  margin: 0;
}

/* STV লেআউটে প্লেয়ার বক্স পুরো কলাম জুড়ে, ফাঁকা না রাখতে */
.stv-player-col .player-container,
.stv-player-col .stv-player-box {
  max-width: none;
  width: 100%;
}

.stv-player-box {
  max-width: 100%;
  width: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.stv-player-box .player-wrapper {
  margin-bottom: 0;
}

.stv-player-box .player-info {
  padding: 10px 14px;
  background: rgba(0,0,0,0.6);
}

.stv-player-box .player-info h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.stv-player-box .player-info p {
  font-size: 0.85rem;
}

.stv-player-box .player-channels {
  max-height: 140px;
  padding: 8px 12px;
}

/* Right sidebar: glass panel – ৭০/৩০ (প্লেয়ার ৭০%, সাইডবার ৩০%) */
.stv-sidebar {
  flex: 1 1 30%;
  min-width: 280px;
  margin: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stv-tabs {
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.stv-tabs::-webkit-scrollbar {
  display: none;
}

.stv-tabs .tab {
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

.stv-tabs .tab:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.stv-tabs .tab.active {
  background: rgba(255,255,255,0.95);
  color: #111;
  border-color: rgba(255,255,255,0.95);
}

.stv-channel-panel {
  max-height: calc(100vh - var(--header-height) - 220px);
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.stv-channel-panel .channel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stv-channel-panel .channel-card {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
}

.stv-channel-panel .channel-card:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--accent);
}

.stv-channel-panel .channel-card .name {
  font-size: 0.8rem;
}

.stv-channel-panel .channel-card .category {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
}

.stv-channel-panel .channel-card .info {
  padding: 8px;
}

/* Channel grid (default) */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.channel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.channel-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.channel-card .thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(145deg, var(--bg-card-hover), var(--bg-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.channel-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-card .live-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--live-badge);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.channel-card .info {
  padding: 12px;
}

.channel-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.channel-card .category {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Card row (horizontal scroll for movies/series/drama) */
.card-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.card-row::-webkit-scrollbar {
  height: 6px;
}

.card-row::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 3px;
}

.card-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.content-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.content-card:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

.content-card .thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(145deg, var(--bg-card-hover), var(--bg-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.content-card .info {
  padding: 12px;
}

.content-card .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.content-card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Video Player (ডিফল্ট - নেটিভ কন্ট্রোল) */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(var(--header-height) + 24px);
}

.player-overlay.open {
  display: flex;
}

.player-container {
  width: 100%;
  max-width: 900px;
  position: relative;
}

.player-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  transition: background 0.2s;
}

.player-close:hover {
  background: var(--accent);
}

.player-wrapper {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  aspect-ratio: 16/9;
}

.player-wrapper video {
  width: 100%;
  display: block;
}

/* Custom player skin – টপ/বটম বার + প্রোগ্রেস + কন্ট্রোল */
.custom-player-wrap {
  position: relative;
}

/* Horizontal flip / mirror for video (e.g. for Facebook Live) */
.custom-player-wrap video.cp-video-mirror {
  transform: scaleX(-1);
}

.custom-player-wrap video {
  display: block;
  width: 100%;
  vertical-align: top;
}

/* Fullscreen: no bars, cover whole screen (like StackFit.expand) */
.custom-player-wrap:fullscreen,
.custom-player-wrap:-webkit-full-screen,
.custom-player-wrap:-moz-full-screen,
.custom-player-wrap:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
  aspect-ratio: unset;
}

.custom-player-wrap:fullscreen video,
.custom-player-wrap:-webkit-full-screen video,
.custom-player-wrap:-moz-full-screen video,
.custom-player-wrap:-ms-fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SafeArea(bottom/top): keep controls away from system bars */
.custom-player-wrap:fullscreen .cp-overlay.cp-bottom,
.custom-player-wrap:-webkit-full-screen .cp-overlay.cp-bottom,
.custom-player-wrap:-moz-full-screen .cp-overlay.cp-bottom,
.custom-player-wrap:-ms-fullscreen .cp-overlay.cp-bottom {
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

.custom-player-wrap:fullscreen .cp-overlay.cp-top,
.custom-player-wrap:-webkit-full-screen .cp-overlay.cp-top,
.custom-player-wrap:-moz-full-screen .cp-overlay.cp-top,
.custom-player-wrap:-ms-fullscreen .cp-overlay.cp-top {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

/* Lock button: centerLeft in fullscreen */
.custom-player-wrap:fullscreen #cpLock,
.custom-player-wrap:-webkit-full-screen #cpLock,
.custom-player-wrap:-moz-full-screen #cpLock,
.custom-player-wrap:-ms-fullscreen #cpLock {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
}

.cp-overlay {
  position: absolute;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
  color: #fff;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s ease;
}

.cp-overlay.cp-bottom {
  bottom: 0;
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding-top: 24px;
  padding-bottom: 14px;
}

.cp-top {
  top: 0;
  padding-bottom: 40px;
  justify-content: space-between;
}

.cp-back {
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
  min-width: 36px;
}

.cp-title {
  flex: 1;
  margin: 0 12px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-top-right {
  display: flex;
  gap: 6px;
}

.cp-menu-wrap {
  position: relative;
}

.cp-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 180px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 6px 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  z-index: 10;
  display: none;
}

.cp-menu-dropdown.open {
  display: block;
}

.cp-menu-dropdown[aria-hidden="false"] {
  display: block;
}

.cp-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.95);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.cp-menu-item:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.cp-menu-item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cp-menu-item-check {
  opacity: 0;
  font-weight: 700;
  color: var(--accent);
}
.cp-menu-item-toggle[aria-pressed="true"] .cp-menu-item-check {
  opacity: 1;
}

.cp-share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  background: rgba(15,23,42,0.95);
  color: #fff;
  font-size: 0.9rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.cp-share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Facebook Live modal */
.fb-live-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.fb-live-modal.open {
  opacity: 1;
  visibility: visible;
}
.fb-live-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  cursor: pointer;
}
.fb-live-modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.fb-live-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.fb-live-modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.fb-live-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.fb-live-modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.1);
}
.fb-live-modal-body {
  padding: 20px;
}
.fb-live-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}
.fb-live-modal-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.fb-live-modal-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.fb-live-modal-url {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
}
.fb-live-modal-btn-copy {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.fb-live-modal-btn-copy:hover {
  background: var(--accent-hover);
}
.fb-live-modal-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  padding: 10px 12px;
  background: rgba(232,93,4,0.12);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.fb-live-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fb-live-modal-btn {
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.fb-live-modal-btn-primary {
  background: #1877f2;
  color: #fff;
}
.fb-live-modal-btn-primary:hover {
  background: #1a6ed8;
  color: #fff;
}
.fb-live-modal-btn-secondary {
  background: var(--border);
  color: var(--text);
}
.fb-live-modal-btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.fb-live-modal-btn-danger {
  background: #dc2626;
  color: #fff;
}
.fb-live-modal-btn-danger:hover {
  background: #b91c1c;
  color: #fff;
}

.fb-live-modal-status {
  min-height: 24px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.fb-live-modal-actions--primary {
  margin-bottom: 16px;
}

.fb-live-modal-details {
  margin: 12px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.fb-live-modal-details summary {
  cursor: pointer;
  padding: 6px 0;
}

.cp-btn {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.96);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.cp-btn:hover {
  background: rgba(15,23,42,0.85);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}

.cp-control {
  font-size: 0.85rem;
  font-weight: 600;
}

.cp-play {
  font-size: 1.5rem;
  padding: 0;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b1120;
  border: none;
  box-shadow: 0 16px 45px rgba(21,128,61,0.6);
}

.cp-play:hover {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 18px 50px rgba(21,128,61,0.75);
}

.cp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
}

/* Progress bar hidden (no seek bar UI) */
.cp-progress-row {
  display: none;
}

.cp-time {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
  min-width: 42px;
}

.cp-time:last-child {
  text-align: right;
}

.cp-progress-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.cp-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--cp-pct, 0%);
  max-width: 100%;
  background: #3b82f6;
  border-radius: 2px;
  pointer-events: none;
}

.cp-progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: transparent;
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

.cp-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.cp-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.cp-progress::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.cp-progress::-moz-range-track {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

.cp-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.cp-bottom-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.cp-controls-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* GestureLayer – ভিডিওর উপর টাচ/সোয়াইপ এরিয়া */
.cp-gesture-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  touch-action: none;
}

/* CenterControls – মাঝখানে Replay10, Play, Forward10 */
.cp-center-controls {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
}

.cp-center-controls .cp-center-btn {
  pointer-events: auto;
}

.cp-center-btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
}

.cp-lock {
  font-size: 1rem;
}

/* SideOverlayControls – ব্রাইটনেস/ভলিউম/সিক প্রিভিউ ইন্ডিকেটর */
.cp-side-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0,0,0,0.6);
  border-radius: 12px;
  color: #fff;
  font-size: 0.85rem;
}

.cp-side-indicator.visible {
  display: flex;
}

.cp-side-indicator {
  pointer-events: none;
}

.cp-indicator-icon {
  font-size: 1.2rem;
}

.cp-brightness-indicator {
  left: 24px;
}

.cp-volume-indicator {
  right: 24px;
}

.cp-indicator-bar {
  width: 4px;
  height: 80px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.cp-indicator-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--indicator-pct, 100%);
  background: #3b82f6;
  border-radius: 2px;
  transition: height 0.1s;
}

.cp-seek-preview {
  position: absolute;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.75);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.cp-seek-preview.visible {
  display: flex;
}

.cp-seek-preview {
  pointer-events: none;
}

.cp-seek-preview-dir {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 2px;
}

/* Lock: কন্ট্রোল লক থাকলে শুধু আনলক বাটন দেখাবে */
.custom-player-wrap.controls-locked .cp-top {
  opacity: 0;
  pointer-events: none;
}

.custom-player-wrap.controls-locked .cp-bottom .cp-progress-row,
.custom-player-wrap.controls-locked .cp-bottom .cp-bottom-center,
.custom-player-wrap.controls-locked .cp-bottom #cpPip2,
.custom-player-wrap.controls-locked .cp-bottom #cpFullscreen2 {
  opacity: 0;
  pointer-events: none;
}

/* Auto-hide controls after inactivity */
.custom-player-wrap .cp-top,
.custom-player-wrap .cp-bottom {
  transition: opacity 0.25s ease;
}

.custom-player-wrap.controls-hidden .cp-top,
.custom-player-wrap.controls-hidden .cp-bottom {
  opacity: 0;
  pointer-events: none;
}

.player-error-card {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(232, 93, 4, 0.16), transparent 55%),
              rgba(0, 0, 0, 0.92);
  text-align: center;
  z-index: 5;
}

.player-error-card-inner {
  max-width: 420px;
  width: 100%;
  padding: 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg, rgba(20, 20, 31, 0.95), rgba(10, 10, 18, 0.98));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.player-error-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.player-error-card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.player-error-card-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.player-error-card-app:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.player-info {
  padding: 12px 0;
}

.player-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.player-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.player-channels {
  display: none; /* হোম স্ক্রিনে রিলেটেড চ্যানেল সারি আর দেখাবো না */
}

.player-extra-controls {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 6;
}

.player-extra-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.player-extra-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Static page content (About, Contact, Privacy, Terms) */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 48px) 24px 48px;
}

.page-content h1 {
  font-size: 1.75rem;
  margin-bottom: 24px;
  color: var(--text);
}

.page-content h2 {
  font-size: 1.25rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text);
}

.page-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.page-content a {
  color: var(--accent);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

.page-content ul {
  margin: 12px 0 16px 20px;
  color: var(--text-muted);
}

.page-content li {
  margin-bottom: 8px;
}

/* Footer */
.footer {
  margin-top: 48px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-logo .logo-icon {
  color: var(--accent);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-app {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-app:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* STV-style bottom status bar */
.stv-status-bar {
  background: #05050a;
  border-top: 1px solid #111827;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.stv-status-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Responsive */
/* Tablet 768px – 1199px: card 80px, 7–8 visible */
@media (max-width: 1199px) {
  .category-section-inner {
    padding-left: 40px;
    padding-right: 40px;
  }

  .channel-row .channel-card--circle {
    flex: 0 0 80px;
    width: 80px;
  }

  .channel-row .channel-card--circle .thumb {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
  }

  .channel-row .channel-card--circle .thumb img {
    max-width: 52px;
    max-height: 52px;
  }

  .channel-row .channel-card--circle .channel-card-name {
    max-width: 80px;
  }
}

/* Mobile ≤767px: card 68px, 4 visible, logo 45px */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
  }

  .nav {
    display: none;
  }

  .hero-slider,
  .hero-slides {
    min-height: 320px;
    height: 320px;
  }

  .hero-slide-content {
    padding: 32px 16px;
  }

  .category-section {
    margin-top: 32px;
    margin-bottom: 24px;
  }

  .category-section-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .category-section .section-header h2 {
    font-size: 18px;
  }

  .channel-row .channel-card--circle {
    flex: 0 0 68px;
    width: 68px;
  }

  .channel-row .channel-card--circle .thumb {
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
  }

  .channel-row .channel-card--circle .thumb img {
    max-width: 45px;
    max-height: 45px;
  }

  .channel-row .channel-card--circle .channel-card-name {
    max-width: 68px;
    font-size: 11px;
  }

  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .content-card {
    flex: 0 0 160px;
  }

  .section-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }

  /* STV layout – মোবাইলে কলাম ভেঙে উপরে প্লেয়ার, নিচে চ্যানেল */
  .stv-download-bar {
    padding: 10px 12px 6px;
    margin-top: var(--header-height);
  }

  .stv-download-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .stv-main {
    min-height: auto;
    padding: 12px 10px 20px;
    overflow-x: hidden;
  }

  .stv-layout {
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    margin: 0;
  }

  .stv-player-col {
    flex: none;
    width: 100%;
    min-width: 0;
    order: 1;
  }

  .stv-player-col .player-container,
  .stv-player-col .stv-player-box {
    max-width: 100%;
  }

  .stv-player-box {
    border-radius: 10px;
  }

  .stv-player-box .player-info {
    padding: 8px 12px;
  }

  .stv-player-box .player-info h3 {
    font-size: 0.95rem;
  }

  .stv-player-box .player-info p {
    font-size: 0.8rem;
  }

  .stv-sidebar {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    order: 2;
    padding: 12px;
    border-radius: 12px;
  }

  .stv-tabs {
    margin-bottom: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .stv-tabs .tab {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  .stv-channel-panel {
    max-height: min(50vh, 320px);
    -webkit-overflow-scrolling: touch;
  }

  .stv-channel-panel .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stv-channel-panel .channel-card .name {
    font-size: 0.75rem;
  }

  .stv-channel-panel .channel-card .category {
    font-size: 0.65rem;
  }

  .stv-channel-panel .channel-card .info {
    padding: 6px;
  }

  .stv-status-bar {
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .stv-status-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .player-extra-controls {
    bottom: 6px;
    right: 6px;
    gap: 4px;
  }

  .player-extra-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  /* Custom player – mobile tweaks */
  .custom-player-wrap .cp-overlay {
    padding: 8px 8px;
  }

  .cp-top {
    padding-bottom: 24px;
  }

  .cp-back {
    font-size: 1.2rem;
    padding: 2px 6px;
    min-width: 32px;
  }

  .cp-title {
    font-size: 0.85rem;
    margin: 0 8px;
  }

  .cp-btn {
    padding: 4px 6px;
    font-size: 0.85rem;
  }

  .cp-play {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .cp-bottom-center .cp-center-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .cp-brightness-indicator {
    left: 12px;
  }

  .cp-volume-indicator {
    right: 12px;
  }

  .cp-seek-preview {
    bottom: 70px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* Consent banner (AdSense CMP – EEA, UK, Switzerland) */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  padding: 14px 20px;
  background: linear-gradient(to top, rgba(20, 20, 31, 0.98), rgba(15, 23, 42, 0.98));
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.consent-banner.consent-banner-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.consent-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

.consent-banner-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.consent-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.consent-banner-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.consent-banner-btn-consent {
  background: #1877f2;
  color: #fff;
}

.consent-banner-btn-consent:hover {
  background: #1a6ed8;
}

.consent-banner-btn-manage {
  background: var(--border);
  color: var(--text);
}

.consent-banner-btn-manage:hover {
  background: var(--bg-card-hover);
}

.consent-banner-btn-deny {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
}

.consent-banner-btn-deny:hover {
  background: rgba(220, 38, 38, 0.35);
}

.consent-manage-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.consent-manage-modal.consent-manage-modal-open {
  opacity: 1;
  visibility: visible;
}

.consent-manage-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.consent-manage-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.consent-manage-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

.consent-manage-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 20px;
}

.consent-manage-desc a {
  color: var(--accent);
}

.consent-manage-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consent-manage-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-dark);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
}

.consent-manage-close:hover {
  color: var(--text);
  background: var(--border);
}
