/*
  以太坊疯人院 / Ethereum Asylum
  纯 CSS 视觉系统：故障、扫描线、噪点、霓虹和精神状态。
*/

:root {
  --black: #07070a;
  --black-soft: #0c0c12;
  --panel: #111119;
  --panel-light: #171721;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.26);
  --text: #f3f3f7;
  --muted: #9898a7;
  --purple: #8b5cf6;
  --purple-hot: #b07cff;
  --green: #b7ff35;
  --blue: #35a7ff;
  --red: #ff3d4f;
  --gold: #ffc857;
  --max-width: 1240px;
  --radius: 3px;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", "Microsoft YaHei", sans-serif;
  --font-body: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 8%, rgba(98, 52, 180, 0.14), transparent 26rem),
    radial-gradient(circle at 10% 68%, rgba(53, 167, 255, 0.06), transparent 30rem),
    var(--black);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  border: 1px solid rgba(183, 255, 53, 0.08);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.75);
}

button,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

::selection {
  color: var(--black);
  background: var(--green);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 10px 15px;
  color: var(--black);
  background: var(--green);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.noise,
.scanlines,
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  z-index: 9996;
  opacity: 0.075;
  background-image:
    radial-gradient(circle at 12% 20%, #fff 0 0.6px, transparent 0.8px),
    radial-gradient(circle at 72% 64%, #fff 0 0.45px, transparent 0.7px),
    radial-gradient(circle at 35% 82%, #fff 0 0.4px, transparent 0.65px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
  animation: noiseShift 0.25s steps(2) infinite;
}

.scanlines {
  z-index: 9997;
  opacity: 0.11;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(255, 255, 255, 0.06) 4px);
}

.ambient {
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(139, 92, 246, 0.16);
  filter: blur(1px);
  transform: rotate(45deg);
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  inset: 17%;
  border: 1px solid currentColor;
}

.ambient::after {
  inset: 33%;
}

.ambient-one {
  top: 35rem;
  left: -15rem;
  color: rgba(53, 167, 255, 0.1);
  animation: floatAmbient 15s ease-in-out infinite;
}

.ambient-two {
  inset: auto -13rem 12rem auto;
  color: rgba(183, 255, 53, 0.08);
  animation: floatAmbient 19s ease-in-out -4s infinite reverse;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  background: rgba(7, 7, 10, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(15px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  line-height: 1.05;
}

.brand-mark {
  width: 35px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--purple-hot);
  border: 1px solid var(--purple);
  font-family: Georgia, serif;
  font-size: 25px;
  transform: skew(-4deg);
  box-shadow: 4px 4px 0 rgba(139, 92, 246, 0.2);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(15px, 2.4vw, 36px);
}

.site-nav a {
  position: relative;
  color: #c8c8d1;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-status {
  color: var(--green);
  font: 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.header-status i,
.broadcast-live i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: livePulse 1.6s ease-in-out infinite;
}

.hero {
  position: relative;
  width: min(var(--max-width), calc(100% - 48px));
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: clamp(58px, 7vw, 100px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: 30px;
}

.hero::before {
  content: "ASYLUM\A ASYLUM\A ASYLUM";
  position: absolute;
  top: 5%;
  left: -11%;
  color: transparent;
  font: 160px/0.64 var(--font-display);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.027);
  white-space: pre;
  transform: rotate(-8deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.kicker,
.section-code {
  margin: 0 0 22px;
  color: var(--muted);
  font: 11px/1.3 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker span {
  display: inline-block;
  margin-right: 8px;
  padding: 6px 9px;
  color: var(--black);
  background: var(--green);
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 8.2vw, 128px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero h1 > span {
  display: block;
}

.hero h1 > span:first-child {
  margin-bottom: 8px;
  color: #d3d3dc;
  font-family: var(--font-body);
  font-size: 0.27em;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.glitch-title {
  position: relative;
  width: fit-content;
  color: #fff;
  text-shadow: 5px 5px 0 rgba(139, 92, 246, 0.8), -3px -2px 0 rgba(53, 167, 255, 0.22);
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glitch-title::before {
  color: var(--red);
  clip-path: inset(19% 0 58% 0);
  transform: translate(-4px, 1px);
  animation: titleGlitchA 4s steps(1) infinite;
}

.glitch-title::after {
  color: var(--blue);
  clip-path: inset(62% 0 10% 0);
  transform: translate(4px, -1px);
  animation: titleGlitchB 4s steps(1) 0.2s infinite;
}

.hero-subtitle {
  max-width: 610px;
  margin: 32px 0 0;
  color: #bbbbc6;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.85;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.button:hover {
  transform: translate(-2px, -2px);
}

.button-primary {
  color: var(--black);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 5px 5px 0 rgba(183, 255, 53, 0.16);
}

.button-primary:hover {
  box-shadow: 8px 8px 0 rgba(183, 255, 53, 0.13);
}

.button-ghost:hover {
  color: var(--purple-hot);
  border-color: var(--purple);
}

.hero-vitals {
  width: min(560px, 100%);
  margin-top: 56px;
  padding-top: 17px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
}

.hero-vitals div {
  padding: 0 13px;
  border-left: 1px solid var(--line);
}

.hero-vitals div:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-vitals span,
.hero-vitals strong {
  display: block;
}

.hero-vitals span {
  color: var(--muted);
  font: 9px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
}

.hero-vitals strong {
  margin-top: 7px;
  font: 20px/1 var(--font-mono);
}

.hero-vitals div:nth-child(2) strong {
  color: var(--green);
}

.hero-vitals div:nth-child(3) strong {
  color: var(--red);
}

.hero-art {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0, rgba(139, 92, 246, 0.06) 30%, transparent 67%);
  filter: blur(6px);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.orbit::before {
  top: 16%;
  left: 11%;
}

.orbit::after {
  right: 4%;
  bottom: 28%;
  background: var(--blue);
  box-shadow: 0 0 14px var(--blue);
}

.orbit-one {
  width: 88%;
  aspect-ratio: 1;
  animation: orbitRotate 22s linear infinite;
}

.orbit-two {
  width: 65%;
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(139, 92, 246, 0.44);
  animation: orbitRotate 13s linear infinite reverse;
}

.orbit-label {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(7, 7, 10, 0.74);
  border: 1px solid var(--line);
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.1em;
}

.label-one { top: 19%; left: 6%; transform: rotate(-9deg); }
.label-two { top: 37%; right: 2%; transform: rotate(8deg); }
.label-three { bottom: 25%; left: 5%; transform: rotate(4deg); }

.eth-button {
  position: relative;
  z-index: 5;
  width: min(290px, 58%);
  aspect-ratio: 0.72;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 34px rgba(139, 92, 246, 0.48));
  transition: filter 0.2s ease, transform 0.15s ease;
}

.eth-button:hover {
  transform: translateY(-5px) rotate(1deg);
  filter: drop-shadow(0 0 48px rgba(176, 124, 255, 0.7));
}

.eth-button:active {
  transform: scale(0.96);
}

.eth-diamond {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  animation: ethFloat 5s ease-in-out infinite;
}

.facet {
  position: absolute;
  inset: 0;
  display: block;
}

.facet-top-left {
  background: linear-gradient(135deg, #ece8ff 0%, #a982ff 45%, #5c36af 100%);
  clip-path: polygon(50% 0, 50% 54%, 0 65%);
}

.facet-top-right {
  background: linear-gradient(225deg, #f7f4ff 0%, #8d64eb 48%, #432679 100%);
  clip-path: polygon(50% 0, 100% 65%, 50% 54%);
}

.facet-bottom-left {
  background: linear-gradient(45deg, #8362d4, #d4c4ff);
  clip-path: polygon(0 69%, 50% 58%, 50% 100%);
}

.facet-bottom-right {
  background: linear-gradient(315deg, #5b30aa, #aa8dea);
  clip-path: polygon(100% 69%, 50% 58%, 50% 100%);
}

.eth-pulse {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(176, 124, 255, 0.45);
  border-radius: 50%;
  animation: ethPulse 2.5s ease-out infinite;
}

.hero-stamp {
  position: absolute;
  right: -3%;
  bottom: 4%;
  z-index: 3;
  width: 172px;
  aspect-ratio: 1;
  padding: 27px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0.75;
}

.hero-stamp::before,
.hero-stamp::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed currentColor;
  border-radius: 50%;
}

.hero-stamp::after {
  inset: 19px;
  border-style: solid;
}

.hero-stamp span,
.hero-stamp strong {
  position: relative;
  z-index: 1;
}

.hero-stamp span {
  font: 8px/1 var(--font-mono);
  letter-spacing: 0.25em;
}

.hero-stamp strong {
  max-width: 90px;
  font-size: 13px;
  line-height: 1.35;
}

.ticker {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
  color: var(--black);
  background: var(--green);
  transform: rotate(-0.4deg) scale(1.01);
}

.ticker-track {
  width: max-content;
  padding: 11px 0;
  display: flex;
  align-items: center;
  animation: tickerMove 22s linear infinite;
}

.ticker span {
  padding: 0 38px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ticker i {
  font-style: normal;
}

.section {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(100px, 12vw, 170px) 0;
}

.section-heading {
  margin-bottom: 50px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(50px, 6.2vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.section-heading h2::after {
  content: "_";
  color: var(--purple);
  animation: cursorBlink 1s steps(1) infinite;
}

.section-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.section-code {
  margin-bottom: 15px;
  color: var(--green);
}

.madness-machine {
  position: relative;
  min-height: 230px;
  margin-bottom: 20px;
  padding: 52px clamp(22px, 4vw, 55px) 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px 32px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.7);
  background:
    linear-gradient(110deg, rgba(139, 92, 246, 0.16), transparent 44%),
    var(--panel);
  box-shadow: inset 8px 0 0 rgba(139, 92, 246, 0.12);
}

.madness-machine::after {
  content: "RANDOM";
  position: absolute;
  top: -43px;
  right: 3%;
  color: transparent;
  font: 142px/1 var(--font-display);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.machine-label {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 31px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--purple-hot);
  border-bottom: 1px solid rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.08);
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.15em;
}

.machine-label i {
  width: 55px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--purple), var(--purple) 7px, transparent 7px, transparent 10px);
}

.madness-output {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.8vw, 64px);
  line-height: 1;
  letter-spacing: 0.01em;
  transition: color 0.25s ease, filter 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.madness-output.effect-alarm {
  color: var(--red);
  text-shadow: -4px 0 #fff, 5px 2px rgba(255, 61, 79, 0.35);
  animation: alarmShake 0.18s steps(2) 5;
}

.madness-output.effect-blur {
  color: #a3a3a9;
  filter: blur(1.4px);
  text-shadow: 7px 0 7px rgba(255, 255, 255, 0.25);
}

.madness-output.effect-fly {
  color: var(--green);
  text-shadow: 0 0 24px rgba(183, 255, 53, 0.72);
  animation: flyUp 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.madness-output.effect-discharge {
  color: #fff;
  text-shadow: 0 0 6px #fff, 0 0 28px #fff, 0 0 62px var(--purple-hot);
  animation: dischargeFlash 0.9s ease;
}

.madness-output.effect-altar {
  color: var(--gold);
  text-shadow: 0 0 25px rgba(255, 200, 87, 0.56), 4px 4px 0 rgba(139, 92, 246, 0.55);
  transform: scale(1.025);
}

.madness-output.effect-hold {
  color: var(--purple-hot);
}

.madness-button {
  position: relative;
  z-index: 3;
  min-width: 150px;
  color: var(--black);
  background: var(--purple-hot);
  border-color: var(--purple-hot);
  box-shadow: 5px 5px 0 rgba(139, 92, 246, 0.24);
}

.madness-button:hover {
  color: var(--black);
  background: var(--green);
  border-color: var(--green);
}

.machine-bars {
  grid-column: 1 / -1;
  height: 18px;
  display: flex;
  align-items: end;
  gap: 5px;
}

.machine-bars i {
  width: clamp(18px, 5vw, 64px);
  height: 3px;
  display: block;
  background: var(--purple);
  animation: machineBar 1.8s ease-in-out infinite alternate;
}

.machine-bars i:nth-child(2) { height: 8px; animation-delay: -0.3s; }
.machine-bars i:nth-child(3) { height: 14px; animation-delay: -0.6s; }
.machine-bars i:nth-child(4) { height: 6px; animation-delay: -0.9s; }
.machine-bars i:nth-child(5) { height: 17px; animation-delay: -1.2s; }
.machine-bars i:nth-child(6) { height: 10px; animation-delay: -1.5s; }
.machine-bars i:nth-child(7) { height: 4px; animation-delay: -1.7s; }

.confetti-piece {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 15px;
  background: var(--piece-color, var(--green));
  transform: translate(-50%, -50%) rotate(var(--piece-rotate));
  animation: confettiBurst 1.15s ease-out forwards;
  pointer-events: none;
}

.meme-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.meme-card {
  position: relative;
  min-height: 285px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  isolation: isolate;
  transition: border-color 0.2s ease, transform 0.2s ease, z-index 0s;
}

.meme-card:hover {
  z-index: 3;
  border-color: var(--line-strong);
  transform: translateY(-4px) rotate(-0.4deg);
}

.meme-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 19px);
}

.meme-card:nth-child(1),
.meme-card:nth-child(4),
.meme-card:nth-child(7),
.meme-card:nth-child(10) {
  grid-column: span 5;
}

.meme-card:nth-child(2),
.meme-card:nth-child(3),
.meme-card:nth-child(5),
.meme-card:nth-child(6),
.meme-card:nth-child(8),
.meme-card:nth-child(9) {
  grid-column: span 7;
}

.meme-card:nth-child(2),
.meme-card:nth-child(5),
.meme-card:nth-child(8) {
  grid-column: span 3;
}

.meme-card:nth-child(3),
.meme-card:nth-child(6),
.meme-card:nth-child(9) {
  grid-column: span 4;
}

.meme-card:nth-child(10) {
  grid-column: span 12;
  min-height: 240px;
}

.meme-number,
.meme-card small {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font: 9px/1.3 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meme-card p {
  position: relative;
  z-index: 2;
  margin: auto 0;
  font-family: var(--font-display);
  font-size: clamp(29px, 3.1vw, 48px);
  line-height: 1.05;
}

.meme-symbol,
.meme-arrow,
.meme-halo,
.ticket-icon,
.cycle-icon {
  position: absolute;
  right: 15px;
  bottom: -37px;
  z-index: 1;
  font: 190px/1 var(--font-display);
  opacity: 0.13;
}

.meme-alarm {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 61, 79, 0.3), transparent 65%), #180a0d;
  border-color: rgba(255, 61, 79, 0.6);
}

.meme-alarm p {
  color: var(--red);
  text-shadow: 4px 3px 0 #fff, -3px -1px 0 #640714;
  animation: alarmText 2.8s steps(1) infinite;
}

.meme-alarm .meme-symbol { color: var(--red); opacity: 0.28; }

.meme-blur {
  color: #aaaab1;
  filter: grayscale(0.8);
  background: linear-gradient(90deg, #17171b, #24242a 50%, #111114);
}

.meme-blur p {
  filter: blur(0.8px);
  text-shadow: 8px 0 5px rgba(255, 255, 255, 0.18);
}

.meme-fly {
  background: linear-gradient(180deg, rgba(183, 255, 53, 0.04), rgba(183, 255, 53, 0.19));
  border-color: rgba(183, 255, 53, 0.5);
}

.meme-fly p,
.meme-fly .meme-arrow {
  color: var(--green);
  text-shadow: 0 0 22px rgba(183, 255, 53, 0.42);
}

.meme-fly .meme-arrow {
  animation: arrowRise 2s ease-in-out infinite;
}

.meme-discharge {
  color: var(--black);
  background: #f6f6fb;
  border-color: #fff;
  box-shadow: inset 0 0 40px #fff, 0 0 30px rgba(255, 255, 255, 0.11);
}

.meme-discharge .meme-number,
.meme-discharge small {
  color: #5c5c66;
}

.meme-door {
  position: absolute;
  right: 10%;
  bottom: 0;
  width: 95px;
  height: 145px;
  border: 8px solid #dcdce3;
  border-bottom: 0;
  box-shadow: inset 0 0 28px rgba(139, 92, 246, 0.55), 0 0 28px white;
}

.meme-door::after {
  content: "";
  position: absolute;
  top: 49%;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.meme-altar {
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 200, 87, 0.25), transparent 32%),
    linear-gradient(180deg, #241536, #100b16);
  border-color: rgba(255, 200, 87, 0.55);
}

.meme-altar p {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 200, 87, 0.44), 3px 3px 0 #582d90;
}

.meme-halo {
  top: 35px;
  right: 50%;
  bottom: auto;
  color: var(--gold);
  font-size: 105px;
  transform: translateX(50%);
  animation: haloTurn 8s linear infinite;
}

.meme-hold {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), transparent), var(--panel);
}

.hodl-stamp {
  position: absolute;
  right: -11px;
  top: 59px;
  padding: 4px 15px;
  color: var(--purple-hot);
  border: 3px solid currentColor;
  font: 34px/1 var(--font-display);
  transform: rotate(21deg);
  opacity: 0.27;
}

.meme-ticket {
  color: var(--black);
  background: var(--gold);
}

.meme-ticket::before {
  opacity: 0.15;
  background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 7px);
}

.meme-ticket .meme-number,
.meme-ticket small { color: rgba(0, 0, 0, 0.65); }
.meme-ticket .ticket-icon { color: #000; opacity: 0.12; }

.meme-faith {
  background: linear-gradient(180deg, #0c1d17, #101317);
  border-color: rgba(183, 255, 53, 0.36);
}

.faith-meter {
  position: absolute;
  right: 20px;
  bottom: 35px;
  width: 18px;
  height: 70%;
  border: 1px solid rgba(183, 255, 53, 0.4);
}

.faith-meter i {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  height: 84%;
  background: var(--green);
  box-shadow: 0 0 20px rgba(183, 255, 53, 0.5);
  animation: faithLevel 2.5s ease-in-out infinite alternate;
}

.meme-ecg {
  background: #0b1017;
  border-color: rgba(53, 167, 255, 0.45);
}

.meme-ecg p { color: #daefff; }

.ecg-line {
  position: absolute;
  right: 0;
  bottom: 42px;
  left: 0;
  height: 50px;
  display: flex;
  align-items: center;
  opacity: 0.26;
}

.ecg-line::before,
.ecg-line::after,
.ecg-line i {
  content: "";
  flex: 1;
  height: 2px;
  display: block;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}

.ecg-line i:nth-child(2) { transform: rotate(-58deg) scaleX(0.5); }
.ecg-line i:nth-child(3) { transform: rotate(72deg) scaleX(0.65); }
.ecg-line i:nth-child(4) { transform: rotate(-20deg) scaleX(0.8); }

.meme-cycle {
  background: linear-gradient(135deg, rgba(53, 167, 255, 0.12), rgba(139, 92, 246, 0.12)), var(--panel);
}

.meme-cycle .cycle-icon {
  color: var(--blue);
  animation: simpleSpin 7s linear infinite reverse;
}

.broadcast-section {
  position: relative;
  width: min(1370px, calc(100% - 24px));
  min-height: 160px;
  margin: 0 auto;
  padding: 30px clamp(24px, 6vw, 90px);
  display: grid;
  grid-template-columns: auto 1fr minmax(180px, 0.45fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 55px);
  overflow: hidden;
  color: var(--black);
  background: var(--purple-hot);
  transform: rotate(0.5deg);
}

.broadcast-section::after {
  content: "ON AIR";
  position: absolute;
  right: 8%;
  bottom: -52px;
  color: rgba(0, 0, 0, 0.07);
  font: 140px/1 var(--font-display);
}

.broadcast-icon {
  position: relative;
  width: 66px;
  height: 66px;
  border: 3px solid var(--black);
  border-radius: 50%;
}

.broadcast-icon::before,
.broadcast-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid var(--black);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.broadcast-icon::before { width: 38px; height: 38px; }
.broadcast-icon::after { width: 13px; height: 13px; background: var(--black); }

.broadcast-copy {
  position: relative;
  z-index: 2;
}

.broadcast-copy p {
  margin: 0 0 8px;
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.18em;
}

.broadcast-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.broadcast-copy strong.switching {
  opacity: 0;
  transform: translateX(20px) skew(-8deg);
}

.broadcast-signal {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.broadcast-signal i {
  width: 5px;
  height: calc(var(--h, 0.4) * 100%);
  background: var(--black);
  animation: signalBounce 0.8s ease-in-out infinite alternate;
}

.broadcast-signal i:nth-child(1) { --h: 0.2; animation-delay: -0.1s; }
.broadcast-signal i:nth-child(2) { --h: 0.7; animation-delay: -0.6s; }
.broadcast-signal i:nth-child(3) { --h: 0.4; animation-delay: -0.2s; }
.broadcast-signal i:nth-child(4) { --h: 1; animation-delay: -0.7s; }
.broadcast-signal i:nth-child(5) { --h: 0.6; animation-delay: -0.3s; }
.broadcast-signal i:nth-child(6) { --h: 0.3; animation-delay: -0.8s; }
.broadcast-signal i:nth-child(7) { --h: 0.8; animation-delay: -0.4s; }
.broadcast-signal i:nth-child(8) { --h: 0.45; animation-delay: -0.9s; }

.broadcast-live {
  position: relative;
  z-index: 2;
  padding: 9px 12px;
  border: 1px solid var(--black);
  font: 10px/1 var(--font-mono);
  font-weight: 900;
}

.broadcast-live i {
  background: var(--red);
  box-shadow: none;
}

.data-badge {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  border: 1px solid rgba(183, 255, 53, 0.3);
  background: rgba(183, 255, 53, 0.05);
  font: 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.data-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.data-badge.loading { color: var(--gold); border-color: rgba(255, 200, 87, 0.3); }
.data-badge.sample { color: var(--red); border-color: rgba(255, 61, 79, 0.4); }

.api-error {
  margin-bottom: 12px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffd9dc;
  border: 1px solid rgba(255, 61, 79, 0.58);
  background: rgba(255, 61, 79, 0.09);
  font-size: 12px;
}

.api-error strong { color: var(--red); white-space: nowrap; }
.api-error span { flex: 1; }

.api-error button {
  padding: 7px 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.price-console {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
  border: 1px solid var(--line);
  background: var(--panel);
}

.price-summary {
  position: relative;
  padding: clamp(30px, 4vw, 52px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.18), transparent 47%),
    var(--black-soft);
}

.price-summary::after {
  content: "Ξ";
  position: absolute;
  right: -24px;
  bottom: -70px;
  color: rgba(139, 92, 246, 0.08);
  font: 260px/1 Georgia, serif;
}

.console-label,
.chart-heading,
.price-extremes span,
.price-updated,
.data-note {
  color: var(--muted);
  font: 10px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
}

.console-label { margin: 0 0 18px; }

.current-price {
  position: relative;
  z-index: 2;
  display: block;
  font: clamp(50px, 6vw, 82px)/1 var(--font-display);
  letter-spacing: -0.03em;
}

.change-row {
  position: relative;
  z-index: 2;
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-change {
  padding: 4px 8px;
  border: 1px solid currentColor;
  font: 15px/1.2 var(--font-mono);
  font-weight: 800;
}

.price-change.up { color: var(--green); }
.price-change.down { color: var(--red); }
.price-change.neutral { color: var(--muted); }
.change-row small { color: var(--muted); font: 9px/1 var(--font-mono); }

.price-extremes {
  position: relative;
  z-index: 2;
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.price-extremes div {
  padding: 14px 16px;
  border: 1px solid var(--line);
}

.price-extremes div + div { border-left: 0; }
.price-extremes span,
.price-extremes strong { display: block; }
.price-extremes strong { margin-top: 8px; font: 18px/1 var(--font-mono); }

.price-updated {
  position: absolute;
  bottom: 20px;
  left: clamp(30px, 4vw, 52px);
  z-index: 2;
  margin: 0;
  letter-spacing: 0.02em;
}

.chart-panel {
  padding: clamp(24px, 3.8vw, 48px);
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.chart-heading span:last-child { color: var(--purple-hot); }

.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 310px;
  margin-top: 20px;
}

#priceChart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 11px/1.5 var(--font-mono);
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: #6e6e7b;
  font: 9px/1 var(--font-mono);
}

.data-note {
  margin: 14px 0 0;
  text-align: right;
  letter-spacing: 0.02em;
}

.institution-warning {
  margin-bottom: 18px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  color: #dfe8ef;
  border: 1px solid rgba(53, 167, 255, 0.42);
  background: rgba(53, 167, 255, 0.07);
}

.institution-warning > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--black);
  background: var(--blue);
  font-weight: 900;
}

.institution-warning strong { font-size: 13px; }
.institution-warning small { color: var(--muted); font: 9px/1 var(--font-mono); }

.trade-controls {
  min-height: 88px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel);
}

.trade-controls label span {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
}

.trade-controls select {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 11px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--black-soft);
  font-size: 11px;
  cursor: pointer;
}

.record-count {
  min-width: 90px;
  height: 38px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
}

.record-count strong { color: var(--green); font: 25px/1 var(--font-mono); }
.record-count span { color: var(--muted); font: 8px/1 var(--font-mono); }

.trade-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.trade-table th {
  padding: 13px 15px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #0d0d12;
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-align: left;
}

.trade-table th:nth-child(1) { width: 18%; }
.trade-table th:nth-child(2) { width: 10%; }
.trade-table th:nth-child(3) { width: 13%; }
.trade-table th:nth-child(4) { width: 13%; }
.trade-table th:nth-child(5) { width: 23%; }
.trade-table th:nth-child(6) { width: 23%; }

.trade-table td {
  padding: 18px 15px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 17, 25, 0.85);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.trade-table tr:last-child td { border-bottom: 0; }
.trade-table tbody tr:hover td { background: rgba(139, 92, 246, 0.06); }

.trade-table td strong,
.trade-table td small {
  display: block;
}

.trade-table td strong { font-size: 12px; }
.trade-table td small { margin-top: 4px; color: var(--muted); font: 9px/1.4 var(--font-mono); }

.action-tag,
.verify-tag,
.sample-tag {
  width: fit-content;
  padding: 5px 7px;
  display: inline-block;
  border: 1px solid currentColor;
  font: 9px/1 var(--font-mono);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.action-tag.buy { color: var(--green); background: rgba(183, 255, 53, 0.06); }
.action-tag.sell { color: var(--red); background: rgba(255, 61, 79, 0.06); }
.action-tag.transfer { color: var(--blue); background: rgba(53, 167, 255, 0.06); }
.verify-tag.unverified { color: var(--gold); }
.verify-tag.verified { color: var(--green); }
.sample-tag { margin-left: 5px; color: var(--red); }

.trade-table a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.loading-row td,
.empty-row td {
  padding: 50px;
  color: var(--muted);
  font: 11px/1.5 var(--font-mono);
  text-align: center;
}

.table-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--red);
  font: 10px/1.5 var(--font-mono);
}

.contact-section {
  position: relative;
  min-height: 470px;
  margin-bottom: clamp(70px, 10vw, 130px);
  padding: clamp(50px, 7vw, 90px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 70px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(125deg, rgba(139, 92, 246, 0.22), transparent 46%),
    var(--panel);
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--green), var(--red));
}

.contact-copy { position: relative; z-index: 2; }
.contact-copy > p:not(.section-code) { max-width: 480px; margin: 28px 0 0; color: #bbbcc6; font-size: 17px; }

.contact-manifesto {
  width: fit-content;
  margin-top: 48px;
  padding: 12px 15px;
  border-left: 3px solid var(--green);
  background: rgba(183, 255, 53, 0.05);
}

.contact-manifesto span,
.contact-manifesto small { display: block; }
.contact-manifesto span { color: var(--green); font: 12px/1 var(--font-mono); }
.contact-manifesto small { margin-top: 7px; color: var(--muted); font-size: 10px; }

.qr-card {
  position: relative;
  z-index: 3;
  width: 280px;
  margin: 0;
  padding: 17px;
  color: var(--black);
  background: #f5f5f9;
  transform: rotate(2deg);
  box-shadow: 13px 13px 0 rgba(139, 92, 246, 0.35);
  transition: transform 0.25s ease;
}

.qr-card:hover { transform: rotate(-1deg) translateY(-4px); }

.qr-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #b8b8c0;
  background: #fff;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.qr-frame img[hidden] { display: none; }

.qr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 50%, transparent 50%),
    linear-gradient(rgba(0, 0, 0, 0.035) 50%, transparent 50%),
    #fff;
  background-size: 16px 16px;
}

.qr-placeholder[hidden] { display: none; }
.qr-placeholder strong { font: 72px/1 var(--font-display); letter-spacing: -0.05em; }
.qr-placeholder small { margin-top: 16px; color: #555; font: 10px/1.5 var(--font-mono); text-align: center; }

.qr-corner {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 8px solid #0c0c10;
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 11px #0c0c10;
}

.corner-a { top: 16px; left: 16px; }
.corner-b { top: 16px; right: 16px; }
.corner-c { bottom: 16px; left: 16px; }

.qr-card figcaption {
  padding: 14px 5px 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
}

.contact-decoration {
  position: absolute;
  right: 29%;
  bottom: -160px;
  z-index: 1;
  color: rgba(139, 92, 246, 0.08);
  font: 510px/1 Georgia, serif;
  transform: rotate(-11deg);
}

.site-footer {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 45px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--purple-hot);
  font: 11px/1 var(--font-mono);
}

.footer-brand span { font: 22px/1 Georgia, serif; }
.footer-disclaimer p { margin: 0 0 6px; color: var(--muted); font-size: 10px; }
.footer-code { margin: 0; color: #5f5f6b; font: 9px/1.4 var(--font-mono); text-align: right; }

.easter-egg {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  background: rgba(7, 7, 10, 0.83);
  backdrop-filter: blur(8px);
}

.easter-egg[hidden] { display: none; }

.easter-egg::before,
.easter-egg::after {
  content: "";
  position: absolute;
  width: min(70vw, 670px);
  aspect-ratio: 1;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.25;
  animation: altarRing 2s ease-out forwards;
}

.easter-egg::after {
  width: min(52vw, 490px);
  border-style: dashed;
  animation-delay: 0.08s;
}

.easter-egg > div {
  position: relative;
  z-index: 2;
  padding: 55px clamp(25px, 6vw, 85px);
  color: var(--gold);
  border: 1px solid var(--gold);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.34), rgba(10, 7, 14, 0.94) 68%);
  text-align: center;
  box-shadow: 0 0 80px rgba(255, 200, 87, 0.22), inset 0 0 50px rgba(139, 92, 246, 0.18);
  animation: altarReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.easter-egg span,
.easter-egg strong,
.easter-egg small { display: block; }
.easter-egg span { font-size: 48px; animation: simpleSpin 4s linear infinite; }
.easter-egg strong { font: clamp(35px, 6vw, 76px)/1.1 var(--font-display); text-shadow: 0 0 25px rgba(255, 200, 87, 0.75), 5px 5px 0 #542f8a; }
.easter-egg small { margin-top: 20px; font: 9px/1 var(--font-mono); letter-spacing: 0.22em; }

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2px, -1px); }
  50% { transform: translate(-1px, 2px); }
  75% { transform: translate(1px, 1px); }
}

@keyframes floatAmbient { 50% { transform: rotate(55deg) translate(40px, -25px); } }
@keyframes livePulse { 50% { opacity: 0.35; transform: scale(0.65); } }
@keyframes cursorBlink { 50% { opacity: 0; } }
@keyframes orbitRotate { to { transform: rotate(360deg); } }
@keyframes ethFloat { 50% { transform: translateY(-13px) rotate(-1.5deg); } }
@keyframes ethPulse { from { transform: scale(0.35); opacity: 0.7; } to { transform: scale(1.45); opacity: 0; } }
@keyframes tickerMove { to { transform: translateX(-50%); } }
@keyframes machineBar { to { transform: scaleY(0.25); opacity: 0.35; } }
@keyframes arrowRise { 50% { transform: translateY(-22px); opacity: 0.25; } }
@keyframes haloTurn { to { transform: translateX(50%) rotate(360deg); } }
@keyframes simpleSpin { to { transform: rotate(360deg); } }
@keyframes faithLevel { to { height: 45%; } }
@keyframes signalBounce { to { transform: scaleY(0.28); } }

@keyframes titleGlitchA {
  0%, 89%, 100% { transform: translate(-4px, 1px); }
  90% { transform: translate(8px, 1px); }
  92% { transform: translate(-11px, 0); }
  94% { transform: translate(3px, -1px); }
}

@keyframes titleGlitchB {
  0%, 86%, 100% { transform: translate(4px, -1px); }
  87% { transform: translate(-8px, 0); }
  90% { transform: translate(11px, 2px); }
  93% { transform: translate(-2px, 0); }
}

@keyframes alarmText {
  0%, 87%, 100% { transform: translate(0); }
  88% { transform: translate(-5px, 1px); }
  90% { transform: translate(7px, -2px); }
  92% { transform: translate(-2px, 0); }
}

@keyframes alarmShake {
  0% { transform: translateX(-5px) skew(-3deg); }
  100% { transform: translateX(6px) skew(2deg); }
}

@keyframes flyUp {
  0% { opacity: 0; transform: translateY(50px) scale(0.75); }
  70% { opacity: 1; transform: translateY(-10px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes dischargeFlash {
  0% { opacity: 0; filter: brightness(5); transform: scale(1.3); }
  35% { opacity: 1; }
  60% { filter: brightness(2); }
  100% { filter: brightness(1); transform: scale(1); }
}

@keyframes confettiBurst {
  to {
    transform: translate(calc(-50% + var(--piece-x)), calc(-50% + var(--piece-y))) rotate(calc(var(--piece-rotate) + 270deg));
    opacity: 0;
  }
}

@keyframes altarReveal {
  from { opacity: 0; transform: scale(0.72) rotate(-2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes altarRing {
  from { transform: scale(0.5) rotate(0); opacity: 0; }
  35% { opacity: 0.35; }
  to { transform: scale(1.2) rotate(120deg); opacity: 0; }
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .header-status { display: none; }
  .site-nav { justify-content: flex-end; gap: 18px; }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  }

  .hero-art { min-height: 510px; }
  .hero-stamp { right: 0; width: 145px; }

  .meme-card:nth-child(n) { grid-column: span 6; }

  .broadcast-section { grid-template-columns: auto 1fr auto; }
  .broadcast-signal { display: none; }

  .price-console { grid-template-columns: minmax(260px, 0.8fr) 1.2fr; }
  .current-price { font-size: clamp(42px, 6vw, 64px); }

  .contact-decoration { right: 20%; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 65px; }

  .site-header {
    position: relative;
    min-height: 65px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
  }

  .brand { flex: 0 0 auto; }
  .brand-mark { width: 31px; height: 37px; }
  .brand strong { font-size: 12px; }
  .brand small { display: none; }

  .site-nav {
    flex: 1;
    justify-content: flex-start;
    gap: 18px;
    padding: 5px 0 5px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 10px; }

  .hero {
    width: min(100% - 32px, var(--max-width));
    min-height: auto;
    padding: 70px 0 45px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero h1 { font-size: clamp(58px, 17vw, 92px); }
  .hero h1 > span:first-child { font-size: 0.25em; }
  .hero-subtitle { margin-top: 24px; font-size: 15px; }
  .hero-vitals { margin-top: 42px; }
  .hero-art { min-height: 430px; }
  .eth-button { width: 190px; }
  .orbit-one { width: 390px; }
  .orbit-two { width: 290px; }
  .hero-stamp { right: 2%; bottom: 0; width: 128px; padding: 21px 10px; }

  .section { width: min(100% - 32px, var(--max-width)); padding: 100px 0; }

  .section-heading {
    margin-bottom: 35px;
    display: block;
  }

  .section-heading > p { margin-top: 18px; text-align: left; }

  .madness-machine {
    min-height: 250px;
    padding-top: 62px;
    grid-template-columns: 1fr;
  }

  .madness-button { width: fit-content; }
  .madness-machine::after { font-size: 90px; }

  .meme-card:nth-child(n) { grid-column: span 6; min-height: 260px; }
  .meme-card p { font-size: clamp(28px, 7vw, 42px); }

  .broadcast-section {
    min-height: 145px;
    padding: 25px;
    grid-template-columns: auto 1fr;
    gap: 20px;
  }

  .broadcast-icon { width: 52px; height: 52px; }
  .broadcast-live { position: absolute; top: 13px; right: 13px; }

  .price-console { grid-template-columns: 1fr; }
  .price-summary { min-height: 390px; border-right: 0; border-bottom: 1px solid var(--line); }
  .price-extremes { margin-top: 50px; }
  .chart-panel { min-height: 410px; }
  .chart-wrap { min-height: 280px; }
  .data-note { text-align: left; }

  .institution-warning { grid-template-columns: auto 1fr; }
  .institution-warning small { grid-column: 2; }

  .trade-controls { grid-template-columns: repeat(2, 1fr); }
  .trade-controls label:first-child { grid-column: 1 / -1; }

  .trade-table-wrap { border: 0; overflow: visible; }
  .trade-table,
  .trade-table tbody,
  .trade-table tr,
  .trade-table td { display: block; }
  .trade-table thead { display: none; }

  .trade-table tr {
    margin-bottom: 12px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--panel);
  }

  .trade-table td {
    position: relative;
    min-height: 46px;
    padding: 13px 4px 13px 36%;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .trade-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 16px;
    left: 4px;
    width: 31%;
    color: var(--muted);
    font: 8px/1.2 var(--font-mono);
    letter-spacing: 0.1em;
  }

  .trade-table tr td:last-child { border-bottom: 0; }
  .loading-row td,
  .empty-row td { padding: 40px 10px; }
  .loading-row td::before,
  .empty-row td::before { display: none; }

  .contact-section {
    width: min(100% - 32px, var(--max-width));
    padding: 55px 28px;
    grid-template-columns: 1fr auto;
    gap: 35px;
  }

  .qr-card { width: 220px; }
  .qr-placeholder strong { font-size: 55px; }
  .qr-corner { width: 40px; height: 40px; border-width: 6px; }
  .contact-decoration { right: 18%; font-size: 390px; }

  .site-footer {
    width: min(100% - 32px, var(--max-width));
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-code { text-align: left; }
}

@media (max-width: 520px) {
  .site-header { padding-right: 0; }
  .site-nav { padding-right: 18px; }
  .site-nav a:nth-child(3),
  .site-nav a:nth-child(4) { display: none; }

  .hero { padding-top: 58px; }
  .kicker { letter-spacing: 0.1em; }
  .hero h1 { font-size: clamp(52px, 18.5vw, 78px); }
  .glitch-title { text-shadow: 3px 3px 0 rgba(139, 92, 246, 0.8); }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .button { padding: 0 10px; font-size: 11px; }
  .hero-vitals div { padding: 0 8px; }
  .hero-vitals strong { font-size: 16px; }
  .hero-art { min-height: 380px; }
  .eth-button { width: 155px; }
  .orbit-one { width: 330px; }
  .orbit-two { width: 240px; }
  .hero-stamp { width: 110px; }
  .hero-stamp strong { font-size: 10px; }
  .label-three { left: 0; }

  .ticker span { font-size: 16px; padding: 0 24px; }
  .section { padding: 82px 0; }
  .section-heading h2,
  .contact-section h2 { font-size: clamp(43px, 14vw, 66px); }

  .madness-machine { padding-right: 20px; padding-left: 20px; }
  .madness-output { font-size: clamp(28px, 10vw, 42px); }

  .meme-wall { display: block; }
  .meme-card { min-height: 275px; margin-bottom: 10px; }
  .meme-card:nth-child(even) { transform: rotate(0.5deg); }
  .meme-card:nth-child(odd) { transform: rotate(-0.35deg); }
  .meme-card:hover { transform: translateY(-3px); }

  .broadcast-section { width: calc(100% - 12px); padding: 32px 18px; }
  .broadcast-icon { display: none; }
  .broadcast-copy strong { font-size: 32px; }

  .api-error { align-items: flex-start; flex-wrap: wrap; }
  .api-error span { flex-basis: 70%; }
  .api-error button { margin-left: auto; }
  .data-badge { width: fit-content; margin-top: 18px; }

  .price-summary { min-height: 365px; padding: 28px 22px; }
  .current-price { font-size: 52px; }
  .price-updated { left: 22px; }
  .chart-panel { min-height: 365px; padding: 25px 16px; }
  .chart-wrap { min-height: 250px; }
  .chart-heading { font-size: 8px; }

  .institution-warning { padding: 14px; }
  .institution-warning strong { font-size: 12px; }

  .trade-controls { grid-template-columns: 1fr; border-bottom: 1px solid var(--line); }
  .trade-controls label:first-child { grid-column: auto; }
  .record-count { justify-content: flex-start; }
  .trade-table td { padding-left: 40%; }
  .trade-table td::before { width: 35%; }

  .contact-section {
    margin-bottom: 75px;
    padding: 55px 22px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-copy > p:not(.section-code) { font-size: 15px; }
  .contact-manifesto { margin-right: auto; margin-left: auto; text-align: left; }
  .qr-card { width: min(250px, 90%); margin: 0 auto; }
  .contact-decoration { right: 50%; transform: translateX(50%) rotate(-11deg); }

  .easter-egg > div { width: calc(100% - 28px); padding: 45px 18px; }
  .easter-egg strong { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
