/* ===========================================
   CHAOS.CSS - GeoCities / Hypnospace Vibes
   Clean version - elements at TOP like old web
   =========================================== */

/* ===== CUSTOM PIXEL CURSORS ===== */
/* PC-98 style cursors */
body.chaos-enabled {
  cursor: url('/assets/cursors/arrow.svg') 0 0, auto;
}

body.chaos-enabled a,
body.chaos-enabled button,
body.chaos-enabled .menu-item,
body.chaos-enabled [onclick] {
  cursor: url('/assets/cursors/pointer.svg') 5 0, pointer;
}

/* ===== MARQUEE - TOP of screen ===== */
.chaos-marquee-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  background: #0a0a14;
  border-bottom: 2px solid #3a3a5a;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.chaos-marquee {
  display: flex;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}

.chaos-marquee span {
  padding: 0 30px;
  font-family: "MS Gothic", monospace;
  font-size: 11px;
  color: #8888aa;
}

.chaos-marquee .separator {
  color: #4a4a6a;
  padding: 0 15px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== HIT COUNTER - Bottom left corner ===== */
.hit-counter-container {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 999;
  text-align: left;
  pointer-events: none;
  opacity: 0.7;
}

.hit-counter-container:hover {
  opacity: 1;
}

.hit-counter-label {
  font-family: "MS Gothic", monospace;
  font-size: 8px;
  color: #6a6a8a;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.hit-counter {
  display: inline-flex;
  background: #000;
  border: 1px solid #2a2a4a;
  padding: 1px;
}

.hit-digit {
  width: 10px;
  height: 14px;
  background: #001100;
  color: #00cc00;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #002200;
}

/* ===== 88x31 BADGES - Bottom right corner ===== */
.badges-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: row;
  gap: 3px;
  z-index: 998;
  pointer-events: auto;
  opacity: 0.7;
}

.badges-container:hover {
  opacity: 1;
}

img.retro-badge {
  width: 88px;
  height: 31px;
  image-rendering: pixelated;
  border: none;
  display: block;
}

/* ===== TOGGLE BUTTON - Bottom center ===== */
.chaos-toggle {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: transparent;
  border: 1px solid #3a3a5a;
  color: #5a5a7a;
  padding: 2px 6px;
  font-family: "MS Gothic", monospace;
  font-size: 9px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.chaos-toggle:hover {
  opacity: 1;
  color: #8a8aaa;
  border-color: #5a5a7a;
}

/* ===== SECRET OVERLAY ===== */
.secret-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secret-content {
  text-align: center;
  font-family: "MS Gothic", monospace;
  color: #00cccc;
  padding: 40px;
  border: 2px solid #00cccc;
  background: #0a0a1a;
}

.secret-content h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #00ffff;
}

.secret-content p {
  margin: 10px 0;
  font-size: 14px;
}

.secret-content .zone-hint {
  color: #ff00ff;
  margin-top: 20px;
}

.secret-content button {
  margin-top: 30px;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #00cccc;
  color: #00cccc;
  font-family: "MS Gothic", monospace;
  cursor: pointer;
}

.secret-content button:hover {
  background: #00cccc;
  color: #000;
}

/* ===== BLINK / NEW BADGE ===== */
.new-badge {
  display: inline-block;
  background: #cc0000;
  color: #ffff00;
  font-size: 8px;
  font-weight: bold;
  padding: 1px 4px;
  margin-left: 8px;
  font-family: "MS Gothic", monospace;
  animation: badgePulse 1s steps(2) infinite;
}

@keyframes badgePulse {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.6; }
}

/* ===== GLITCH EFFECTS ===== */
.haunted-glitch {
  animation: hauntedGlitch 0.1s steps(2) infinite;
}

@keyframes hauntedGlitch {
  0% { transform: translate(0); filter: none; }
  25% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
  50% { transform: translate(2px, -1px); filter: hue-rotate(180deg); }
  75% { transform: translate(-1px, -1px); filter: hue-rotate(270deg); }
  100% { transform: translate(0); filter: none; }
}

.screen-invert {
  filter: invert(1) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .badges-container {
    display: none;
  }

  .hit-counter-container {
    bottom: 8px;
    left: 8px;
    transform: scale(0.85);
    transform-origin: bottom left;
  }

  .chaos-marquee-container {
    height: 20px;
  }

  .chaos-marquee span {
    font-size: 10px;
    padding: 0 20px;
  }

  .chaos-toggle {
    bottom: 8px;
    font-size: 8px;
  }
}

/* ===== CHAOS DISABLED STATE ===== */
body.chaos-disabled .chaos-marquee-container,
body.chaos-disabled .badges-container,
body.chaos-disabled .hit-counter-container {
  display: none !important;
}

/* Remove the emoji cursors, keep default for disabled */
body.chaos-disabled {
  cursor: auto;
}
