:root {
  --bg: #0c0f14;
  --panel: #151a22;
  --line: #2a3340;
  --text: #e8edf4;
  --muted: #9aa8b8;
  --accent: #7eb8ff;
  --gold: #e8c572;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 2rem 6vw 1rem;
  border-bottom: 1px solid var(--line);
}
h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.top input {
  min-width: min(320px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: .65rem .9rem;
}

nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .7rem 6vw;
  background: rgba(12,15,20,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: .85rem;
  padding: .3rem .55rem;
  border: 1px solid transparent;
  border-radius: 6px;
}
nav a:hover { border-color: var(--line); background: var(--panel); }

main { padding: 1.5rem 4vw 4rem; max-width: 1500px; margin: 0 auto; }
section { margin: 2.5rem 0 3.5rem; }
h2 { color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
h3 { margin-top: 1.4rem; }
article, .card, details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: .85rem 0;
}
.card h4 { margin: 0 0 .4rem; color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .55rem 0; }
details summary { cursor: pointer; font-weight: 650; }
details p { color: var(--muted); }
figure {
  margin: 1.4rem 0 2rem;
  width: min(1600px, calc(100vw - 4rem));
  max-width: none;
}
figure img {
  display: block;
  width: 100%;
  min-height: 280px;
  max-height: 78vh;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid #4a5568;
  background: #1a1a1a;
  cursor: zoom-in;
  filter: contrast(1.35) brightness(1.28) saturate(1.05);
}
figcaption, .note { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.92);
  cursor: zoom-out;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw;
  max-height: 96vh;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 6px;
  filter: contrast(1.4) brightness(1.32);
  transform: scale(var(--z, 1));
  transform-origin: center center;
  transition: transform .12s ease;
}
code { color: var(--gold); }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.6rem; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: .95rem;
}
th, td {
  border: 1px solid var(--line);
  padding: .7rem .85rem;
  text-align: left;
  vertical-align: top;
}
th { color: var(--gold); background: #1c2430; }

@media (max-width: 700px) {
  .top { flex-direction: column; align-items: stretch; }
}

.meme {
  margin-top: 4rem;
  overflow: hidden;
  background: linear-gradient(180deg, #0c0f14 0%, #1a0530 40%, #ff2d95 100%);
  padding: 2.5rem 0 3.5rem;
  border-top: 2px solid #fff;
}
.meme-marquee {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  opacity: .85;
  animation: slide 6.5s linear infinite;
}
.meme-marquee span { font-size: clamp(1rem, 3vw, 1.6rem); }
.meme-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  min-height: 42vh;
  perspective: 600px;
}
.n {
  font-size: clamp(7rem, 28vw, 16rem);
  font-weight: 900;
  line-height: .8;
  color: #fff;
  text-shadow:
    0 0 20px #00f0ff,
    8px 8px 0 #111,
    -4px -4px 0 #ff2d95;
}
.n6 { animation: bounce6 0.65s ease-in-out infinite alternate, hue 6s linear infinite; }
.n7 { animation: bounce7 0.65s ease-in-out infinite alternate-reverse, hue 6s linear infinite reverse; }
.hands {
  font-size: clamp(3rem, 10vw, 6rem);
  animation: wiggle 0.45s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px #fff);
}
.meme-caption {
  text-align: center;
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: #fff;
  animation: flash 0.7s steps(2) infinite;
}

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes bounce6 {
  from { transform: translateY(18px) rotate(-12deg) scale(0.92); }
  to { transform: translateY(-28px) rotate(10deg) scale(1.08); }
}
@keyframes bounce7 {
  from { transform: translateY(-22px) rotate(14deg) scale(1.06); }
  to { transform: translateY(24px) rotate(-9deg) scale(0.9); }
}
@keyframes wiggle {
  from { transform: rotate(-25deg) scale(1); }
  to { transform: rotate(25deg) scale(1.2); }
}
@keyframes hue {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}
@keyframes flash {
  from { opacity: 1; transform: scale(1); }
  to { opacity: .35; transform: scale(1.08); }
}
