/* ===== BASE STYLES ===== */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Arial', sans-serif;
  background-color: #111;
  color: #000000; /* <-- fixed color contrast */
  position: relative;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== RGB BACKGROUND ===== */
#rgbBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: transparent;
}

/* ===== WEATHER EFFECTS ===== */
/* Shared Container Styles */
#weather-effects,
#carrot-container,
#carrot-layer,
#cloud-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Layer Z-Indexing */
#weather-effects {
  z-index: 20;
}
#cloud-layer {
  z-index: 20;
}
#carrot-container,
#carrot-layer {
  z-index: 99999;
}

/* Base Effect Layer Styles */
.rain-layer,
.snow-layer,
.wind-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;             /* Ensures full screen coverage */
  height: 100vh;
  background-color: transparent;
  background-repeat: repeat;
  background-size: contain;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 9999;            /* Ensures above other content */
}

/* Rain Effect */
.rain-layer {
  background-image: url('/BTC-Weather-Radar/assets/effects/rain.png');
  animation: rainFall 0.8s linear infinite;
}

/* Snow Effect */
.snow-layer {
  background-image: url('/BTC-Weather-Radar/assets/effects/snow.png');
  animation: snowFall 3s linear infinite;
}

/* Wind Effect */
.wind-layer {
  background-image: url('/BTC-Weather-Radar/assets/effects/wind.png');
  animation: windBlow 5s linear infinite;
}

/* Rain Animation */
@keyframes rainFall {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}

/* Snow Animation */
@keyframes snowFall {
  0%   { background-position: 0 -100vh; }
  100% { background-position: 0 100vh; }
}

/* Wind Animation */
@keyframes windBlow {
  0%   { background-position: -100vw 0; }
  100% { background-position: 100vw 0; }
}

/* Wiggle Effect for Wind Gusts */
.wind-wiggle {
  animation: wiggle 1.5s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(5deg); }
  50%      { transform: rotate(-5deg); }
  75%      { transform: rotate(5deg); }
}


/* ===== MAIN APP CONTAINER ===== */
#shell {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  padding: 20px;
  padding-bottom: 25vh;
  background: linear-gradient(rgba(255,255,255,0.15), rgba(255,255,255,0.15)) padding-box,
              linear-gradient(270deg, red, orange, yellow, green, blue, indigo, violet, red) border-box;
  background-size: 400% 400%;
  backdrop-filter: blur(20px) saturate(180%);
  border: 6px solid transparent;
  border-radius: 12px;
  animation: animateBorder 40s linear infinite, pulse 8s ease-in-out infinite;
  z-index: 10;
  box-sizing: border-box;
  color: #111; /* make sure you can read text */
}


@keyframes animateBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 10px red; }
  25%  { box-shadow: 0 0 10px orange; }
  50%  { box-shadow: 0 0 10px lime; }
  75%  { box-shadow: 0 0 10px blue; }
  100% { box-shadow: 0 0 10px red; }
}

/* ===== CLOUDS ===== */
.cloud {
  position: absolute;
  width: 200px;
  height: 120px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  border-radius: 50%;
  opacity: 0.4;
  top: 10%;
  left: -200px;
  animation: cloudFloat 60s linear infinite;
  filter: blur(2px);
  z-index: 1;
}

.cloud:nth-child(2) {
  width: 150px;
  height: 90px;
  top: 30%;
  animation-duration: 80s;
}

.cloud:nth-child(3) {
  width: 250px;
  height: 140px;
  top: 50%;
  animation-duration: 100s;
}

.cloud:nth-child(4) {
  width: 180px;
  height: 100px;
  top: 70%;
  animation-duration: 90s;
}

@keyframes cloudFloat {
  0% { transform: translateX(-300px); }
  100% { transform: translateX(120vw); }
}

/* ===== RADAR CONTAINER ===== */
#radar-container {
  position: relative;
  display: flex;         /* <-- ADD THIS */
  flex-direction: column; /* <-- ADD THIS */
  width: 100%;
  min-height: 400px;
  background: rgba(0,0,0,0.6);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.7);
  z-index: 500;
  margin: 20px 0;
}

#radar-map {
  flex: 1 1 auto;  /* Grow nicely but not force height */
  min-height: 300px; /* Set minimum so radar loads properly */
  width: 100%;
  touch-action: pan-x pan-y;
}

/* ===== RADAR CONTROLS ===== */
#radar-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 2px solid rgba(255,255,255,0.2);
  z-index: 60000;
  margin-top: 10px;
}

#radar-controls button {
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  color: white;
  font-size: 1rem;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  transition: background 0.3s, transform 0.2s;
}

#radar-controls button:hover {
  background: linear-gradient(90deg, #4a00e0, #8e2de2);
  transform: scale(1.05);
}

/* ===== STOCKS CONTAINER ===== */
#stocks-container {
  position: relative;
  min-height: 200px;
  width: 100%;
  background: rgba(0,0,0,0.6);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  z-index: 5000;
}
#stocks-container {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 580px;
  height: 440px;
  z-index: 5000;
}

#stocks-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== TOP BAR & NEWS BUTTON ===== */
#top-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 20px 0 20px;
  box-sizing: border-box;
  z-index: 200;
}

#news-toggle {
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  color: white;
  font-size: 1rem;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

#news-toggle:hover {
  background: linear-gradient(90deg, #4a00e0, #8e2de2);
  transform: scale(1.05);
}

/* ===== COMPANION STAGE ===== */
.companion-stage {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25vh;
  z-index: 50;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 2rem;
}

/* ===== FOX COMPANION ===== */
#animal-companion {
    position: absolute;
    bottom: 350px;
    left: 0;
    cursor: pointer;
    animation: roam 20s linear infinite alternate;
    transform-origin: center;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}

.animal-body {
    width: 100px;
    height: 70px;
    background-color: #ff6b35;
    border-radius: 50% 50% 40% 40% / 60% 60% 30% 30%;
    position: relative;
    animation: walk 0.8s ease-in-out infinite, float 4s ease-in-out infinite;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    overflow: visible;
}

.animal-face {
    position: absolute;
    width: 40px;
    height: 30px;
    background-color: #f7c59f;
    border-radius: 50%;
    top: 15px;
    left: 20px;
}

.animal-face::before,
.animal-face::after {
    content: '';
    position: absolute;
    background-color: #333;
    border-radius: 50%;
    width: 6px;
    height: 6px;
    top: 10px;
    animation: blink 3s infinite;
}

.animal-face::before { left: 8px; }
.animal-face::after { right: 8px; }

.animal-legs {
    position: absolute;
    bottom: -5px;
    width: 100%;
    height: 10px;
}

.animal-leg {
    position: absolute;
    width: 8px;
    height: 15px;
    background-color: #e05a2b;
    border-radius: 5px;
    animation: legMove 0.5s infinite;
}

.animal-leg:nth-child(1) { left: 15px; }
.animal-leg:nth-child(2) { left: 25px; animation-delay: 0.25s; }
.animal-leg:nth-child(3) { right: 25px; }
.animal-leg:nth-child(4) { right: 15px; animation-delay: 0.25s; }

@keyframes legMove {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(10deg); }
}

@keyframes fox-dash {
    0% { transform: translateX(0) scaleX(1); }
    20% { transform: translateX(20vw) scaleX(1) translateY(-20px); }
    50% { transform: translateX(70vw) scaleX(-1) translateY(0); }
    70% { transform: translateX(40vw) scaleX(-1) translateY(10px); }
    100% { transform: translateX(100vw) scaleX(1) translateY(0); }
}

.animal-tail {
    position: absolute;
    width: 40px;
    height: 25px;
    background-color: #e05a2b;
    border-radius: 50%;
    right: -20px;
    top: 15px;
    transform-origin: left center;
    animation: wag 3s ease-in-out infinite;
}

.animal-ear {
    position: absolute;
    width: 20px;
    height: 25px;
    background-color: #ff6b35;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: -10px;
}

.left-ear { left: 15px; transform: rotate(-15deg); }
.right-ear { right: 15px; transform: rotate(15deg); }

.animal-nose {
    position: absolute;
    width: 8px;
    height: 6px;
    background-color: #333;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.animal-message {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    width: 150px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 31;
}

#animal-companion:hover .animal-message {
    opacity: 1;
}

.animal-hearts {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    animation: float-hearts 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    z-index: 31;
}

#animal-companion:hover .animal-hearts {
    opacity: 1;
}

/* ===== BUNNY COMPANION ===== */
#bunny-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 200px;
  pointer-events: none;
  z-index: 1500;
}

.fox-dash {
  animation: fox-dash 3s ease-in-out forwards;
}

#bunny-companion {
  position: fixed;
  top: 80vh; /* Adjust as needed, try 40vh or 45vh for higher */
  left: 0;
  animation: bunny-roam 18s linear infinite alternate;
  transform-origin: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  pointer-events: auto;
  z-index: 2000; /* Ensure it's in front of radar */
}


.bunny-body {
  width: 80px;
  height: 100px;
  background-color: #f0f0f0;
  border-radius: 50% 50% 40% 40% / 60% 60% 30% 30%;
  position: relative;
  animation: bunny-hop 0.8s ease-in-out infinite, bunny-float 4s ease-in-out infinite;
}

.bunny-ears {
  position: absolute;
  width: 100%;
  height: 60px;
  top: -40px;
}

.bunny-ear {
  width: 20px;
  height: 50px;
  background-color: #f0f0f0;
  border-radius: 50%;
  position: absolute;
  transform-origin: bottom center;
}

.bunny-ear.left {
  left: 15px;
  animation: ear-twitch-left 3s ease-in-out infinite;
}

.bunny-ear.right {
  right: 15px;
  animation: ear-twitch-right 3s ease-in-out infinite;
}

.bunny-face {
  position: absolute;
  width: 50px;
  height: 40px;
  background-color: #fff;
  border-radius: 40%;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.bunny-eyes {
  display: flex;
  justify-content: space-around;
  position: absolute;
  top: 10px;
  width: 100%;
}

.bunny-eye {
    width: 12px;
    height: 12px;
    background: #6b4f40;
    border-radius: 50%;
    position: relative;
    animation: blink 4s infinite, eye-follow 15s infinite linear;
}

@keyframes blink {
    0%, 90%, 100% { height: 12px; }
    92%, 98% { height: 2px; }
}

.bunny-nose {
  position: absolute;
  width: 8px;
  height: 6px;
  background-color: #ff9999;
  border-radius: 40%;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
}

.bunny-message, .bunny-carrot {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

#bunny-companion:hover .bunny-message,
#bunny-companion:hover .bunny-carrot {
  opacity: 1;
}

/* ===== DOG COMPANION ===== */
#dog-container {
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 70px;
  height: 80px;
  pointer-events: none;
  z-index: 1500;
}

#dog-companion {
  position: fixed; /* Changed from absolute */
  top: 85vh;        /* Adjust as needed: lower value = higher on screen */
  left: 0;
  animation: dog-roam 24s linear infinite alternate;
  transform-origin: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  pointer-events: auto;
  z-index: 2000; /* Ensure it renders above radar */
}

.dog-body {
  width: 60px;
  height: 60px;
  background-color: #555;
  border-radius: 50%;
  position: relative;
  animation: dog-bounce 2s ease-in-out infinite;
}

.dog-face {
  position: absolute;
  width: 40px;
  height: 30px;
  background: #ccc;
  border-radius: 50%;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
}

.dog-ears {
  position: absolute;
  width: 100%;
  height: 20px;
  top: -10px;
}

.dog-ear {
  width: 14px;
  height: 20px;
  background: #222;
  border-radius: 50%;
  position: absolute;
}

.dog-ear.left { left: 5px; transform: rotate(-20deg); }
.dog-ear.right { right: 5px; transform: rotate(20deg); }

.dog-eyes {
  position: absolute;
  width: 100%;
  top: 8px;
  display: flex;
  justify-content: space-around;
}

.dog-eye {
  width: 6px;
  height: 6px;
  background: #000;
  border-radius: 50%;
}

.dog-nose {
  position: absolute;
  width: 6px;
  height: 4px;
  background: #000;
  border-radius: 50%;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.dog-message {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 5px 8px;
  border-radius: 10px;
  opacity: 0;
  transition: all 0.3s ease;
}

#dog-companion:hover .dog-message {
  opacity: 1;
}

#animal-companion {
  animation: roam 20s linear infinite alternate;
}

#bunny-companion {
  animation: bunny-roam 18s linear infinite alternate;
}

#dog-companion {
  animation: dog-roam 24s linear infinite alternate;
}

@keyframes roam {
  0% { left: 0; }
  100% { left: 80vw; }
}

@keyframes bunny-roam {
  0% { left: 0; }
  100% { left: 70vw; }
}

@keyframes dog-roam {
  0% { left: 25%; }
  100% { left: 65vw; }
}


/* ===== EMERGENCY ALERT SYSTEM ===== */
#emergency-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 0, 0, 0.6);
  z-index: 9998;
  display: none;
  animation: flashRed 1s infinite alternate;
  pointer-events: none;
}

#emergency-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  background: white;
  color: red;
  font-size: 2rem;
  font-weight: bold;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px red;
  z-index: 9999;
  text-align: center;
  overflow: hidden; /* Important */
  pointer-events: auto;
  display: none;
}

#emergency-intro {
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}

#emergency-scrollbox {
  max-height: 150px; /* limit height of scrollbox */
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 1.5rem;
  line-height: 1.5;
  padding-right: 10px;
  text-align: left;
}

/* Optional: nicer scrollbars */
#emergency-scrollbox::-webkit-scrollbar {
  width: 8px;
}
#emergency-scrollbox::-webkit-scrollbar-thumb {
  background: red;
  border-radius: 10px;
}
#emergency-scrollbox::-webkit-scrollbar-track {
  background: #ffe5e5;
}

/* STOP button */
#stop-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 20px;
  font-size: 1.5rem;
  background: white;
  color: red;
  border: 2px solid red;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10000;
  display: none;
}

/* Background flash animation */
@keyframes flashRed {
  0% { background: rgba(255, 0, 0, 0.6); }
  50% { background: rgba(255, 0, 0, 0.3); }
  100% { background: rgba(255, 0, 0, 0.6); }
}


/* ===== NEWS TICKER ===== */
#news-ticker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  overflow: hidden;
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  color: white;
  font-size: 1.2rem;
  line-height: 30px;
  white-space: nowrap;
  z-index: 9999;
  display: none;
}

#news-items {
  display: inline-block;
  padding-left: 100%;
  animation: scrollNews 120s linear infinite;
}

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

/* ===== WEATHER EFFECTS LAYERS ===== */
#weather-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  pointer-events: none;
}

.raindrop {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 15px;
  background: #8ecae6;
  opacity: 0.7;
  animation-name: raindropFall;
  animation-timing-function: linear;
}

@keyframes raindropFall {
  0% { transform: translateY(0); }
  100% { transform: translateY(110vh); }
}

.snowflake {
  position: absolute;
  top: -20px;
  animation-name: snowflakeFall;
  animation-timing-function: linear;
}

@keyframes snowflakeFall {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(110vh) translateX(30px); }
}

.debris {
  position: absolute;
  top: -30px;
  animation-name: debrisDrift;
  animation-timing-function: linear;
}

@keyframes debrisDrift {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(120vh) translateX(-80px); }
}

/* ===== LIGHTNING EFFECT ===== */
.lightning-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 9999;
  animation: lightningFlash 0.5s ease-in-out;
}

/* Lightning Flash */
@keyframes lightningFlash {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== FIREWORKS ===== */
.firework {
  position: fixed;
  width: 10px;
  height: 10px;
  background: yellow;
  border-radius: 50%;
  animation: explode 1s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes explode {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  100% { transform: scale(5) translate(100px, -100px); opacity: 0; }
}


/* ===== FINAL TOUCH: GENERAL ===== */
img {
  max-width: 100%;
  height: auto;
}

button {
  min-width: 44px;
  min-height: 44px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.carrot-mode #carrot-container::before {
  content: "🥕 Carrots incoming!";
  position: absolute;
  top: 50px;
  left: 20px;
  color: orange;
  font-size: 2rem;
}

@keyframes legMove {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(10deg); }
}

@keyframes fox-dash {
  0% { transform: translateX(0) scaleX(1); }
  20% { transform: translateX(20vw) scaleX(1) translateY(-20px); }
  50% { transform: translateX(70vw) scaleX(-1) translateY(0); }
  70% { transform: translateX(40vw) scaleX(-1) translateY(10px); }
  100% { transform: translateX(100vw) scaleX(1) translateY(0); }
}

#time-data {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  margin: 20px 0;
  color: white;
  font-family: 'Arial', sans-serif;
  max-width: 100%;
}

#time {
  font-size: 3rem;
  font-weight: bold;
  margin: 10px 0;
}

#date {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

#currentTemp, #btcprice, #stockData, #weatherAlerts {
  font-size: 1.5rem;
  margin: 5px 0;
  word-break: break-word;
  max-width: 90%;
}



#five-day-forecast {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.forecast-day {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 1rem;
  width: 90px;
  text-align: center;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.forecast-icon {
  font-size: 2rem;
  margin-bottom: 5px;
}

.forecast-text {
  font-size: 1rem;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  #time {
    font-size: 2.5rem;
  }
  #date {
    font-size: 1.3rem;
  }
  #currentTemp, #btcprice, #stockData, #weatherAlerts {
    font-size: 1rem;
  }
  .forecast-day {
    width: 70px;
    padding: 8px;
  }
  .forecast-icon {
    font-size: 1.6rem;
  }
  .forecast-text {
    font-size: 0.9rem;
  }
}
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px;
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#debug-toggle {
  position: fixed;
  bottom: 100px; /* 🆙 raised above companions and edge */
  right: 20px;
  background: #111; /* slightly darker terminal vibe */
  color: lime;
  padding: 10px 14px;
  border: 2px solid lime;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 0 8px lime;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#debug-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px lime;
}


#tetris-wrapper {
  position: fixed;
  top: 45px;
  left: 20px;
  width: 240px;
  z-index: 9999;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
}

@keyframes rgbPulse {
  0%   { box-shadow: 0 0 10px red; border-color: red; }
  25%  { box-shadow: 0 0 10px orange; border-color: orange; }
  50%  { box-shadow: 0 0 10px lime; border-color: lime; }
  75%  { box-shadow: 0 0 10px cyan; border-color: cyan; }
  100% { box-shadow: 0 0 10px magenta; border-color: magenta; }
}

#tetris-wrapper {
  border: 3px solid red; /* Starting color, will animate */
  animation: rgbPulse 3s linear infinite;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.9);
  padding: 12px;
  box-shadow: 0 0 10px red;
  outline: none; /* Kill the old lime debug border */
}

#tetris-wrapper {
  display: none;
}

#tetris-wrapper.tetris-active {
  display: block;
}

#scoreboard {
  color: #00ffcc !important;
  background: rgba(0,0,0,0.6) !important;
  border: 2px solid #00ffcc !important;
  text-shadow: 2px 2px 4px black !important;
}

#wolf3d-gun-toggle.animate-fire {
  animation: recoil 0.3s ease;
}

@keyframes recoil {
  0% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  50% { transform: rotate(0); }
}

#wolf3d-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 1000px;
  height: 384px;
  background: black;
  z-index: 99999;
  border: 4px solid red;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
  overflow: hidden;

  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#wolf3d-wrapper.active {
  visibility: visible;
  opacity: 1;
}

#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  pointer-events: none;
  display: none; /* Start hidden */
  background: rgba(0, 0, 0, 0.9);
}







