/* ==========================================================================
   YouTube Wall skin \u2014 design tokens
   Scoped under .yt-skin, self-contained, no Tailwind CDN dependency.
   ========================================================================== */

.yt-skin {
  --yt-bg: #131416;
  --yt-card: #1c1e22;
  --yt-card-hover: #24272c;
  --yt-ink: #f2f1ec;
  --yt-ink-soft: #9a9da3;
  --yt-rule: #2c2f34;
  --yt-accent: #f5a623;
  --yt-accent-ink: #131416;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--yt-ink);
}

.yt-skin code, .yt-skin .yt-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

/* ---------------------------------------------------------------------- */
/* Header row (board title + write button)                                */
/* ---------------------------------------------------------------------- */

.yt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.yt-toolbar h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.yt-toolbar p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #6b6f76;
}

.yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yt-accent);
  color: var(--yt-accent-ink);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.yt-btn:hover { filter: brightness(0.94); }

.yt-btn-ghost {
  background: transparent;
  color: var(--yt-ink-soft);
  border: 1px solid var(--yt-rule);
}

.yt-btn-ghost:hover { color: var(--yt-ink); border-color: var(--yt-ink-soft); }

/* ---------------------------------------------------------------------- */
/* Grid (list.php)                                                         */
/* ---------------------------------------------------------------------- */

.yt-grid {
  background: var(--yt-bg);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.yt-card {
  display: block;
  text-decoration: none;
  background: var(--yt-card);
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.12s ease, transform 0.12s ease;
}

.yt-card:hover {
  background: var(--yt-card-hover);
  transform: translateY(-2px);
}

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

.yt-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  background: rgba(0, 0, 0, 0.25);
}

.yt-card:hover .yt-play-badge { opacity: 1; }

.yt-play-badge::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--yt-accent);
  margin-left: 4px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

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

.yt-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--yt-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card-meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--yt-ink-soft);
}

.yt-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--yt-ink-soft);
  font-size: 14px;
}

.yt-invalid-card {
  grid-column: 1 / -1;
  border: 1px dashed var(--yt-rule);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--yt-ink-soft);
  font-size: 13px;
}

/* ---------------------------------------------------------------------- */
/* Pagination                                                              */
/* ---------------------------------------------------------------------- */

.yt-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.yt-pagination a, .yt-pagination span {
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--yt-ink-soft);
  border: 1px solid var(--yt-rule);
}

.yt-pagination a:hover { color: var(--yt-ink); border-color: var(--yt-ink-soft); }
.yt-pagination .is-current { background: var(--yt-accent); color: var(--yt-accent-ink); border-color: var(--yt-accent); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Player (view.php)                                                       */
/* ---------------------------------------------------------------------- */

.yt-player-page { background: var(--yt-bg); border-radius: 16px; padding: 20px; }

.yt-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

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

.yt-video-title {
  font-size: 20px;
  font-weight: 700;
  margin: 18px 0 4px;
}

.yt-video-meta {
  font-size: 13px;
  color: var(--yt-ink-soft);
  margin-bottom: 16px;
}

.yt-notes {
  font-size: 14px;
  line-height: 1.7;
  color: #cfd2d6;
  white-space: pre-wrap;
  border-top: 1px solid var(--yt-rule);
  padding-top: 16px;
}

.yt-video-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.yt-danger { color: #f28b82 !important; border-color: #4a2f2c !important; }

/* ---------------------------------------------------------------------- */
/* Comments (kept from core, unlike the docs skin)                         */
/* ---------------------------------------------------------------------- */

.yt-comments {
  margin-top: 20px;
  padding: 20px;
  background: var(--yt-card);
  border-radius: 12px;
}

.yt-comments h3 {
  font-size: 15px;
  margin: 0 0 14px;
}

.yt-comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--yt-rule);
  font-size: 13.5px;
}

.yt-comment:last-child { border-bottom: none; }

.yt-comment-author {
  font-weight: 600;
  color: var(--yt-ink);
  margin-right: 8px;
}

.yt-comment-date { color: var(--yt-ink-soft); font-size: 11.5px; }

.yt-comment-body { margin-top: 4px; color: #cfd2d6; }

/* ---------------------------------------------------------------------- */
/* Form (write.php / edit.php)                                             */
/* ---------------------------------------------------------------------- */

.yt-form-card { background: var(--yt-bg); border-radius: 16px; padding: 24px; max-width: 640px; }

.yt-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--yt-ink-soft);
}

.yt-form input[type="text"], .yt-form textarea {
  width: 100%;
  background: var(--yt-card);
  border: 1px solid var(--yt-rule);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--yt-ink);
  font-family: inherit;
}

.yt-form textarea { min-height: 160px; line-height: 1.6; resize: vertical; }
.yt-form input:focus, .yt-form textarea:focus { outline: 2px solid var(--yt-accent); outline-offset: 1px; }

.yt-form-hint { font-size: 12px; color: var(--yt-ink-soft); margin-top: 6px; }

.yt-form-actions { display: flex; gap: 10px; margin-top: 22px; }
