:root {
  --pink: #FF2A6D; --purple: #7B2CBF; --cyan: #05D9E8; --yellow: #F9C80E; --bg: #1A0B2E;
  --sol1: #9945FF; --sol2: #14F195;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #0d0418; color: #fff; overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* ---------- sunset backdrop ---------- */
.sky {
  position: fixed; inset: 0; z-index: -5;
  background: linear-gradient(180deg, #0b0220 0%, #2a0845 35%, #6a1b6e 55%, #c2315e 68%, #f2714a 76%, #1a0730 76.2%, #0d0418 100%);
}
.sun {
  position: fixed; left: 50%; top: 44vh; width: 46vh; height: 46vh; margin-left: -23vh; z-index: -4; border-radius: 50%;
  background: linear-gradient(180deg, #ffd34e 0%, #ff7a59 45%, #ff2a6d 80%);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
          mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
  filter: drop-shadow(0 0 40px rgba(255, 42, 109, 0.6));
}
.grid {
  position: fixed; left: -50%; right: -50%; bottom: -10vh; height: 34vh; z-index: -3;
  background-image:
    linear-gradient(rgba(255, 42, 109, 0.75) 2px, transparent 2px),
    linear-gradient(90deg, rgba(5, 217, 232, 0.6) 2px, transparent 2px);
  background-size: 60px 60px;
  transform: perspective(300px) rotateX(62deg); transform-origin: top center;
  animation: gridmove 2.4s linear infinite;
  -webkit-mask: linear-gradient(180deg, transparent, #000 30%);
          mask: linear-gradient(180deg, transparent, #000 30%);
}
@keyframes gridmove { to { background-position: 0 60px, 0 60px; } }
.palm { position: fixed; bottom: 0; height: 62vh; z-index: -2; fill: #07010f; }
.palm-l { left: -2vw; }
.palm-r { right: -2vw; transform: scaleX(-1); }
.vhs {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg, rgba(0,0,0,0.5) 0 1px, transparent 1px 3px);
  animation: noise 0.4s steps(4) infinite;
}
@keyframes noise { 0% { background-position: 0 0, 0 0; } 25% { background-position: -40px 20px, 0 1px; } 50% { background-position: 30px -50px, 0 2px; } 75% { background-position: -70px 60px, 0 1px; } }

/* ---------- layout ---------- */
main { display: flex; flex-direction: column; align-items: center; padding: 18px 16px 30px; gap: 14px; }
.logo h1 {
  margin: 0; display: flex; align-items: center; gap: 0.35em; flex-wrap: wrap; justify-content: center;
  font: italic 900 clamp(34px, 6.5vw, 76px)/1 "Arial Black", Impact, sans-serif; letter-spacing: 0.02em;
  animation: sway 4s ease-in-out infinite;
}
.hl {
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan), var(--pink)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #12051f;
  filter: drop-shadow(0 0 10px rgba(255, 42, 109, 0.8));
  animation: shimmer 4s linear infinite;
}
.pf { color: #fff; -webkit-text-stroke: 2px #12051f; text-shadow: 0 0 14px var(--cyan), 0 0 30px var(--cyan); }
.pill { width: 1.4em; height: 0.7em; filter: drop-shadow(0 0 10px #53ff8a); }
@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

.frame {
  width: min(960px, 100%); aspect-ratio: 16 / 9; position: relative; background: #000;
  border: 3px solid var(--pink); border-radius: 6px;
  box-shadow: 0 0 0 3px #12051f, 0 0 22px var(--pink), 0 0 60px rgba(5, 217, 232, 0.45), inset 0 0 20px rgba(255, 42, 109, 0.4);
}
.frame canvas { display: block; width: 100%; height: 100%; cursor: none; image-rendering: pixelated; }
.frame:fullscreen { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; background: #000; width: 100vw; height: 100vh; }
.frame:fullscreen canvas { width: min(100vw, 177.78vh); height: min(100vh, 56.25vw); }

.fs {
  font: italic 900 18px "Arial Black", Impact, sans-serif; letter-spacing: 0.08em; color: #fff; cursor: pointer;
  background: rgba(20, 5, 40, 0.8); border: 2px solid var(--cyan); padding: 9px 26px; border-radius: 4px;
  text-shadow: 0 0 8px var(--cyan); box-shadow: 0 0 14px rgba(5, 217, 232, 0.6);
  transition: transform 0.15s, border-color 0.15s, color 0.15s;
}
.fs:hover { transform: scale(1.06) rotate(-1deg); border-color: var(--yellow); color: var(--yellow); }

/* ---------- Solana panel ---------- */
.sol {
  width: min(960px, 100%); padding: 2px; border-radius: 12px;
  background: linear-gradient(90deg, var(--sol1), var(--sol2));
  box-shadow: 0 0 26px rgba(153, 69, 255, 0.45);
}
.sol > * { background: #0f0a1e; }
.sol-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; border-radius: 10px 10px 0 0; }
.sol-logo { width: 30px; height: 24px; }
.sol-title {
  font: 900 16px "Segoe UI", Arial, sans-serif; letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--sol1), var(--sol2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.live { margin-left: auto; font: 700 11px monospace; color: var(--sol2); display: flex; align-items: center; gap: 6px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sol2); box-shadow: 0 0 8px var(--sol2); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.sol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; padding: 8px 16px; font-size: 13px; }
.sol-grid b { font-family: monospace; font-size: 13px; color: #e8e2ff; }
.k { color: #9a8cc8; }
.pid { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pid code { font-size: 12px; color: var(--sol2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#copy {
  font: 700 11px "Segoe UI", Arial, sans-serif; cursor: pointer; color: #fff; border: 0; border-radius: 4px; padding: 3px 9px;
  background: linear-gradient(90deg, var(--sol1), var(--sol2)); flex: none;
}
.tx-title { padding: 6px 16px 2px; font-size: 13px; }
.txs { list-style: none; margin: 0; padding: 2px 16px 8px; font: 12px monospace; }
.txs li { display: flex; gap: 12px; align-items: center; padding: 4px 0; border-bottom: 1px solid #221a3a; animation: slidein 0.35s ease-out; }
.txs li:last-child { border-bottom: 0; }
.txs .sig { color: #cfc6f2; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txs .ok { color: var(--sol2); }
.txs .ok::before { content: "● "; }
.txs .ago { color: #8a7fb0; width: 56px; text-align: right; }
@keyframes slidein { from { opacity: 0; transform: translateX(-12px); } }
.record { padding: 8px 16px; color: var(--sol2); font-weight: 700; font-size: 13px; }
.record code { color: #fff; font-weight: 400; margin-left: 6px; word-break: break-all; }
.note { margin: 0; padding: 4px 16px 10px; font-size: 11px; color: #6f6496; border-radius: 0 0 10px 10px; }
footer { font-size: 11px; color: #9a8cc8; letter-spacing: 0.1em; opacity: 0.8; }

@media (max-width: 640px) {
  .sol-grid { grid-template-columns: 1fr; }
  .txs .ago { width: 44px; }
}
