/* ── YouTube Pages Shared Stylesheet ─────────────────────
   Matches julien.org Next.js design system:
   Inter + Space Grotesk, indigo/violet/cyan gradient, glass-card styling.

   IMPORTANT: Do NOT rename these classes — sync_youtube.py depends on them:
   video-list, video-item, video-title, video-date, video-tags, video-tag,
   subtitle, links, link, container, date, video-container, description,
   tags, tag, transcript
────────────────────────────────────────────────────────── */

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  background-color: #f8fafc;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
}

/* ── Gradient Brand Bar ────────────────────────────────── */
body::before {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #0891b2);
}

/* ── Back Link ─────────────────────────────────────────── */
.back-link {
  display: block;
  max-width: 900px;
  margin: 1.5em auto 0;
  padding: 0 20px;
  font-size: 0.95em;
}

.back-link a {
  color: #6366f1;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link a:hover {
  color: #4f46e5;
}

/* ── Container (glass-card) ────────────────────────────── */
.container {
  max-width: 900px;
  margin: 1.5em auto 3em;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 2.5em;
}

/* ── Headings ──────────────────────────────────────────── */
h1 {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 2.4em;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 0.2em;
  line-height: 1.2;
}

h2 {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  color: #0f172a;
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 0.75em;
}

/* ── Subtitle (index page) ─────────────────────────────── */
.subtitle {
  color: #334155;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 2.5em;
}

/* ── Video List Grid (index page) ──────────────────────── */
.video-list {
  display: grid;
  gap: 16px;
}

/* ── Video Item Card (index page) ──────────────────────── */
.video-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25em 1.5em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.video-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
  border-color: #c7d2fe;
}

/* ── Video Title (index page) ──────────────────────────── */
.video-title {
  color: #0f172a;
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2em;
  font-weight: 600;
  display: block;
  margin-bottom: 0.3em;
  transition: color 0.2s;
}

.video-title:hover {
  color: #6366f1;
}

/* ── Video Date (index page) ───────────────────────────── */
.video-date {
  color: #334155;
  font-size: 0.9em;
  font-weight: 500;
}

/* ── Video Tags (index page) ───────────────────────────── */
.video-tags {
  margin-top: 0.5em;
}

.video-tag {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
  border-radius: 9999px;
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Date (video page) ─────────────────────────────────── */
.date {
  color: #334155;
  font-size: 1.05em;
  font-weight: 500;
  margin-bottom: 1.75em;
}

/* ── Video Container (16:9 responsive embed) ───────────── */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  margin-bottom: 2em;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Description (video page) ──────────────────────────── */
.description {
  background: #f1f5f9;
  padding: 1.5em;
  border-radius: 10px;
  margin-bottom: 2em;
  white-space: pre-wrap;
  font-size: 0.95em;
  line-height: 1.7;
  border: 1px solid #e2e8f0;
}

.description a {
  color: #6366f1;
  font-weight: 500;
  transition: color 0.2s;
}

.description a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* ── Transcript (video page) ───────────────────────────── */
.transcript {
  background: #f1f5f9;
  padding: 1.5em;
  border-radius: 10px;
  margin-bottom: 2em;
  white-space: pre-wrap;
  font-size: 0.95em;
  line-height: 1.7;
  border: 1px solid #e2e8f0;
}

.transcript h2 {
  margin-bottom: 0.75em;
}

/* ── Tags (video page) ─────────────────────────────────── */
.tags {
  margin-bottom: 2em;
}

.tags h2 {
  margin-bottom: 0.5em;
}

.tag {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 5px 14px;
  margin: 4px 6px 4px 0;
  border-radius: 9999px;
  font-size: 0.88em;
  font-weight: 500;
}

/* ── Navigation Links ──────────────────────────────────── */
.links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 2.5em;
  flex-wrap: wrap;
}

.link {
  display: inline-block;
  padding: 0.7em 1.5em;
  background: #6366f1;
  color: white;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95em;
  transition: background-color 0.2s, transform 0.15s;
}

.link:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.link.youtube {
  background: #e74c3c;
}

.link.youtube:hover {
  background: #c0392b;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .back-link {
    padding: 0 16px;
    margin-top: 1em;
  }

  .container {
    margin: 1em 12px 2em;
    padding: 1.5em;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.7em;
  }

  .video-title {
    font-size: 1.05em;
  }

  .video-item {
    padding: 1em;
  }

  .links {
    flex-direction: column;
    align-items: center;
  }

  .link {
    width: 100%;
    text-align: center;
  }
}
