/* =========================
   Layout & Header
   ========================= */
.videos-layout .videos-main {
  width: 100%;
  flex: 1;
}

.videos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

.videos-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.videos-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.videos-tab-desc {
  margin: 0 0 20px;
  opacity: 0.85;
  font-size: 0.95rem;
  color: #ccc;
}

/* =========================
   Video Grid (Preserved Original)
   ========================= */
#videos-status {
  text-align: center;
  margin: 10px 0 20px;
  color: #ccc;
  font-size: 14px;
}

.videos-grid {
  display: grid;
  /* 
     minmax(380px, 1fr) 
     - Forces cards to be at least 380px wide.
     - On a standard 1080p screen with sidebar, this naturally fits 3 or 4 cards.
  */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  
  gap: 20px;
  
  /* 
     Limits the total width so you never get 5 or 6 cards 
     even on giant 4K monitors.
     (4 cards * ~400px + gaps ≈ 1650px)
  */
  max-width: 1451px; 
  padding: 0 10px;
}


.video-card {
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #222;
}

.video-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  color: #eee;
}

.video-meta {
  font-size: 12px;
  color: #aaa;
}

.video-link {
  margin-top: 4px;
  font-size: 13px;
  color: #7ec0ff;
  text-decoration: none;
  display: inline-block;
}
.video-link:hover {
  text-decoration: underline;
}

/* Stats bar: comments · reactions · zaps */
.video-stats {
  margin-top: 2px;
  padding: 4px 8px;
  font-size: 18px;
  color: #ddd;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  display: inline-block;
}
.video-stats .zap-num { color: inherit; font-weight: 600; }
.video-stats .zap-dot { opacity: 0.6; }
.video-stats .zap-sats { color: #f7931a; font-weight: 800; opacity: 1; }

/* Actions section */
.video-actions {
  margin-top: 8px;
  text-align: left;
}
.video-actions-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 4px;
}
.video-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
}

/* Pill buttons under "Watch & zap on" */
.video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  cursor: pointer;
  white-space: nowrap;
}
.video-btn:hover {
  background: #333;
  border-color: #ff9900;
  color: #fff;
}

/* =========================
   Upload & Sync UI
   ========================= */
.upload-btn {
  background-color: var(--color-primary, #6200ea); /* Use theme color or default */
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  /* Removed large margins from original to fit header */
  margin: 0; 
}
.upload-btn:hover {
  background-color: var(--color-primary-hover, #7c43bd);
}



/* =========================
   Modal (Preserved)
   ========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #151515;
  border: 1px solid #333;
  padding: 20px;
  width: 90%;
  max-width: 450px;
  border-radius: 8px;
  color: #fff;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  text-align: center;
}

.modal-content label {
  margin-top: 10px;
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  color: #ccc;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
  background: #000;
  border: 1px solid #333;
  color: white;
  border-radius: 4px;
}

.modal-actions {
  margin-top: 20px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.save-btn {
  padding: 8px 16px;
  background: #0a84ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.save-btn:hover { background: #0077e6; }

.cancel-btn {
  padding: 8px 16px;
  background: #333;
  color: #ddd;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 0; /* Reset original margin */
}
.cancel-btn:hover { background: #444; color: #fff; }


#favsSyncPanel {
  position: relative;
}


/* Small header buttons (Sync + misc small actions) */
.video-btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  border: 1px solid #444;
  background: #222;
  color: #fff;
}

.video-btn-small:hover {
  background: #333;
  border-color: #ff9900;
}

/* Make the header icon buttons perfectly square */
#favsSyncToggle,
#uploadBtn {
  width: 36px;
  height: 32px;
  padding: 0;
}

/* Optional: make upload match the same sizing (keeps purple) */
.upload-btn {
  min-width: 36px;
  height: 32px;
  padding: 0;
}



.favs-sync-panel{
  margin: 0 0 12px 0;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #111;
}

.favs-sync-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

#favsSyncBody{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #333;
  position: static;  /* optional, just to be explicit */
}