/* YouTube page styling aligned with site theme */

.yt-header {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}
:root[data-theme="light"] .yt-header {
  background: rgba(0,0,0,.03);
}

.yt-header h1 { margin: 0 0 6px; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.yt-header-subtitle { margin: 0 0 10px; color: var(--text2); font-size: 14px; }
.yt-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.yt-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); margin-bottom: 12px; }
.yt-section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.yt-section-header h2 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--text2); display:flex; gap:8px; align-items:center; }

.yt-highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.yt-all-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.yt-card { border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.yt-thumb { position: relative; width: 100%; padding-bottom: 56.25%; background: #020617; overflow: hidden; }
.yt-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-thumb-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 999px; border: none; background: rgba(15,23,42,0.85); display:flex; align-items:center; justify-content:center; cursor: pointer; }

.yt-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.yt-card-body h3 { margin: 0; font-size: 15px; }
.yt-card-meta { margin: 0; font-size: 12px; color: var(--text2); display:flex; gap: 10px; flex-wrap: wrap; }
.yt-card-desc { margin: 0; font-size: 13px; color: var(--text2); }

.yt-empty-note { margin: 0; color: var(--text2); }

/* Overlay */
.yt-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 9999; }
.yt-overlay.is-active { display: flex; }
.yt-overlay-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.yt-overlay-dialog { position: relative; max-width: 960px; width: min(960px, 94vw); aspect-ratio: 16/9; background: #020617; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.yt-overlay-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display:grid; place-items:center; }
.yt-overlay-video { position: absolute; inset: 0; }
.yt-overlay-video iframe { width: 100%; height: 100%; }

@media (max-width: 700px) {
  .yt-section, .yt-header { padding: 10px 12px; }
}