@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --wave-step: 0.08s;
  --cyan: #00ffff;
  --magenta: #ff00ff;
  --yellow: #ffff00;
  --green: #00ff00;
  --phosphor: #33ff33;
  --gold: #eec14a;
}

html, body {
  height: 100%;
  margin: 0;
  background: #000;
  color: var(--phosphor);
  overflow: hidden;
  cursor: crosshair;
  font-family: 'Press Start 2P', 'Courier New', monospace;
}

body {
  display: grid;
  place-items: center;
  position: relative;
}

#canvas-one, #canvas-two {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: screen;
}

#canvas-two {
  z-index: 0;
  opacity: 0.3;
}

.effect-wrap {
  position: relative;
  display: inline-block;
}

.effect-wrap::before,
.effect-wrap::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.effect-wrap::before {
  color: #ff6b35;
  transform: translate(-2px, 0);
  opacity: 0.6;
}

.effect-wrap::after {
  color: #f7931e;
  transform: translate(2px, 0);
  opacity: 0.6;
}

.main-title .effect-wrap::before {
  color: #d4a849;
  transform: translate(-2px, 0);
  opacity: 0.6;
}

.main-title .effect-wrap::after {
  color: #ffd56b;
  transform: translate(2px, 0);
  opacity: 0.6;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0.05) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  animation: scan-jitter 0.1s infinite;
}

@keyframes scan-jitter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1px); }
}

.glow-text {
  text-shadow: 
    0 0 5px var(--phosphor),
    0 0 10px var(--phosphor),
    0 0 20px var(--phosphor),
    0 0 40px var(--phosphor);
  color: var(--phosphor);
}

.screen-effect {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.2) 70%, rgba(0,0,0,0.8) 100%);
  border-radius: 12px;
  box-shadow: inset 0 0 100px rgba(0,255,255,0.1);
}

@keyframes screen-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.97; }
  51% { opacity: 1; }
  52% { opacity: 0.98; }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  z-index: 101;
  animation: screen-flicker 0.15s infinite;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
  z-index: 50;
  overflow: hidden;
  border-bottom: 2px solid var(--cyan);
}

.scroll-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.scroll-item {
  flex-shrink: 0;
}

.scroll-text {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  display: inline-block;
}

.main-title {
  position: fixed;
  top: 175px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: clamp(16px, 4vw, 32px);
  letter-spacing: 0.15em;
  user-select: none;
  z-index: 10;
  animation: float-motion 3s ease-in-out infinite;
}

.main-title .glow-text {
  color: #fff !important;
  text-shadow: 
    0 0 5px #eec14a,
    0 0 10px #eec14a,
    0 0 20px #eec14a,
    0 0 40px #eec14a;
}

@keyframes float-motion {
  0%, 100% { transform: translate(-50%, 0); }
  25% { transform: translate(-50%, -8px); }
  75% { transform: translate(-50%, 8px); }
}

.content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  z-index: 10;
  margin-top: 17vh;
}

.media-wrapper {
  position: relative;
  filter: 
    contrast(1.1)
    brightness(1.1);
}

.content-wrap img {
  max-width: min(50vmin, 350px);
  height: auto;
  image-rendering: pixelated;
  filter: 
    drop-shadow(0 0 20px var(--cyan))
    drop-shadow(0 0 40px var(--magenta));
}

@keyframes img-bounce {
  0% { transform: scale(1.1); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.wave-text {
  font-size: clamp(14px, 3vw, 24px);
  letter-spacing: 0.2em;
  white-space: nowrap;
  display: flex;
  gap: 0.5ch;
  margin-top: 5vh;
}

.wave-text span {
  display: inline-block;
  animation: wave-motion 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.1s);
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor;
}

@keyframes wave-motion {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    color: var(--cyan);
  }
  25% { 
    transform: translateY(-12px) scale(1.1); 
    color: var(--magenta);
  }
  75% { 
    transform: translateY(12px) scale(0.9); 
    color: var(--yellow);
  }
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  border-top: 2px solid var(--magenta);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.bottom-left, .bottom-right {
  color: var(--yellow);
  text-shadow: 0 0 10px var(--yellow);
}

.particle {
  position: fixed;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 0 4px white;
}

.piece {
  position: fixed;
  width: 8px;
  height: 12px;
  pointer-events: none;
  z-index: 102;
}

.help-panel {
  position: fixed;
  bottom: 70px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--cyan);
  padding: 16px;
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  max-width: 200px;
  z-index: 15;
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.help-panel h3 {
  margin: 0 0 12px 0;
  color: var(--magenta);
  text-shadow: 0 0 10px var(--magenta);
  font-size: 11px;
}

.help-panel p {
  margin: 8px 0;
  color: var(--phosphor);
}

.help-panel kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--cyan);
  color: #000;
  border-radius: 2px;
  font-family: inherit;
  font-size: 8px;
  margin: 0 2px;
  box-shadow: 0 0 5px var(--cyan);
}

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

@media (max-width: 768px) {
  .help-panel {
    display: none;
  }
  .main-title {
    font-size: 14px;
  }
}
