:root {
  --bg: #14201f;
  --bg-2: #1a2e2e;
  --card: #1f3433;
  --line: #2d4847;
  --text: #f0ead6;
  --muted: #a8b09f;
  --accent: #b8c965;
  --accent-soft: rgba(184, 201, 101, 0.15);
  --danger: #e07a5f;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hdr {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.hdr h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hdr p { margin: 0; color: var(--muted); }
.hdr .hint { font-size: 13px; margin-top: 12px; max-width: 720px; }

.grid {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.loading { color: var(--muted); padding: 40px; text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}
.pending {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
  text-align: center;
}

.meta { padding: 14px 16px 0; position: relative; }
.meta h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  display: inline;
}

.badge-new {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.card.is-new { box-shadow: 0 0 0 1px var(--accent) inset; }
.card.is-new .player { outline: 1px solid var(--accent); outline-offset: -1px; }
.meta .sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-like, .btn-download, .btn-comment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-like:hover, .btn-comment:hover { border-color: var(--accent); }
.btn-download:hover { border-color: var(--accent); background: var(--accent-soft); }

.btn-like[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-like .ic { color: var(--danger); font-size: 14px; }
.btn-like[aria-pressed="true"] .ic { color: var(--accent); }

.btn-like .lbl, .btn-download .lbl, .btn-comment .lbl {
  font-size: 12px;
  color: var(--muted);
}
.btn-like[aria-pressed="true"] .lbl { color: var(--accent); }

.comments {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}
.comments.hidden { display: none; }

.comment-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.comment-list li {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13px;
}
.comment-list li:last-child { border-bottom: none; }
.comment-list .who { color: var(--accent); font-weight: 500; margin-right: 6px; }
.comment-list .when { color: var(--muted); font-size: 11px; margin-left: 6px; }
.comment-list .body { display: block; margin-top: 2px; white-space: pre-wrap; }

.comment-form { display: grid; gap: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.comment-form button {
  justify-self: end;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.comment-form button:hover { filter: brightness(1.08); }

.ftr {
  max-width: 1280px;
  margin: 32px auto;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.hidden { display: none !important; }
