body{
  margin:0;
  background:#0b0b14;
  color:#fff;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

.header{
  padding:12px;
  font-weight:bold;
  font-size:20px;
}

.container{
  padding:10px;
}

.search{
  width:100%;
  padding:10px;
  border-radius:8px;
  border:none;
  margin-bottom:10px;
}

/* FILTER */
.filter-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.filter-label{
  font-size:14px;
  color:#ccc;
}

.filter-select{
  background:#141423;
  color:#fff;
  border:1px solid #2a2a44;
  border-radius:10px;
  padding:6px 12px;
  font-size:13px;
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

.card{
  background:#141423;
  border-radius:12px;
  overflow:hidden;
}

.thumb{
  width:100%;
  display:block;
}

.card h3{
  font-size:13px;
  padding:8px;
  margin:0;
  height:36px;
  overflow:hidden;
}

.card-views{
  color:#f5c542;
  font-size:12px;
  padding:0 8px 8px;
}

.pagination{
  display:flex;
  justify-content:center;
  gap:6px;
  margin:15px 0;
}

.pagination button{
  padding:5px 10px;
}

.footer{
  text-align:center;
  font-size:12px;
  color:#888;
  padding:15px 0;
}
/* ======================
   WATCH PAGE
   ====================== */

.player-wrapper{
  position:relative;
  background:#000;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:12px;
}

.player-wrapper iframe{
  width:100%;
  height:220px;
  border:none;
}

.player-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  font-weight:bold;
  background:rgba(0,0,0,.6);
  cursor:pointer;
}

.watch-title{
  font-size:16px;
  margin:10px 0 6px;
  line-height:1.4;
}

.watch-meta{
  display:flex;
  gap:14px;
  font-size:13px;
  color:#ccc;
  margin-bottom:10px;
}

.download-btn{
  display:inline-block;
  margin-bottom:16px;
  background:#ff9800;
  color:#000;
  padding:6px 14px;
  border-radius:20px;
  font-size:13px;
  text-decoration:none;
}

.section-title{
  font-size:15px;
  margin:10px 0;
}
.logo-link{
  text-decoration:none;
  color:inherit;
}
/* ===== DURATION BADGE (BOTTOM RIGHT - CLEAN) ===== */
.thumb-wrap {
  position: relative;
}

.thumb-wrap .duration {
  position: absolute;
  right: 6px;
  bottom: 6px;

  background: rgba(0, 0, 0, 0.75);
  color: #fff;

  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;

  border-radius: 4px;
  line-height: 1;
  white-space: nowrap;
}
/* ===== THUMBNAIL ROUNDED CLEAN ===== */
.thumb-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.thumb {
  width: 100%;
  display: block;
  object-fit: cover;
}
/* =========================
   FIX WATCH THUMBNAIL SIZE
   ========================= */

/* khung player giữ tỉ lệ giống thumbnail */
.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* giống thum trang chính */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

/* iframe video */
.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* thumbnail nền trước khi play */
.player-wrapper {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
/* =========================
   SYNC RELATED CARD LAYOUT
   ========================= */

/* card dùng chung */
.card {
  display: flex;
  flex-direction: column;
}

/* tiêu đề chiếm chiều cao cố định */
.card h3 {
  min-height: 36px;
}

/* view luôn nằm đáy card */
.card-views,
.related-views {
  margin-top: auto;
  font-size: 12px;
  color: #f5c542;
  padding: 0 8px 8px;
}
/* ===== STICKY FOOTER ===== */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
}

.footer {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  color: #888;
  padding: 15px 0;
}
/* ===== STICKY PAGINATION ABOVE FOOTER ===== */
.container {
  display: flex;
  flex-direction: column;
}

#video-grid {
  flex: 1;
}

.pagination {
  margin-top: auto;
  padding: 10px 0 5px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
