:root {
  --bg: #0a0a0d;
  --card: #15151a;
  --card-alt: #1a1a20;
  --border: #2a2a32;
  --border-soft: #202026;
  --text: #eceef1;
  --muted: #8b8b96;
  --muted-dim: #5c5c66;
  --red: #ff3b3f;
  --red-soft: #3a1517;
  --amber: #ffb020;
  --amber-soft: #362509;
  --accent: #ff3b3f;
  --accent-hover: #ff5a5d;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 14px 14px;
  color: var(--text);
}

a { color: inherit; }

.hh-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: #0d0d11;
  background-image: linear-gradient(90deg, rgba(255,59,63,0.08), transparent 40%);
  position: sticky;
  top: 0;
  z-index: 10;
}
.hh-brand {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.hh-brand::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px 1px rgba(255,59,63,0.7);
  margin-right: 10px;
}
.hh-brand span { font-weight: 400; color: var(--muted); margin-left: 8px; }

.hh-nav { display: flex; gap: 6px; }
.hh-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.hh-nav a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.hh-nav a.active { background: var(--red-soft); color: var(--red); border-color: rgba(255,59,63,0.3); }

.hh-hero {
  text-align: center;
  padding: 48px 20px 32px;
  max-width: 640px;
  margin: 0 auto;
}
.hh-hero h1 { font-size: 28px; margin: 0 0 10px; }
.hh-hero p { color: var(--muted); font-size: 15px; margin: 0 0 22px; line-height: 1.5; }

.hh-search-wrap { max-width: 460px; margin: 0 auto; }
#hhSearch {
  width: 100%;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 15px;
}
#hhSearch:focus { outline: none; border-color: var(--accent); }

.hh-main { max-width: 980px; margin: 0 auto; padding: 8px 24px 60px; }
.hh-loading, .hh-empty { color: var(--muted); text-align: center; padding: 40px 0; }

.hh-section { display: none; }
.hh-section.active { display: block; }

.hh-group { margin-bottom: 32px; }
.hh-group-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.hh-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.hh-video-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hh-video-card h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.hh-tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hh-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}
.hh-tag.level-indepth { background: var(--red-soft); color: var(--red); border-color: rgba(255,59,63,0.3); }
.hh-tag.level-base { background: var(--amber-soft); color: var(--amber); border-color: rgba(255,176,32,0.3); }

.hh-watch-btn {
  margin-top: auto;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
}
.hh-watch-btn:hover { background: var(--accent-hover); }
.hh-coming-soon {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted-dim);
  font-style: italic;
}

.hh-topic {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.hh-topic summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hh-topic summary::-webkit-details-marker { display: none; }
.hh-topic summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  flex-shrink: 0;
}
.hh-topic[open] summary::after { content: "–"; }
.hh-topic-body {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.hh-footer {
  text-align: center;
  color: var(--muted-dim);
  font-size: 12px;
  padding: 24px 20px 40px;
}

@media (max-width: 640px) {
  .hh-topbar { padding: 12px 16px; }
  .hh-hero { padding: 32px 16px 24px; }
  .hh-hero h1 { font-size: 22px; }
  .hh-main { padding: 8px 16px 48px; }
  .hh-video-grid { grid-template-columns: 1fr; }
}
