/* ─────────────────────────────────────────────── */
/* ✅ VIDEO GRID + CARD STYLING (Homepage & Shorts) */
/* ─────────────────────────────────────────────── */
.video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

.video-card-box {
  flex: 1 1 24%;
  max-width: 24%;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.video-card-box:hover {
  transform: translateY(-4px);
}

.video-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #ddd;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.video-thumb-wrapper:hover .video-thumb[data-preview] {
  opacity: 0.85;
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.video-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-title a {
  text-decoration: none;
  color: var(--text-primary, #111);
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary, #555);
  display: flex;
  gap: 6px;
  align-items: center;
}

.video-meta .dot {
  margin: 0 4px;
  color: #999;
}

/* ─────────────────────────────────────────────── */
/* ✅ RESPONSIVE BREAKPOINTS                       */
/* ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  .video-card-box {
    flex: 1 1 32%;
    max-width: 32%;
  }
}

@media (max-width: 768px) {
  .video-card-box {
    flex: 1 1 48%;
    max-width: 48%;
  }
}

@media (max-width: 576px) {
  .video-card-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────────── */
/* ✅ WATCH PAGE + BUTTONS + ACTION BAR            */
/* ─────────────────────────────────────────────── */
.watch-container video {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #000;
}

.btn-sm {
  font-size: 13px;
  padding: 4px 10px;
}

.btn-subscribe {
  background-color: #cc0000;
  color: #fff;
  font-weight: bold;
  border: none;
}

.btn-subscribe:hover {
  background-color: #b30000;
}

.btn-light i {
  font-size: 14px;
  color: #333;
}

.btn-light:hover i {
  color: #cc0000;
}

.action-bar {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overflow-x: auto;
}

.action-bar::-webkit-scrollbar {
  height: 6px;
}

.action-bar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────── */
/* ✅ RELATED VIDEO SIDEBAR (YouTube Layout)       */
/* ─────────────────────────────────────────────── */
.related-video {
  display: flex;
  margin-bottom: 15px;
  gap: 10px;
  align-items: flex-start;
}

.related-video .thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #ccc;
  flex-shrink: 0;
}

.related-video .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-video .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.related-video .info .title {
  font-weight: 600;
  font-size: 14px;
  margin: 0;
  color: var(--text-primary, #111);
  line-height: 1.3;
}

.related-video .info .meta {
  font-size: 12px;
  color: var(--text-secondary, #555);
  line-height: 1.2;
}

/* ─────────────────────────────────────────────── */
/* ✅ COMMENT SYSTEM STYLES                        */
/* ─────────────────────────────────────────────── */
.comment-box {
  margin-top: 20px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.comment-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.comment-form button {
  margin-top: 8px;
  font-size: 14px;
}

.comment-thread {
  margin-top: 20px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
  flex-direction: row;
}

.comment .avatar {
  width: 40px;
  height: 40px;
  background: #999;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment .content {
  flex: 1;
  background: var(--card-bg, #f8f8f8);
  border-radius: 6px;
  padding: 10px 14px;
}

.comment .author {
  font-weight: 600;
  font-size: 14px;
}

.comment .meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
}

.comment .text {
  font-size: 14px;
  line-height: 1.4;
}

.comment .replies {
  margin-top: 10px;
  padding-left: 20px;
  border-left: 2px solid #ddd;
}

/* ─────────────────────────────────────────────── */
/* ✅ DARK MODE OVERRIDES                          */
/* ─────────────────────────────────────────────── */
body.dark-mode {
  --card-bg: #1e1e1e;
  --text-primary: #eee;
  --text-secondary: #aaa;
}

body.dark-mode .video-card-box,
body.dark-mode .comment .content {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid #2a2a2a;
}

body.dark-mode .video-thumb-wrapper,
body.dark-mode .related-video .thumb {
  background: #1a1a1a;
}

body.dark-mode .video-duration {
  background: rgba(255, 255, 255, 0.25);
}

body.dark-mode .related-video .info .title {
  color: #eee;
}

body.dark-mode .related-video .info .meta {
  color: #aaa;
}

body.dark-mode .btn-subscribe {
  background-color: #e53935;
}

body.dark-mode .btn-light i {
  color: #fff;
}
