:root {
  --bg: #0a090c;
  --bg-2: #121116;
  --card: #17161c;
  --ink: #f6f1ea;
  --mute: #9a95a3;
  --line: rgba(255, 255, 255, 0.08);
  --hot: #ff5a6a;
  --hot-2: #ff8a6a;
  --lamp: #f0c27a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 Outfit, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }

.mark {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--hot);
  line-height: 1;
}
.mark em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  margin-left: 0.06em;
}

.gate {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem 1.2rem;
  background: #07060a;
}
.gate-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(240, 194, 122, 0.18), transparent 42%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 90, 106, 0.2), transparent 46%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.03), transparent 55%);
}
.gate-slats {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 18px,
    rgba(0, 0, 0, 0.18) 18px 20px
  );
  opacity: 0.35;
  pointer-events: none;
}
.gate-noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gate-panel {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
  padding: 2.4rem 1.8rem 2rem;
  background: rgba(14, 13, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.gate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--hot);
  color: var(--hot);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.gate-mark { display: block; margin-bottom: 1.1rem; font-size: 2.1rem; }
.gate-panel h1 {
  margin: 0 0 0.7rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.05rem);
  font-weight: 500;
  line-height: 1.2;
}
.gate-panel p {
  margin: 0 0 1.5rem;
  color: var(--mute);
}
#gate-enter {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, var(--hot), var(--hot-2));
  color: #1a0b0d;
  font-weight: 700;
  cursor: pointer;
}
#gate-enter:hover { filter: brightness(1.06); }
.gate-leave {
  display: inline-block;
  margin-top: 0.95rem;
  color: var(--mute);
  font-size: 0.92rem;
}
.gate-leave:hover { color: var(--ink); }

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.3rem;
  background: rgba(10, 9, 12, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.seek {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
}
.seek svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--mute);
}
.seek input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 1rem 0.62rem 2.2rem;
  outline: none;
}
.seek input:focus { border-color: rgba(255, 90, 106, 0.55); }
.top-count {
  color: var(--mute);
  font-size: 0.82rem;
  white-space: nowrap;
}

.tags {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1.3rem 0.85rem;
  scrollbar-width: none;
}
.tags::-webkit-scrollbar { display: none; }
.tags a {
  flex: 0 0 auto;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.82rem;
  font-weight: 500;
}
.tags a.on,
.tags a:hover {
  color: #1a0b0d;
  background: var(--hot);
  border-color: var(--hot);
}

main { padding: 1rem 1.3rem 3.5rem; min-height: 64vh; }

.strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.strip h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
}
.meta { margin: 0.25rem 0 0; color: var(--mute); font-size: 0.86rem; }
.sorts { display: flex; gap: 0.4rem; }
.sorts button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  color: var(--mute);
  cursor: pointer;
}
.sorts button.on,
.sorts button:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.row {
  margin-bottom: 1.7rem;
}
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.row-head h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}
.row-head span {
  color: var(--mute);
  font-size: 0.8rem;
}
.row-head a {
  color: var(--mute);
  font-size: 0.84rem;
  font-weight: 500;
}
.row-head a:hover { color: var(--hot); }
.rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}
.rail .card {
  flex: 0 0 210px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem 0.85rem;
}
.card { color: inherit; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0e0d12;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.card:hover .thumb img { transform: scale(1.06); }
.thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}
.dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 6px;
  padding: 0.12rem 0.38rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.qual {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  background: rgba(255, 90, 106, 0.92);
  color: #1a0b0d;
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
}
.card h3 {
  margin: 0.5rem 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card p { margin: 0; font-size: 0.75rem; color: var(--mute); }

.skel {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(90deg, #15141a, #1d1c24, #15141a);
  background-size: 200% 100%;
  animation: shine 1.1s linear infinite;
}
@keyframes shine {
  to { background-position: -200% 0; }
}

.pager {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.6rem;
}
.pager button {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
}
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager span { color: var(--mute); font-size: 0.86rem; }

.stage {
  position: relative;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
#player, #embed {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}
#player.on, #embed.on { display: block; }
.player-note { margin: 0.55rem 0 0; color: var(--mute); font-size: 0.86rem; }
.watch-copy { margin-top: 1rem; }
#watch-title {
  margin: 0 0 0.3rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
}
.watch-meta { margin: 0; color: var(--mute); }
.watch-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.85rem 0 1.6rem; }
.watch-tags a {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.8rem;
}
.watch-tags a:hover { color: var(--ink); border-color: rgba(255,255,255,0.2); }
.more-head {
  margin: 0 0 0.8rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 1rem 1.3rem 1.4rem;
  display: flex;
  gap: 1rem;
  color: var(--mute);
  font-size: 0.78rem;
}

.empty {
  grid-column: 1 / -1;
  color: var(--mute);
  padding: 3rem 0.5rem;
  text-align: center;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { flex-wrap: wrap; }
  .seek { max-width: none; width: 100%; margin: 0; }
  .top-count { display: none; }
  .strip h1 { font-size: 1.35rem; }
}
