/* ===== Reset & Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: #0f1115;
  color: #e8e8e8;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 20px 16px; }
@media (min-width: 861px) {
  .video-detail { max-width: 720px; }
}

/* ===== Header ===== */
.site-header {
  background: #14161c;
  border-bottom: 1px solid #22252d;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: #ff4d5e; }
.logo-img { width: 40px; height: 40px; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.logo-text { line-height: 1; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.header-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.country-filter {
  background: #1e2129;
  color: #fff;
  border: 1px solid #2c303a;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.search-box {
  display: flex;
  border: 1px solid #2c303a;
  border-radius: 6px;
  overflow: hidden;
}
.search-box input {
  background: #1e2129;
  border: none;
  color: #fff;
  padding: 8px 10px;
  font-size: 14px;
  width: 200px;
}
.search-box button {
  background: #ff4d5e;
  border: none;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
}

/* ===== Promo Strip (replaces old image slider) ===== */
.promo-strip {
  background: #14161c;
  border-bottom: 1px solid #22252d;
}
.promo-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  text-align: center;
}
.promo-strip-logo { display: block; flex-shrink: 0; line-height: 0; }
.promo-strip-logo-img { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.promo-strip-text {
  color: #e8e8e8;
  font-size: 15px;
  font-weight: 500;
}
.promo-strip-btn {
  flex-shrink: 0;
  background: #ff4d5e;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 6px;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.promo-strip-btn:hover { opacity: .88; }
@media (max-width: 700px) {
  .promo-strip-inner { padding: 10px 14px; gap: 10px 16px; }
  .promo-strip-logo-img { height: 28px; max-width: 110px; }
  .promo-strip-text { font-size: 12.5px; }
  .promo-strip-btn { font-size: 12.5px; padding: 8px 16px; }
}

/* ===== Section Title ===== */
.section-title {
  font-size: 20px;
  margin: 5px 0 10px;
  padding-left: 12px;
  border-left: 4px solid #ff4d5e;
}
.popular-section { margin-bottom: 12px; }

/* ===== Video Grid (responsive: rows & columns per device) ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 621px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
}

/* Related videos on the video detail page stay capped at 3 per row on desktop */
.related-section .video-grid,
.star-section .video-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 621px) {
  .related-section .video-grid,
  .star-section .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
.star-section { margin-bottom: 12px; }

.video-card { display: block; }
.card-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 5;
  background: #1a1c22;
}
.card-image-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  transition: background .3s ease;
}
.overlay-play-icon {
  width: clamp(46px, 6vw, 72px); height: clamp(46px, 6vw, 72px);
  border-radius: 50%;
  background: rgba(255,77,94,.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(.8);
  transition: all .3s ease;
}
.overlay-play-icon svg { width: 45%; height: 45%; }
.overlay-text {
  color: #fff;
  font-weight: 700;
  font-size: clamp(14px, 1.6vw, 22px);
  text-align: center;
  padding: 0 10px;
  opacity: 0;
  transform: scale(.9);
  transition: all .3s ease;
}
.video-card:hover .card-image-wrap img,
.video-card:active .card-image-wrap img { transform: scale(1.08); }
.video-card:hover .card-overlay,
.video-card:active .card-overlay { background: rgba(0,0,0,.55); }
.video-card:hover .overlay-play-icon,
.video-card:active .overlay-play-icon,
.video-card:hover .overlay-text,
.video-card:active .overlay-text { opacity: 1; transform: scale(1); }

.card-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; margin: 30px 0; }
.pagination ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; }
.page-link {
  display: inline-block;
  padding: 8px 14px;
  background: #1e2129;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
}
.page-link.active { background: #ff4d5e; }
.dots { padding: 8px 4px; color: #666; }

.no-results { text-align: center; padding: 40px; color: #888; }

/* ===== Footer ===== */
.site-footer {
  background: #14161c;
  border-top: 1px solid #22252d;
  margin-top: 40px;
  padding: 24px 16px;
  text-align: center;
}
.footer-links a { color: #ccc; font-size: 14px; }
.footer-links a:hover { color: #ff4d5e; }
.footer-links .sep { margin: 0 10px; color: #444; }
.footer-text { margin-top: 10px; color: #666; font-size: 13px; }

/* ===== Video Detail Page ===== */
.video-title-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
}
.video-title-row h1 { font-size: 22px; }
.country-badge {
  background: #ff4d5e; color: #fff; padding: 4px 12px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
}
.large-poster-wrap { position: relative; display: block; margin-bottom: 16px; overflow: hidden; border-radius: 10px; }
.large-poster { width: 100%; border-radius: 10px; max-height: 520px; object-fit: cover; transition: transform .4s ease; }
.poster-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: background .3s ease;
}
.poster-play-icon {
  width: clamp(56px, 7vw, 86px); height: clamp(56px, 7vw, 86px);
  border-radius: 50%;
  background: rgba(255,77,94,.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  flex-shrink: 0;
  transition: transform .3s ease;
}
.poster-play-icon svg { width: 42%; height: 42%; }
.poster-overlay-text {
  color: #fff;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  text-align: center;
  padding: 0 16px;
  opacity: 0;
  transform: scale(.9);
  transition: all .3s ease;
}
.large-poster-wrap:hover .large-poster,
.large-poster-wrap:active .large-poster { transform: scale(1.04); }
.large-poster-wrap:hover .poster-overlay,
.large-poster-wrap:active .poster-overlay { background: rgba(0,0,0,.45); }
.large-poster-wrap:hover .poster-play-icon,
.large-poster-wrap:active .poster-play-icon { transform: scale(1.08); }
.large-poster-wrap:hover .poster-overlay-text,
.large-poster-wrap:active .poster-overlay-text { opacity: 1; transform: scale(1); }
.thumbnail-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.thumb-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; }
@media (max-width: 620px) { .thumbnail-row { gap: 6px; } }

.watch-buttons { display: flex; flex-direction: row; flex-wrap: wrap; gap: 24px; margin-bottom: 24px; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
.watch-btn { background: #ff4d5e; color: #fff; }
.watch-btn.alt { background: #2c303a; color: #fff; }
.watch-btn:hover { opacity: .88; }
.watch-buttons .watch-btn {
  flex: 1 1 260px;
  padding: 20px 32px;
  font-size: 18px;
  border-radius: 10px;
}
@media (max-width: 620px) {
  .watch-buttons { flex-direction: column; gap: 16px; }
  .watch-buttons .watch-btn { flex: 1 1 auto; }
}

.tutorial-block { margin-bottom: 30px; }
.tutorial-block .section-title { margin-top: 0; }

.youtube-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.youtube-col {
  flex: 1 1 260px;
  max-width: 320px;
}
.youtube-col-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  background: #2c303a;
  padding: 6px 0;
  border-radius: 6px;
}
.youtube-embed-vertical {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 177.78%; /* 9:16 */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.youtube-embed-vertical iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}

.yt-facade { cursor: pointer; }
.yt-facade-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-facade-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,77,94,.9);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .2s ease;
}
.yt-facade:hover .yt-facade-play { transform: translate(-50%, -50%) scale(1.08); }

@media (max-width: 620px) {
  .youtube-row { flex-wrap: nowrap; gap: 10px; }
  .youtube-col { flex: 1 1 0; max-width: 48%; min-width: 0; }
  .youtube-col-title { font-size: 12px; padding: 5px 0; }
}

/* Legacy 16:9 embed (kept in case a single widescreen video is used elsewhere) */
.youtube-embed {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}
@media (max-width: 700px) {
  .youtube-embed { border-radius: 6px; }
}

.static-page .static-content { color: #ccc; max-width: 800px; }

/* ===== Responsive Header ===== */
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .header-controls {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .header-controls.open { display: flex; }
  .search-box input { width: 100%; }
}
