/* ── YouTube overlay ─────────────────────────────────────────────────────── */
#yt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
}

#yt-overlay.yt-visible {
  opacity: 1;
  pointer-events: all;
}

.yt-panel {
  background: #0f0f0f;
  border: 1px solid #222;
  border-radius: 16px;
  width: min(960px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.yt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.yt-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.yt-logo svg {
  width: 32px;
  height: 32px;
  display: block;
}

.yt-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  font-family: 'Courier New', monospace;
}

.yt-subtitle {
  font-size: 0.7rem;
  color: #444;
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

.yt-close {
  background: none;
  border: 1px solid #333;
  color: #666;
  font-size: 1.3rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.yt-close:hover { color: #fff; border-color: #666; }

/* ── Body ────────────────────────────────────────────────────────────────── */
.yt-body {
  overflow-y: auto;
  flex: 1;
  padding: 20px 24px 24px;
}

/* ── Card grid ───────────────────────────────────────────────────────────── */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.yt-card {
  background: #161616;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.yt-card:hover {
  transform: translateY(-3px);
  border-color: #ff0000;
  box-shadow: 0 8px 28px rgba(255,0,0,0.15);
}

.yt-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}

.yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.yt-card:hover .yt-thumb { transform: scale(1.04); }

.yt-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  opacity: 0;
  background: rgba(0,0,0,0.45);
  transition: opacity 0.2s ease;
}
.yt-card:hover .yt-play-icon { opacity: 1; }

.yt-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fff;
  font-family: 'Courier New', monospace;
}

.yt-game-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.75);
  color: #aaa;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.yt-card-body {
  padding: 12px 14px 14px;
}

.yt-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #eee;
  line-height: 1.4;
  margin-bottom: 5px;
}

.yt-card-channel {
  font-size: 0.68rem;
  color: #555;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
}

.yt-card-desc {
  font-size: 0.7rem;
  color: #444;
  line-height: 1.6;
}

/* ── Embed view ──────────────────────────────────────────────────────────── */
.yt-embed-wrap { display: flex; flex-direction: column; gap: 16px; }

.yt-back {
  background: none;
  border: 1px solid #2a2a2a;
  color: #666;
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: color 0.15s, border-color 0.15s;
}
.yt-back:hover { color: #fff; border-color: #555; }

.yt-iframe-box {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.yt-iframe-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-video-meta {
  padding: 4px 0 8px;
}

.yt-meta-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #eee;
  margin-bottom: 8px;
  line-height: 1.4;
}

.yt-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.yt-meta-row .yt-badge { position: static; }
.yt-meta-channel { font-size: 0.75rem; color: #aaa; font-family: 'Courier New', monospace; }
.yt-meta-dot     { color: #333; }
.yt-meta-date    { font-size: 0.72rem; color: #555; font-family: 'Courier New', monospace; }
.yt-meta-game    { font-size: 0.72rem; color: #555; font-family: 'Courier New', monospace; }

.yt-meta-desc {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.7;
}
