:root {
  --yt-red: #f00;
  --bg: #f9f9f9;
  --surface: #fff;
  --text: #0f0f0f;
  --text-muted: #606060;
  --border: #e5e5e5;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

a { color: #065fd4; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}
.site-brand:hover { text-decoration: none; }

.site-logo {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yt-red);
  color: #fff;
  font-size: 14px;
  padding-left: 3px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Layout ---------- */
.container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.page-title { font-size: 22px; font-weight: 500; margin: 4px 0 20px; }

.empty {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

/* ---------- Video grid (YouTube style) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 20px;
}

.video-card {
  color: var(--text);
  display: block;
}
.video-card:hover { text-decoration: none; }

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

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

.video-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #999;
  font-size: 40px;
}

.video-card-body { padding: 8px 2px 0; }

.video-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.video-card-description {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Video page ---------- */
.breadcrumb { margin: 0 0 16px; font-size: 14px; }

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

.player iframe,
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title { font-size: 24px; font-weight: 600; margin: 20px 0 4px; }
.video-meta { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }

.video-description {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  white-space: pre-wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .container { padding: 16px; }
}