/* =========================================================
   Dark Mystery — Design System (dark ink green / neon green)
   ========================================================= */
:root {
  --bg: #08150f;
  --bg-2: #0b1c14;
  --panel: #10231a;
  --panel-2: #142b20;
  --panel-3: #193526;
  --line: #203d2e;
  --line-2: #2c5440;
  --text: #eef5f0;
  --text-2: #b8c9c0;
  --muted: #6f8579;
  --muted-2: #8fa79b;
  --green: #2fe06a;
  --green-2: #5bff92;
  --green-deep: #12a34a;
  --green-soft: rgba(47, 224, 106, .12);
  --star: #2fe06a;
  --radius: 14px;
  --shadow: 0 22px 50px -28px rgba(0, 0, 0, .95);
  --shadow-green: 0 16px 34px -14px rgba(47, 224, 106, .55);
  --display: 'Archivo', 'Inter', 'Segoe UI', Arial, sans-serif;
  --max: 1300px;
  --ease: cubic-bezier(.22, .7, .28, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(58% 46% at 16% 6%, rgba(64, 138, 94, .22), transparent 62%),
    radial-gradient(50% 40% at 84% 2%, rgba(38, 102, 68, .24), transparent 64%),
    radial-gradient(72% 56% at 50% 104%, rgba(24, 70, 47, .32), transparent 66%),
    linear-gradient(180deg, #091912 0%, #06110c 52%, #081710 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: rgba(47, 224, 106, .35); color: #fff; }

.container {
  width: min(var(--max), 100% - 56px);
  margin-inline: auto;
}

/* =========================================================
   Loading gate
   ========================================================= */
.loading-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(100deg, #071320 0%, #0a1d31 52%, #071320 100%);
  border-bottom: 1px solid rgba(86, 156, 255, .18);
  color: #fff;
  overflow: hidden;
  transition: transform .55s var(--ease), opacity .45s;
}
.loading-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 150% at 0% 50%, rgba(47, 123, 255, .24), transparent 62%),
    radial-gradient(55% 150% at 100% 50%, rgba(255, 45, 85, .18), transparent 62%);
  animation: police-glow 4.2s ease-in-out infinite;
  pointer-events: none;
}
.loading-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #2f7bff 22%, transparent 42%, transparent 58%, #ff2d55 78%, transparent 100%);
  background-size: 200% 100%;
  animation: police-sweep 2.6s linear infinite;
  opacity: .9;
}
.loading-top.is-done {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.loading-top-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), 100% - 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
}
.loading-top-text {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(228, 240, 255, .74);
  animation: gate-shake 1.6s ease-in-out infinite;
}
.loading-top-text b { margin-right: 4px; font-weight: 800; color: #fff; }
.loading-ring { position: relative; flex: none; width: 44px; height: 44px; }
.loading-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loading-ring circle { fill: none; stroke-width: 3.2; }
.loading-ring-bg { stroke: rgba(255, 255, 255, .14); }
.loading-ring-fg {
  stroke: #4d8dff;
  stroke-linecap: round;
  stroke-dasharray: 106.81;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .95s linear;
  filter: drop-shadow(0 0 8px rgba(77, 141, 255, .85));
}
.loading-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  text-shadow: 0 0 10px rgba(77, 141, 255, .9);
  animation: ring-pulse 1s ease-in-out infinite;
}
.loading-ring-num::after {
  content: 's';
  font-size: 8px;
  font-weight: 700;
  opacity: .7;
  margin-left: 1px;
}
body.has-loading { padding-top: var(--gate-h, 70px); }
body.has-loading .header { top: var(--gate-h, 70px); }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-2px) rotate(-.25deg); }
  30% { transform: translateX(2px) rotate(.25deg); }
  45% { transform: translateX(-1.5px); }
  60% { transform: translateX(1.5px); }
  75% { transform: translateX(-1px); }
}
@keyframes blocked-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-5px) rotate(-.6deg); }
  30% { transform: translateX(5px) rotate(.6deg); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
@keyframes police-glow {
  0%, 100% { opacity: .55; transform: translateX(-2%); }
  50% { opacity: 1; transform: translateX(2%); }
}
@keyframes police-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes police-flash {
  0%, 49% { background-color: #ff1f3d; }
  50%, 100% { background-color: #1f5bff; }
}
.loading-top.is-warning {
  background-image: none;
  background-color: #ff1f3d;
  border-bottom-color: rgba(255, 255, 255, .35);
  animation: police-flash .42s steps(1, end) 3, blocked-shake .42s ease 3;
}
.loading-top.is-warning::before {
  background:
    radial-gradient(55% 150% at 0% 50%, rgba(255, 255, 255, .3), transparent 60%),
    radial-gradient(55% 150% at 100% 50%, rgba(255, 255, 255, .18), transparent 60%);
  animation: none;
}
.loading-top.is-warning::after { opacity: 0; }
.loading-top.is-warning .loading-top-text { animation: none; color: #fff; }
.loading-top.is-warning .loading-top-text b { color: #fff; }
.loading-top.is-warning .loading-ring-bg { stroke: rgba(255, 255, 255, .5); }
.loading-top.is-warning .loading-ring-fg {
  stroke: #fff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .95));
}
.loading-top.is-warning .loading-ring-num { color: #fff; animation: none; text-shadow: 0 0 10px rgba(0, 0, 0, .35); }

/* Police light bar flashing across the screen on blocked clicks */
body.police-alert::before,
body.police-alert::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 46vw;
  z-index: 999;
  pointer-events: none;
}
body.police-alert::before {
  left: 0;
  background: radial-gradient(80% 62% at 0% 50%, rgba(47, 224, 106, .6), transparent 72%);
  animation: lamp-green .42s steps(1, end) 3;
}
body.police-alert::after {
  right: 0;
  background: radial-gradient(80% 62% at 100% 50%, rgba(255, 31, 61, .55), transparent 72%);
  animation: lamp-red .42s steps(1, end) 3;
}
@keyframes lamp-green {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .12; }
}
@keyframes lamp-red {
  0%, 49% { opacity: .12; }
  50%, 100% { opacity: 1; }
}

/* =========================================================
   Header
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(8, 21, 15, .82);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background .3s;
}
.header.is-stuck { box-shadow: 0 14px 40px -30px rgba(0, 0, 0, .95); background: rgba(8, 21, 15, .95); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 68px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo-bird { display: block; width: 34px; height: 24px; color: var(--green); flex: none; }
.logo-bird svg { fill: currentColor; stroke: none; }
.logo-text {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}
.logo-text b { font-weight: 900; color: #fff; }
.logo-text em { font-style: normal; color: var(--green); margin-left: 5px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 0;
  transition: color .2s;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a.is-active { color: #fff; font-weight: 600; }
.nav a.is-active::after,
.nav a:hover::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 50%;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: .22s var(--ease);
  flex: none;
}
.icon-btn:hover { color: #fff; background: var(--panel-2); border-color: var(--line-2); }

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
  height: 40px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: .25s var(--ease);
}
.search:focus-within {
  width: 300px;
  background: var(--panel-2);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 224, 106, .12);
}
.search-icon { width: 16px; height: 16px; margin-left: 14px; color: var(--muted); flex: none; }
.search input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 8px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
}
.search input::placeholder { color: var(--muted); }

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  z-index: 120;
}
.search-panel[hidden] { display: none; }
.search-hit {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  transition: background .18s;
}
.search-hit:hover { background: var(--panel-3); }
.search-hit img { width: 34px; height: 46px; border-radius: 5px; object-fit: cover; flex: none; }
.search-hit b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #fff; }
.search-hit span span,
.search-hit span > span { font-size: 11px; color: var(--muted); }
.search-empty { padding: 18px 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* favourites */
.fav { position: relative; flex: none; }
.fav-btn { position: relative; }
.fav-btn .fav-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid var(--bg);
  background: var(--green);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}
.fav-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 120;
  width: 344px;
  max-height: 430px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.fav-panel[hidden] { display: none; }
.fav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.fav-panel-head h4 { font-size: 13px; font-weight: 800; color: #fff; }
.fav-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 50%;
  color: var(--muted);
  transition: .2s;
}
.fav-close:hover { background: var(--green-soft); color: var(--green-2); }
.fav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border-radius: 10px;
  transition: background .18s;
}
.fav-item:hover { background: var(--panel-3); }
.fav-item img { width: 36px; height: 48px; border-radius: 5px; object-fit: cover; flex: none; }
.fav-item > span { display: block; min-width: 0; }
.fav-item b {
  display: -webkit-box;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fav-item > span > span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.fav-empty { padding: 22px 14px 18px; text-align: center; }
.fav-empty p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.fav-empty a { display: inline-block; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--green-2); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel);
}
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: .28s var(--ease); }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: transform .22s var(--ease), box-shadow .26s, background .22s, color .22s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #04140b; background: var(--green); box-shadow: var(--shadow-green); }
.btn-primary:hover { background: var(--green-2); box-shadow: 0 20px 40px -14px rgba(47, 224, 106, .7); }
.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); }

/* =========================================================
   Hero
   ========================================================= */
.hero-wrap { padding-top: 24px; }
.hero {
  position: relative;
  height: 560px;
  border-radius: 24px;
  overflow: hidden;
  background: #06140e;
  box-shadow: var(--shadow);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s var(--ease);
  will-change: opacity;
  backface-visibility: hidden;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media-blur {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  filter: blur(46px) brightness(.4) saturate(1.15);
  transform: scale(1.08);
}
.hero-media-img {
  position: absolute;
  top: 4%;
  right: 4%;
  height: 92%;
  width: auto;
  max-width: none;
  border-radius: 14px;
  box-shadow: 0 34px 70px -18px rgba(0, 0, 0, .85);
  transform: translateZ(0);
  backface-visibility: hidden;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #06140e 4%, rgba(6, 20, 14, .96) 28%, rgba(6, 20, 14, .82) 48%, rgba(6, 20, 14, .34) 70%, rgba(6, 20, 14, .5) 100%),
    linear-gradient(0deg, rgba(6, 20, 14, .78), transparent 46%);
}
.hero-body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 64px;
  color: #fff;
}
.hero-copy { max-width: 560px; }
.hero-title {
  margin: 0 0 12px;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: .005em;
  color: #fff;
  text-wrap: balance;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
}
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.hero-star { display: inline-flex; align-items: center; gap: 4px; color: var(--green-2); font-weight: 800; }
.hero-star span { color: var(--green); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.hero-tags a {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .05);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  transition: .22s var(--ease);
}
.hero-tags a:hover { border-color: var(--green); color: var(--green-2); background: rgba(47, 224, 106, .1); }
.hero-desc {
  margin: 16px 0 6px;
  max-width: 460px;
  font-size: 13.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, .68);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-copy.is-open .hero-desc { -webkit-line-clamp: unset; display: block; }
.hero-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}
.hero-more svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.hero-copy.is-open .hero-more svg { transform: rotate(180deg); }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-actions .btn { height: 48px; }
.hero-lib.is-on { color: #04140b; background: var(--green); border-color: transparent; }
.hero-lib.is-on svg { fill: currentColor; }
.hero-dots { position: absolute; left: 64px; bottom: 26px; z-index: 3; display: flex; gap: 8px; }
.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transition: .3s var(--ease);
}
.hero-dots button.is-active { width: 26px; border-radius: 999px; background: var(--green); }
.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 11px;
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 16, 12, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: .25s var(--ease);
  opacity: 0;
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: var(--green); border-color: transparent; }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }

/* Home: hero bleeds behind the header */
.home .header {
  background: transparent;
  background-image: linear-gradient(180deg, rgba(4, 9, 7, .75), rgba(4, 9, 7, 0));
  border-bottom: 0;
  backdrop-filter: none;
}
.home .header.is-stuck {
  background: rgba(8, 21, 15, .94);
  background-image: none;
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 14px 40px -30px rgba(0, 0, 0, .95);
}
.home .hero-wrap { margin-top: -68px; padding-top: 0; }
.home .hero-wrap > .container { width: 100%; max-width: none; }
.home .hero {
  height: clamp(640px, 92vh, 860px);
  border-radius: 0;
  box-shadow: none;
}
.home .hero-body {
  padding-inline: max(28px, calc((100% - var(--max)) / 2));
  padding-top: 68px;
}
.home .hero-media-img { right: max(40px, calc((100% - var(--max)) / 2 + 12px)); }
.home .hero-dots { left: max(28px, calc((100% - var(--max)) / 2)); }

/* =========================================================
   Crime scene tape divider
   ========================================================= */
.tape-band {
  display: flex;
  justify-content: center;
  margin: 20px 0 0;
  padding: 0 24px;
  pointer-events: none;
}
.tape-band img {
  width: min(1000px, 100%);
  height: auto;
  transform: none;
  border-radius: 16px;
  filter:
    drop-shadow(0 -8px 30px rgba(47, 123, 255, .14))
    drop-shadow(0 18px 36px rgba(0, 0, 0, .55));
  opacity: 1;
}

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 44px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-title {
  position: relative;
  padding-left: 16px;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(47, 224, 106, .8);
}
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-2);
  white-space: nowrap;
  transition: gap .22s var(--ease);
}
.view-all svg { width: 14px; height: 14px; }
.view-all:hover { gap: 9px; }

/* =========================================================
   Trending row
   ========================================================= */
.trend-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.trend-row::-webkit-scrollbar { height: 6px; }
.trend-row::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.trend-row::-webkit-scrollbar-track { background: transparent; }

.tcard { display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; }
.tcard-cover {
  position: relative;
  aspect-ratio: 3 / 4.2;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, .95);
}
.tcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tcard:hover .tcard-cover img { transform: scale(1.06); }
.tcard-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 46%);
  opacity: 0;
  transition: opacity .35s;
}
.tcard:hover .tcard-cover::after { opacity: 1; }

.tcard-title {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.32;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.tcard:hover .tcard-title { color: var(--green-2); }
.tcard-genre { margin-top: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-rating { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.tcard-rating span { color: var(--star); }
.tcard-desc {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-fav {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 21, 15, .5);
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-4px);
  transition: .25s var(--ease);
}
.tcard:hover .book-fav { opacity: 1; transform: translateY(0); }
.book-fav:hover { background: var(--green); border-color: transparent; }
.book-fav.is-on { opacity: 1; transform: none; background: var(--green); border-color: transparent; }
.book-fav.is-on svg { fill: currentColor; }
@media (hover: none) {
  .book-fav { opacity: 1; transform: none; }
}

/* =========================================================
   All novels grid
   ========================================================= */
.book-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 18px;
}
.section-note { font-size: 12px; font-weight: 600; color: var(--muted); }

/* =========================================================
   Genres
   ========================================================= */
.genre-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.genre-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 14px 20px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
  transition: .26s var(--ease);
}
.genre-card:hover { border-color: var(--green); background: var(--panel-2); transform: translateY(-3px); }
.genre-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--green); }
.genre-icon svg { stroke-width: 1.6; }
.genre-card b { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.genre-note { font-size: 10.5px; color: var(--muted); }
.genre-card:hover b { color: #fff; }

/* =========================================================
   Latest stories
   ========================================================= */
.latest-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}
.story-card {
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}
.story-media { position: relative; flex: none; width: 44%; overflow: hidden; background: #000; }
.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.story-card:hover .story-media img { transform: scale(1.06); }
.story-body { flex: 1; min-width: 0; padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.story-body h3 { font-family: var(--display); font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.story-body p { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--muted-2); }
.story-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.story-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.story-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--green-2); transition: gap .2s; }
.story-more svg { width: 14px; height: 14px; }
.story-more:hover { gap: 9px; }

.promo-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(47, 224, 106, .22), transparent 55%),
    linear-gradient(135deg, #0d3a23 0%, #07160e 100%);
  border: 1px solid rgba(47, 224, 106, .35);
  color: #fff;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9), 0 0 34px -14px rgba(47, 224, 106, .4);
}
.promo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 100% 0%, rgba(0, 0, 0, .35), transparent 60%);
}
.promo-banner-bird { position: relative; z-index: 1; width: 54px; height: 38px; color: var(--green-2); }
.promo-banner-bird svg { fill: currentColor; stroke: none; }
.promo-banner-copy { position: relative; z-index: 1; }
.promo-banner-copy small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--green-2); }
.promo-banner-copy strong { display: block; margin-top: 8px; font-family: var(--display); font-size: 24px; font-weight: 900; line-height: 1.05; letter-spacing: -.01em; text-transform: uppercase; color: #fff; }
.promo-banner:hover { transform: translateY(-2px); transition: transform .25s var(--ease); }

.story-list { display: flex; flex-direction: column; gap: 10px; }
.story-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: .24s var(--ease);
}
.story-item:hover { border-color: var(--line-2); background: var(--panel-2); }
.story-item img { width: 74px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.story-item-body { flex: 1; min-width: 0; }
.story-item-body b { display: block; font-size: 13.5px; font-weight: 700; color: #fff; }
.story-item-body > span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.story-item-meta em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.story-item-arrow { width: 18px; height: 18px; color: var(--muted); flex: none; transition: .2s; }
.story-item:hover .story-item-arrow { color: var(--green-2); transform: translateX(3px); }

/* =========================================================
   Footer
   ========================================================= */
.footer { margin-top: 30px; background: #060b09; border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 30px 0 24px; }
.footer-brand { display: flex; align-items: center; gap: 22px; }
.footer-brand .logo-text { font-size: 20px; }
.footer-brand > p { max-width: 420px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.footer-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--green-2); }
.footer-links span { opacity: .35; }

/* =========================================================
   Utility
   ========================================================= */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 13px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-green);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: .3s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); background: var(--green-2); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(9, 18, 13, .96);
  border: 1px solid var(--line-2);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .8);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: .35s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@keyframes flashRing {
  0%, 100% { box-shadow: 0 16px 34px -22px rgba(0, 0, 0, .95); }
  40% { box-shadow: 0 0 0 4px rgba(47, 224, 106, .5), 0 16px 34px -22px rgba(0, 0, 0, .95); }
}
.tcard.is-flash .tcard-cover { animation: flashRing 1.1s ease; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .nav { gap: 20px; }
  .search { width: 210px; }
  .search:focus-within { width: 240px; }
  .genre-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .nav { display: none; }
  .burger { display: flex; }
  .nav.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open a { padding: 13px 4px; font-size: 14px; border-bottom: 1px solid var(--line); }
  .nav.is-open a::after { display: none; }

  .hero { height: 520px; }
  .hero-body { padding: 0 44px; }
  .hero-dots { left: 44px; }
  .latest-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .container { width: min(var(--max), 100% - 40px); }
  .profile-btn { display: none; }
  .hero { height: 540px; border-radius: 18px; }
  .home .hero { height: 100vh; height: 100svh; min-height: 600px; max-height: 900px; }
  .hero-media-img { display: none; }
  .hero-media-blur {
    inset: 0;
    background-size: 100% auto;
    background-position: top center;
    filter: brightness(.72) saturate(1.05);
    transform: none;
  }
  .hero-media::after {
    background: linear-gradient(0deg, rgba(6, 20, 14, .96) 6%, rgba(6, 20, 14, .84) 36%, rgba(6, 20, 14, .3) 64%, rgba(6, 20, 14, .22) 100%);
  }
  .hero-body { padding: 0 26px 48px; align-items: flex-end; }
  .hero-title { font-size: 30px; margin-bottom: 10px; }
  .hero-desc { -webkit-line-clamp: 2; font-size: 12.5px; margin: 14px 0 4px; max-width: none; }
  .hero-tags { margin-top: 13px; gap: 7px; }
  .hero-tags a { padding: 5px 12px; font-size: 10.5px; }
  .hero-actions { margin-top: 16px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; height: 44px; }
  .hero-arrow { display: none; }
  .hero-dots { left: 26px; bottom: 20px; }
  .genre-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .story-card { flex-direction: column; }
  .story-media { width: 100%; height: 190px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 620px) {
  .container { width: min(var(--max), 100% - 32px); }
  .header-inner { height: 60px; gap: 12px; }
  .logo-text { font-size: 18px; }
  .logo-bird { width: 28px; height: 20px; }
  .search { display: none; }

  .fav-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 72px;
    width: auto;
    max-height: 64vh;
    z-index: 130;
  }

  .hero { height: 560px; }
  .hero-body { padding: 0 22px 44px; }
  .hero-title { font-size: 28px; }
  .hero-meta { font-size: 11.5px; gap: 7px; }
  .hero-desc { font-size: 12px; }
  .hero-dots { left: 22px; bottom: 18px; }
  .btn { height: 42px; padding: 0 20px; font-size: 12.5px; }

  .section { padding: 34px 0; }
  .section-head { margin-bottom: 18px; }
  .section-title { font-size: 20px; }
  .section-title::before { height: 20px; }

  .tape-band { margin: 10px 0 0; padding: 0; }
  .tape-band img { width: 100%; transform: none; border-radius: 12px; }

  .trend-row { grid-auto-columns: 138px; gap: 14px; }
  .tcard-title { font-size: 12.5px; }

  .genre-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .genre-card { padding: 18px 10px 16px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }

  .story-media { height: 160px; }
  .story-body { padding: 20px; }
  .story-body h3 { font-size: 18px; }
  .story-item { padding: 10px 12px; gap: 12px; }
  .story-item img { width: 60px; height: 44px; }
  .story-item-meta { display: none; }

  .footer-brand { flex-direction: column; align-items: flex-start; gap: 12px; }
  .to-top { display: none; }
  .toast { bottom: 40px; width: calc(100% - 32px); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .loading-top-text { animation: none; }
}
