:root {
  --bg: #0b0d14;
  --surface: #141824;
  --surface-2: #1b2131;
  --border: #273046;
  --text: #eef1f7;
  --muted: #a4b0c6;
  --accent: #ff3b6b;
  --accent-2: #f9ca24;
  --green: #2ecc71;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Nav */
.topbar {
  background: rgba(11, 13, 20, 0.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.brand-badge {
  background: linear-gradient(135deg, #ff3b6b, #ff7a18);
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.grid-clips>*,
.grid-hubs>* {
  min-width: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: var(--surface-2);
  border-color: var(--border);
}

/* Hero */
.hero {
  padding: 24px 0 14px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(21px, 4.2vw, 34px);
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ffffff, #ffd1dc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow-wrap: anywhere;
}

.hero p {
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
  font-size: 14.5px;
}

/* Featured Directory Card */
.featured-card {
  background: linear-gradient(145deg, #171c2b, #121622);
  border: 1px solid #33405d;
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0 26px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.rank-badge {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--green);
  color: #08150d;
  font-weight: 800;
  font-size: 11.5px;
  padding: 3px 11px;
  border-radius: 999px;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 18px;
  align-items: center;
}

.featured-grid>* {
  min-width: 0;
}

.featured-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.featured-title h2 {
  font-size: 21px;
  font-weight: 800;
}

.featured-title h2 a:hover {
  color: var(--accent-2);
}

.stars {
  color: var(--accent-2);
  font-size: 14px;
  letter-spacing: 1px;
}

.featured-desc {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 14px;
}

.featured-desc a {
  color: #ff7a99;
  text-decoration: underline;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #dce3f0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  transition: 0.2s;
}

.cat-pill:hover,
.cat-pill:active {
  border-color: var(--accent);
  color: #fff;
  background: #261b29;
}

.cta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f9ca24, #f0932b);
  color: #111;
  font-weight: 800;
  padding: 13px 22px;
  min-height: 46px;
  border-radius: 999px;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(249, 202, 36, 0.25);
  transition: transform 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Section Headers */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 0 14px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  flex-wrap: wrap;
}

.sec-head h2 {
  font-size: 19px;
  font-weight: 800;
}

.sec-head span {
  font-size: 12.5px;
  color: var(--muted);
}

/* Clip Cards Grid */
.grid-clips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 14px;
}

.clip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s, transform 0.15s;
}

.clip-thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1018;
  margin-bottom: 10px;
}

.clip-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clip-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
}

.clip-play span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 59, 107, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.clip-details {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.clip-details summary {
  cursor: pointer;
  color: #8b9bb8;
  font-size: 12px;
  list-style: none;
  user-select: none;
}

.clip-details summary::-webkit-details-marker {
  display: none;
}

.clip-details p {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
}

.clip-card:hover {
  border-color: #46577d;
  transform: translateY(-2px);
}

.clip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--accent-2);
  margin-bottom: 8px;
  gap: 8px;
}

.clip-tag {
  background: rgba(255, 59, 107, 0.14);
  color: #ff82a1;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.clip-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.42;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.clip-card h3 a:hover {
  color: var(--accent-2);
}

.clip-summary {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.clip-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 10px;
  transition: 0.2s;
}

.clip-action:hover,
.clip-action:active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Hub Cards Grid */
.grid-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  transition: 0.2s;
}

.hub-card:hover,
.hub-card:active {
  border-color: var(--accent-2);
  background: var(--surface-2);
}

.hub-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.hub-card p {
  font-size: 13px;
  color: var(--muted);
}

/* Article / Long-form Content */
.article-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 22px 0;
}

.article-box h2 {
  font-size: 19px;
  margin: 18px 0 10px;
  color: #fff;
}

.article-box h2:first-child {
  margin-top: 0;
}

.article-box h3 {
  font-size: 16px;
  margin: 14px 0 8px;
  color: var(--accent-2);
}

.article-box p {
  color: #cfd6e4;
  margin-bottom: 12px;
}

.article-box ul,
.article-box ol {
  margin: 8px 0 14px 20px;
  color: #cfd6e4;
}

.article-box li {
  margin-bottom: 6px;
}

.article-box a {
  color: #ff7a99;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.article-box code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 4px;
}

.breadcrumb a:hover {
  color: #fff;
}

/* FAQ */
.faq-item {
  border-top: 1px solid var(--border);
  padding: 13px 0;
}

.faq-item:first-child {
  border-top: none;
}

.faq-q {
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  font-size: 14.5px;
}

.faq-a {
  font-size: 13.5px;
  color: var(--muted);
}

/* Footer */
.footer {
  margin-top: 34px;
  border-top: 1px solid var(--border);
  background: #07090e;
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: #fff;
}

/* Mobile First Refinements */
@media (max-width: 768px) {
  .wrap {
    padding: 0 12px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 0 8px;
  }

  .brand {
    justify-content: center;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 6px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    padding: 6px 11px;
    font-size: 12.5px;
    background: var(--surface);
    border-color: var(--border);
  }

  .hero {
    padding: 16px 0 10px;
  }

  .hero p {
    font-size: 13.5px;
  }

  .featured-card {
    padding: 18px 14px 16px;
    margin: 14px 0 20px;
  }

  .featured-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .featured-title h2 {
    font-size: 19px;
  }

  .featured-desc {
    font-size: 13.5px;
    margin-bottom: 12px;
  }

  .cat-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 7px;
    max-width: 100%;
  }

  .cat-pills::-webkit-scrollbar {
    display: none;
  }

  .cat-pill {
    flex-shrink: 0;
    font-size: 12.5px;
    padding: 6px 11px;
  }

  .cta-col {
    align-items: stretch;
    text-align: center;
  }

  .btn-primary {
    width: 100%;
    font-size: 15px;
  }

  .sec-head {
    margin: 20px 0 12px;
  }

  .sec-head h2 {
    font-size: 17.5px;
  }

  .clip-card {
    padding: 14px;
  }

  .grid-hubs {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hub-card {
    padding: 12px;
  }

  .hub-card h3 {
    font-size: 14px;
  }

  .hub-card p {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .article-box {
    padding: 16px 14px;
    margin: 18px 0;
  }

  .article-box h2 {
    font-size: 17px;
  }
}