/* ===================================================================
   stream.wenzl.no — hlavní stylesheet
   Dark-mode, responzivní, bez externích závislostí
   =================================================================== */

/* ── Reset & základní ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f0f0f;
  --surface:     #1a1a1a;
  --surface-2:   #242424;
  --border:      #2e2e2e;
  --text:        #f1f1f1;
  --text-muted:  #909090;
  --accent:      #3b82f6;
  --accent-h:    #60a5fa;
  --gold:        #f59e0b;
  --red:         #ef4444;
  --green:       #10b981;
  --radius:      10px;
  --radius-sm:   6px;
  --gap:         20px;
  --hdr:         60px;
  --max-w:       1400px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
img { display: block; max-width: 100%; }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.main { flex: 1; padding: 32px 0 64px; }

/* ── Header ── */
.site-header {
  height: var(--hdr);
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-logo svg { width: 22px; height: 22px; fill: var(--accent); }
.site-logo:hover { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

/* ── Nadpisy sekcí ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-title .icon { color: var(--gold); }

.section-link {
  font-size: 0.85rem;
  color: var(--accent);
}

/* ── Featured sekce ── */
.featured-section { margin-bottom: 48px; }

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap);
}

.featured-grid .video-card:first-child .video-card__title {
  font-size: 1.1rem;
}

/* ── Video grid ── */
.recent-section { }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

/* ── Video karta ── */
.video-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  border-color: var(--border);
}

.video-card--featured {
  border-color: rgba(245, 158, 11, 0.25);
}

.video-card--featured:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.video-card__link { display: block; color: inherit; }
.video-card__link:hover { color: inherit; }

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

.video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-card__thumb { transform: scale(1.04); }

.video-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d1117 100%);
}

.video-card__thumb-placeholder svg {
  width: 38px;
  height: 38px;
  fill: #444;
}

.video-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.video-card__type {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
}

.video-card__type--short { background: var(--red); color: #fff; }
.video-card__type--long  { background: var(--green); color: #fff; }

.video-card__featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: #000;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.video-card__body { padding: 14px 16px 16px; }

.video-card__title {
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  transition: color 0.15s;
}

.video-card:hover .video-card__title { color: var(--accent-h); }

.video-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.video-card__meta-sep { color: var(--border); }

.video-card__categories { display: flex; gap: 4px; flex-wrap: wrap; }

.video-card__cat {
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  transition: background 0.15s, color 0.15s;
}

.video-card__cat:hover {
  background: var(--accent);
  color: #fff;
}

.video-card__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* ── Single video stránka ── */
.video-single { max-width: 1060px; margin: 0 auto; }

.video-single__player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.video-single__player {
  width: 100%;
  height: 100%;
  display: block;
}

.video-single__embed {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-single__no-video {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.video-single__no-video svg { width: 48px; height: 48px; fill: #444; }

.video-single__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.video-single__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.video-single__meta-sep { color: var(--border); }

.video-single__cats { display: flex; gap: 6px; flex-wrap: wrap; }

.video-single__cat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}

.video-single__cat:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Badges ve video meta */
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  border-radius: 999px;
}

.badge--short { background: var(--red); color: #fff; }
.badge--long  { background: var(--green); color: #fff; }

/* ── Akce (sdílet, vložit) ── */
.video-single__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}

.btn svg { flex-shrink: 0; }

/* ── Embed box ── */
.embed-box {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.embed-box.is-open { display: block; }

.embed-box label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.embed-box textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem;
  padding: 10px 12px;
  resize: none;
  height: 68px;
  cursor: text;
}

.embed-copy-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Popis a obsah ── */
.video-single__description {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text);
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.video-single__content {
  color: var(--text);
  margin-top: 16px;
}

.video-single__content p { margin-bottom: 1rem; }
.video-single__content h2 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
.video-single__content h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.video-single__content ul, .video-single__content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.video-single__content li { margin-bottom: 0.3rem; }
.video-single__content a { color: var(--accent); }
.video-single__content a:hover { color: var(--accent-h); }

/* ── Related videos ── */
.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related-section .section-title { margin-bottom: 20px; }

/* ── List page ── */
.list-header { margin-bottom: 32px; }

.list-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.list-header p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Kategorie stránka ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.category-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}

.category-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.category-card__count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Stránkování ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}

.pagination a:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .active span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Footer ── */
.site-footer {
  padding: 22px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ── No results ── */
.no-results {
  text-align: center;
  padding: 64px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Responzivita ── */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid .video-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-nav a { padding: 5px 8px; font-size: 0.8rem; }
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .video-single__title { font-size: 1.2rem; }
  .featured-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .videos-grid { grid-template-columns: 1fr; }
  .video-single__actions { gap: 8px; }
  .btn { padding: 7px 12px; font-size: 0.8rem; }
}
