:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: #111317;
  --panel-2: #171a1f;
  --line: rgba(255, 255, 255, .08);
  --ink: #eef1f5;
  --muted: #8b939f;
  --accent: #5ee6a0;
  --accent-ink: #06110b;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(10, 11, 13, .85);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.topbar__nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.topbar__nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color .15s ease;
}

.topbar__nav a:hover { color: var(--ink); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.hero p {
  max-width: 640px;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero__meta.is-ok::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .18);
}

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
  overflow: hidden;
}

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

.card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .65);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: .02em;
}

.card__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

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

.tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.watch-btn {
  margin-top: 4px;
  align-self: flex-start;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity .15s ease;
}

.watch-btn:hover { opacity: .85; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
  border-top: 1px solid var(--line);
}

.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 6, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.player-overlay[hidden] { display: none; }

.player-box {
  width: min(920px, 100%);
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-title {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  background: var(--panel);
}

.player-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 560px) {
  .topbar { padding: 14px 16px; }
  .wrap { padding: 32px 16px 60px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
