/* ═══════════════════════════════════════════════════════════
   IMAGE DISRUPTOR 2000
   Arcade-neon palette — deep purple / hot pink / cyan / orange
   Keyed to the pixel-art walrus-with-raygun logo
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #1a0d2e;
  --bg-dark: #110620;
  --surface: #261344;
  --border: #3d1f5c;
  --accent: #ff5cd3;
  --accent2: #ff8be0;
  --cyan: #4fc3f7;
  --cyan-dim: rgba(79, 195, 247, 0.3);
  --orange: #ff6b35;
  --text: #f3e8ff;
  --text-dim: rgba(243, 232, 255, 0.5);
  --pixel-shadow: 3px 3px 0 rgba(255, 92, 211, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
  font-family: 'Space Mono', monospace; background: var(--bg);
  background-image:
    radial-gradient(ellipse at 30% 50%, rgba(255, 92, 211, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(79, 195, 247, 0.06) 0%, transparent 50%);
  color: var(--text); min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; padding: 1rem; overflow-x: hidden;
}

.scanlines { position: fixed; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 3px); pointer-events: none; z-index: 9999; }

.bg-floats { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-icon { position: absolute; opacity: 0.05; animation: bgDrift linear infinite; font-size: 1.8rem; }
.bg-icon:nth-child(1) { left: 8%; top: 15%; font-size: 2rem; animation-duration: 20s; }
.bg-icon:nth-child(2) { left: 85%; top: 22%; font-size: 1.6rem; animation-duration: 24s; animation-delay: -5s; }
.bg-icon:nth-child(3) { left: 20%; top: 55%; font-size: 2.2rem; animation-duration: 18s; animation-delay: -8s; }
.bg-icon:nth-child(4) { left: 72%; top: 65%; font-size: 1.4rem; animation-duration: 22s; animation-delay: -3s; }
.bg-icon:nth-child(5) { left: 45%; top: 82%; font-size: 1.8rem; animation-duration: 16s; animation-delay: -11s; }
.bg-icon:nth-child(6) { left: 92%; top: 45%; font-size: 1.5rem; animation-duration: 21s; animation-delay: -7s; }
.bg-icon:nth-child(7) { left: 35%; top: 30%; font-size: 2rem; animation-duration: 25s; animation-delay: -14s; }
.bg-icon:nth-child(8) { left: 60%; top: 8%; font-size: 1.3rem; animation-duration: 19s; animation-delay: -9s; }
@keyframes bgDrift { 0% { transform: translateY(0) rotate(0deg); } 25% { transform: translateY(-12px) rotate(5deg); } 50% { transform: translateY(-4px) rotate(-3deg); } 75% { transform: translateY(-16px) rotate(4deg); } 100% { transform: translateY(0) rotate(0deg); } }

#app { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 1rem; position: relative; z-index: 1; }

/* ── HEADER ─────────────────────────────── */
header { text-align: center; padding: 1rem 0 0.25rem; }
.hero-logo { width: 200px; height: 200px; border-radius: 16px; object-fit: cover; border: 3px solid var(--accent); box-shadow: 0 0 30px rgba(255, 92, 211, 0.35), 0 0 60px rgba(255, 92, 211, 0.12), 0 0 0 6px var(--bg), 0 0 0 8px var(--border); animation: logoPulse 4s ease-in-out infinite; transition: transform 0.3s; image-rendering: pixelated; }
.hero-logo:hover { transform: scale(1.05) rotate(-2deg); }
@keyframes logoPulse { 0%, 100% { box-shadow: 0 0 30px rgba(255, 92, 211, 0.35), 0 0 60px rgba(255, 92, 211, 0.12), 0 0 0 6px var(--bg), 0 0 0 8px var(--border); } 50% { box-shadow: 0 0 40px rgba(79, 195, 247, 0.5), 0 0 80px rgba(79, 195, 247, 0.2), 0 0 0 6px var(--bg), 0 0 0 8px var(--cyan); } }

.privacy-badge { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 0.75rem; color: var(--cyan); letter-spacing: 0.1em; margin-top: 0.75rem; padding: 0.6rem 1.2rem; border: 2px solid var(--cyan); border-radius: 4px; display: inline-block; background: rgba(79, 195, 247, 0.06); text-shadow: 0 0 10px rgba(79, 195, 247, 0.3); animation: badgeGlow 3s ease-in-out infinite; }
@keyframes badgeGlow { 0%, 100% { border-color: var(--cyan); } 50% { border-color: var(--accent); box-shadow: 0 0 16px rgba(255, 92, 211, 0.25); } }
.privacy-sub { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); letter-spacing: 0.08em; margin-top: 0.5rem; }

/* ── CARDS ──────────────────────────────── */
.card { background: var(--surface); border: 2px solid var(--border); border-radius: 4px; padding: 1.5rem; box-shadow: var(--pixel-shadow); display: none; }
.card.active { display: block; animation: cardSlam 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes cardSlam { 0% { opacity: 0; transform: translateY(30px) scale(0.9); } 60% { transform: translateY(-4px) scale(1.01); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

/* ── DROP ZONE ─────────────────────────── */
#dropzone { border: 3px dashed var(--accent); border-radius: 4px; padding: 2.5rem 1rem; text-align: center; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); outline: none; background: rgba(255, 92, 211, 0.03); }
#dropzone:hover, #dropzone:focus-visible, #dropzone.dragover { background: rgba(255, 92, 211, 0.08); border-color: var(--accent2); box-shadow: 0 0 30px rgba(255, 92, 211, 0.18); }
#dropzone.dragover { transform: scale(1.03); border-color: var(--cyan); }
.drop-icon { font-size: 3rem; margin-bottom: 0.75rem; animation: float 2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
#dropzone:hover .drop-icon { animation: wiggle 0.5s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: translateY(-6px) rotate(0); } 25% { transform: translateY(-6px) rotate(-10deg); } 75% { transform: translateY(-6px) rotate(10deg); } }
.drop-text { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--accent); margin-bottom: 0.25rem; text-shadow: 0 0 10px rgba(255, 92, 211, 0.3); transition: letter-spacing 0.2s; }
#dropzone:hover .drop-text { letter-spacing: 0.15em; }
.drop-hint { font-size: 0.8rem; color: var(--text-dim); }
.drop-formats { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.75rem; letter-spacing: 0.1em; }

/* ── SETTINGS / FILTER PICKER ──────────── */
.disrupt-controls { margin-bottom: 1rem; }
.setting { margin-bottom: 1rem; }
.setting-label { display: block; font-family: 'Orbitron', sans-serif; font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.15em; margin-bottom: 0.5rem; }

.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.4rem; }
.filter-btn { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.65rem; letter-spacing: 0.05em; padding: 0.6rem 0.4rem; background: var(--bg-dark); color: var(--text-dim); border: 2px solid var(--border); border-radius: 4px; cursor: pointer; transition: all 0.15s; text-align: center; text-transform: uppercase; }
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn.on { background: var(--cyan); color: var(--bg); border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan-dim); animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes popIn { 0% { transform: scale(0.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ── MEGA BUTTON ───────────────────────── */
.btn-mega { width: 100%; font-family: 'Press Start 2P', cursive; font-size: 0.95rem; letter-spacing: 0.08em; padding: 1.1rem 1rem; margin-bottom: 0.75rem; background: var(--accent); color: var(--bg-dark); border: 3px solid #b30080; border-radius: 4px; cursor: pointer; text-shadow: 2px 2px 0 rgba(0,0,0,0.2); box-shadow: 4px 4px 0 rgba(0,0,0,0.4), 0 0 24px rgba(255, 92, 211, 0.35); transition: transform 0.1s, box-shadow 0.15s, background 0.15s; animation: megaPulse 1.8s ease-in-out infinite; }
.btn-mega:hover { background: var(--accent2); box-shadow: 4px 4px 0 rgba(0,0,0,0.4), 0 0 40px rgba(255, 92, 211, 0.6); }
.btn-mega:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
@keyframes megaPulse { 0%, 100% { box-shadow: 4px 4px 0 rgba(0,0,0,0.4), 0 0 24px rgba(255, 92, 211, 0.3); } 50% { box-shadow: 4px 4px 0 rgba(0,0,0,0.4), 0 0 36px rgba(255, 92, 211, 0.55); } }

/* ── BUTTONS ───────────────────────────── */
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-pixel { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.8rem; padding: 0.65rem 1.25rem; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; transition: all 0.15s, transform 0.1s; text-transform: uppercase; letter-spacing: 0.05em; flex: 1; min-width: 0; }
.btn-pixel:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-primary { background: var(--cyan); color: var(--bg); border-color: var(--cyan); box-shadow: 3px 3px 0 rgba(79, 195, 247, 0.3); }
.btn-primary:hover { background: #82d6fa; box-shadow: 4px 4px 0 rgba(79, 195, 247, 0.4), 0 0 20px rgba(79, 195, 247, 0.3); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text-dim); border-color: var(--border); box-shadow: 3px 3px 0 rgba(0,0,0,0.2); }
.btn-secondary:hover { color: var(--text); border-color: var(--accent); }

/* ── PREVIEW ───────────────────────────── */
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
@media (max-width: 520px) { .preview-grid { grid-template-columns: 1fr; } }
.preview-slot { background: var(--bg-dark); border: 2px solid var(--cyan); border-radius: 4px; padding: 0.5rem; display: flex; flex-direction: column; align-items: center; min-height: 180px; }
.preview-slot.out { border-color: var(--accent); }
.preview-label { font-family: 'Press Start 2P', cursive; font-size: 0.55rem; color: var(--cyan); letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.preview-slot.out .preview-label { color: var(--accent); }
.preview-host { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 140px; }
.preview-host img, .preview-host canvas { max-width: 100%; max-height: 260px; display: block; image-rendering: auto; }
.preview-empty { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }

/* ── DISRUPT FLASH ─────────────────────── */
.shake { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(-3px, 2px); }
  80% { transform: translate(2px, -1px); }
}

/* ── FOOTER ────────────────────────────── */
footer { margin-top: auto; padding: 2rem 0 1rem; text-align: center; position: relative; z-index: 1; }
.footer-title { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1rem; letter-spacing: 0.12em; color: var(--accent); animation: footerPulse 3s ease-in-out infinite; }
.footer-num { display: inline-block; color: var(--cyan); animation: footerBounce 2s ease-in-out infinite; }
.footer-icon { display: inline-block; animation: footerZap 1.5s ease-in-out infinite; }
@keyframes footerPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes footerBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes footerZap { 0%, 100% { transform: rotate(0deg) scale(1); } 25% { transform: rotate(-12deg) scale(1.1); } 75% { transform: rotate(12deg) scale(1.1); } }

/* ── HUB NAV ──────────────────────────── */
.hub-nav { width: 100%; max-width: 640px; margin: 0 auto 0.5rem; position: relative; z-index: 1; }
.hub-back { display: inline-block; font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.75rem; color: var(--accent); text-decoration: none; padding: 0.4rem 0.8rem; border: 2px solid var(--border); border-radius: 4px; transition: all 0.15s; letter-spacing: 0.05em; }
.hub-back:hover { border-color: var(--accent); color: var(--accent2); background: rgba(255, 92, 211, 0.08); }

@media (max-width: 400px) {
  .hero-logo { width: 160px; height: 160px; }
  .card { padding: 1rem; }
  .btn-pixel { font-size: 0.7rem; padding: 0.55rem 0.75rem; }
  .btn-mega { font-size: 0.8rem; padding: 0.9rem 0.5rem; }
}
