:root {
  --accent: #C8FF00;
  --dark:   #0A0A0A;
  --dark2:  #111111;
  --dark3:  #1A1A1A;
  --border: #222222;
  --text:   #FFFFFF;
  --text-soft: #CCCCCC;
  --muted:  #888888;
  --danger: #ff5555;
  --font:   'Inter', 'Helvetica Neue', Arial, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at top, rgba(200,255,0,0.04), transparent 60%),
    var(--dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.brand-mark {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.brand-sub {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow-line {
  width: 24px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero .sub {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 760px;
}
.hero .hint {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 720px;
}

.meta-pills {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: transparent;
}
.pill-accent {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* ===== GRID ===== */
.anchor-nav {
  margin: 32px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.anchor-nav a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-soft);
  transition: border-color 0.15s, color 0.15s;
}
.anchor-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.group {
  margin: 48px 0 64px;
  scroll-margin-top: 24px;
}
.group-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.group-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.group-head .group-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.group-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.group[data-group-id="archive"] {
  opacity: 0.7;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
.grid.grid-portrait {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
@media (min-width: 1024px) {
  .grid.grid-portrait { grid-template-columns: repeat(3, 1fr); }
}
.card.aspect-portrait .player {
  aspect-ratio: 3 / 4;
}
.loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 80px 0;
}

/* ===== CARDS ===== */
.card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: #333;
  transform: translateY(-2px);
}

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

.card-body { padding: 20px 20px 0; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.card-body h2.title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.motion-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-body .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.card-body .prompt-line {
  margin: 12px 0 16px;
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== ACTIONS ===== */
.actions {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn .lbl { font-size: 0.8rem; color: var(--muted); }
.btn:hover .lbl { color: var(--accent); }

.btn-like[aria-pressed="true"] {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-like[aria-pressed="true"] .lbl { color: #000; }
.btn-like .ic { color: var(--danger); font-size: 1rem; }
.btn-like[aria-pressed="true"] .ic { color: #000; }

.btn-download:hover {
  background: rgba(200,255,0,0.08);
}

/* ===== COMMENTS ===== */
.comments {
  border-top: 1px solid var(--border);
  padding: 14px 20px 18px;
}
.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(--border);
  padding: 8px 0;
  font-size: 0.85rem;
}
.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: 0.7rem; margin-left: 6px; }
.comment-list .body { display: block; margin-top: 2px; white-space: pre-wrap; color: var(--text-soft); }

.comment-form { display: grid; gap: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--dark2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  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: #000;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: opacity 0.15s, transform 0.15s;
}
.comment-form button:hover { opacity: 0.88; transform: translateY(-1px); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--dark2);
  padding: 56px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-tagline {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 320px;
  font-size: 0.9rem;
}
.footer h3 {
  margin: 0 0 16px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.contacts ul, .status p {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contacts li {
  padding: 6px 0;
  font-size: 0.9rem;
}
.contacts .label {
  color: var(--muted);
  margin-right: 8px;
  display: inline-block;
  min-width: 72px;
}
.contacts .val { color: var(--text); }
.status p { margin: 0 0 6px; font-size: 0.9rem; color: var(--text-soft); }
.status #api-status { color: var(--accent); }
.status a { font-size: 0.85rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

.hidden { display: none !important; }
