html {
  height: 100%;
  background: #000 !important;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important; /* Pure black background */
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px) !important;
  background-size: 50px 50px !important;
  background-position: center center !important;
  font-family: 'VT323', monospace; /* Retro font */
  color: #fff !important; /* White text */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  cursor: url('cursor.cur'), auto;
  position: relative;
  perspective: 1000px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* CRT screen effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Add a green glow effect to the whole page */
.arcade-container {
  position: relative;
  z-index: 0;
  animation: textShadow 1.6s infinite;
}

/* TRON-like grid animation */
@keyframes gridMove {
  0% {
    background-position: 0px 0px, 0px 0px;
  }
  100% {
    background-position: 0px 50px, 50px 0px;
  }
}

/* Apply grid animation to body */
body {
  animation: turnOn 2s ease-in-out, gridMove 20s linear infinite;
}

/* Add neon grid pulsing */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06)),
              radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1), transparent 80%);
  z-index: 2;
  background-size: 100% 2px, 3px 100%, 100% 100%;
  pointer-events: none;
}

/* Custom cursor styles */
* {
  cursor: url('cursor.cur'), auto;
}

/* Cursor variants for different interactive elements */
button, a, .game-card {
  cursor: url('cursor.cur'), pointer;
}

.arcade-container {
  text-align: center;
  padding: 120px 40px 40px; /* Increased top padding for more space */
  max-width: 1200px;
  width: 100%;
  background: transparent !important; /* Ensure no background override */
  margin-top: 0; /* Removed margin-top to avoid pushdown */
  position: relative; /* Added for better positioning */
  z-index: 1; /* Below header z-index but above background */
}

.logo {
  width: 180px; /* Smaller logo size */
  height: auto;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 8px #00ff00);
  animation: logoGlow 3s infinite;
  display: block; /* Ensure block display */
  margin-left: auto; /* Center logo horizontally */
  margin-right: auto;
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 60%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 60%, transparent 85%);
}

/* Ensure logo container is properly sized */
.logo-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 20px;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 15px #00ffff) brightness(1.2);
}

@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 5px #00ff00); }
  50% { filter: drop-shadow(0 0 12px #00ffff); }
  100% { filter: drop-shadow(0 0 5px #00ff00); }
}

header h1 {
  font-size: 3em;
  margin: 0 0 10px;
  color: #00ff00; /* Neon green */
  text-shadow: 0 0 10px #00ff00;
}

.tagline {
  font-size: 1.2em;
  color: #fff;
  margin-bottom: 40px;
  text-shadow: 0 0 5px #00ff00;
  position: relative;
  z-index: 10;
}

.game-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  padding: 20px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: transparent;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.game-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
  cursor: pointer;
  width: 250px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 0;
}

.game-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ff00;
}

/* Retro Loading Bar Effect */
.game-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, 
    #00ff00, #00ffaa, #00ffff, #00ffaa, #00ff00);
  background-size: 200% 100%;
  animation: none;
  transition: width 0.3s ease;
  z-index: 10;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

.game-card:hover::before {
  width: 100%;
  animation: loadingBarGlow 1.5s linear infinite, loadingBarScan 0.5s steps(10) infinite;
}

@keyframes loadingBarGlow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

@keyframes loadingBarScan {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.image-container {
  height: 120px; /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.featured-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #00ff00;
  color: #000;
  padding: 5px 10px;
  font-size: 0.9em;
  border-radius: 5px;
  text-shadow: none;
}

.game-image {
  width: 100%;
  height: 120px; /* Reduced height */
  display: block;
  object-fit: cover;
  margin: 0 auto;
  transition: transform 0.3s;
  border-radius: 0;
}

.game-card h2 {
  color: #00ff00;
  margin: 10px;
  font-size: 1.4em;
  text-shadow: 0 0 10px #00ff00;
  text-align: center;
}

.game-card p {
  font-size: 1em;
  margin: 0 10px 20px;
  color: #ccc;
}

/* Force dark mode */
@media (prefers-color-scheme: light) {
  html, body {
    background: #000 !important;
  }
  .arcade-container {
    background: transparent !important;
  }
}

/* Moved from JavaScript file */
.launching {
  animation: launchEffect 0.5s ease-out;
}

@keyframes launchEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Game Loading Animation */
.game-loading-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 6px;
  width: 0%;
  background: linear-gradient(90deg, #00ff00, #00ffff, #00ff00);
  background-size: 200% 100%;
  z-index: 15;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
  animation: loadingBarPulse 0.5s linear infinite;
}

@keyframes loadingBarPulse {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.launching {
  position: relative;
  overflow: hidden;
}

.launching::after {
  content: "LOADING...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #00ff00;
  font-size: 20px;
  font-weight: bold;
  z-index: 20;
  text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
  animation: loadingTextBlink 0.5s steps(2) infinite;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 4px;
  letter-spacing: 2px;
}

@keyframes loadingTextBlink {
  0% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Music Controls Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(18, 18, 18, 0.95); /* Increased opacity for better visibility */
  border-bottom: 2px solid #00ff00;
  box-shadow: 0 5px 15px rgba(0, 255, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  animation: textShadow 1.6s infinite;
  flex-wrap: wrap;
  box-sizing: border-box; /* Ensure padding is included in width */
  max-height: 160px; /* Limit header height on mobile */
}

.top-music-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(26, 26, 26, 0.8);
  padding: 6px 10px;
  border-radius: 5px;
  border: 2px solid #00ff00;
  box-shadow: 0 0 10px #00ff00;
  flex-shrink: 0;
  margin-right: 25px;
}

.header-logo-container {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 30px;
  width: auto;
  margin-right: 10px;
}

.doge-price-container {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 15px;
  border-radius: 15px;
  border: 2px solid #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
  margin: 0 15px;
  height: 30px;
}

.doge-price-label {
  color: #ffd700;
  font-weight: bold;
  margin-right: 8px;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.9);
  font-size: 1.1em;
}

#doge-price {
  color: #ffffff;
  font-weight: bold;
  margin-right: 12px;
  font-size: 1.1em;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
}

.doge-price-change {
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 1em;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

.price-up {
  color: #00ff00;
  background: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.4);
}

.price-down {
  color: #ff3333;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.4);
}


@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
  }

  .header-logo-container {
    width: 100%;
    justify-content: center;
  }

  .dogecoin-container {
    width: 100%;
    justify-content: center;
    order: 3;
  }

  .top-music-controls {
    width: 95%;
    margin-right: 0;
    justify-content: center;
    order: 2;
    margin-bottom: 5px;
  }

  .arcade-container {
    padding-top: 230px; /* Increased padding to ensure content is below header */
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 80px;
    height: auto;
    overflow-y: auto;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    max-width: 100%;
  }

  .game-grid {
    flex-direction: column;
    align-items: center;
    padding-bottom: 50px;
    padding-top: 10px; /* Add small padding at top */
    height: auto;
    overflow-y: visible;
    width: 100%;
    gap: 20px;
    display: flex;
  }

  .game-card {
    width: 90%;
    max-width: 300px;
    margin-bottom: 20px;
    display: block;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .game-card h2 {
    font-size: 1.2em;
  }

  .game-card p {
    font-size: 0.9em;
  }

  body, html {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    width: 100%;
    max-width: 100%;
  }

  /* Ensure logo stays in visible area */
  .logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .logo {
    width: 100px;
    height: auto;
    margin-top: 10px;
  }

  .tagline {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 10px;
  }
}

/* Additional smaller screen adjustments */
@media (max-width: 480px) {
  .arcade-container {
    padding-top: 350px; /* Increased padding to ensure content is below header */
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0 auto; /* Center the container */
    box-sizing: border-box;
    left: 0;
    right: 0;
  }
  body {
    padding-top: 350px;
    width: 100vw;
    position: fixed;
    left: 0;
    right: 0;
    overflow-x: hidden;
    margin: 0; /* Remove any default margins */
  }

  html, body {
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow-x: hidden;
  }

  /* Specific adjustments for portrait orientation phones */
  @media (orientation: portrait) {
    .arcade-container {
      padding-top: 180px; /* Reduced padding to show more content */
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
      margin: 0 auto; /* Center the container */
      left: 0;
      right: 0;
      position: relative; /* Changed to relative for better scrolling */
    }
    body {
      padding-top: 180px; /* Reduced padding to match container */
      width: 100%;
      overflow-x: hidden;
      overflow-y: auto; /* Explicitly allow vertical scrolling */
      margin: 0; /* Remove any default margins */
      position: relative; /* Changed from fixed to allow scrolling */
      height: auto; /* Allow body to expand with content */
    }

    .logo-container {
      margin-top: 20px; /* Add space above the logo */
    }

    .tagline {
      margin-top: 15px; /* Add space above the tagline */
      margin-bottom: 30px; /* Reduce bottom margin slightly */
      padding: 0 15px; /* Add horizontal padding */
      display: block; /* Ensure block display */
      width: 100%; /* Full width */
      font-size: 1.1em; /* Slightly smaller font */
      line-height: 1.4; /* Better line height */
    }

    .site-header {
      width: 100%;
      max-width: 100%;
      left: 0;
      right: 0;
    }

    .game-grid {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
      padding-left: 0; /* Remove any left padding */
      padding-right: 0; /* Remove any right padding */
      margin: 0 auto; /* Center the grid */
      display: flex;
      flex-direction: column;
      align-items: center; /* Center align game cards */
    }
  }

  .game-card {
    width: 95%;
    margin-bottom: 15px; /* Add spacing between cards */
  }

  .site-header {
    padding: 5px;
  }

  .top-music-controls {
    width: 98%;
    gap: 2px;
  }

  #toggleMusic, #nextSong, #playMusicBtn {
    padding: 4px 8px;
    font-size: 12px;
  }

  #volumeSlider {
    width: 60px;
  }

  .header-logo {
    height: 25px;
  }

  .site-header h2 {
    font-size: 18px;
  }

  /* Ensure logo and tagline are visible */
  .logo {
    margin-top: 20px;
    width: 80px;
  }

  .tagline {
    margin-top: 10px;
    margin-bottom: 15px;
  }
}

.header-logo {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 0 5px #00ff00);
}

.site-header h2 {
  color: #00ff00;
  font-size: 22px;
  margin: 0;
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
  display: inline-block;
}

.dogecoin-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 250px;
  overflow: hidden;
  flex-shrink: 0;
}

.scrolling-dogecoin {
  display: inline-block;
  color: #ffd700;
  font-size: 22px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
  white-space: nowrap;
  animation: scrollingCoins 15s linear infinite;
}

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

.top-music-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(26, 26, 26, 0.8);
  padding: 6px 10px;
  border-radius: 5px;
  border: 2px solid #00ff00;
  box-shadow: 0 0 10px #00ff00;
  flex-shrink: 0;
}

#musicVisualizer {
  margin-right: 3px;
  border-radius: 2px;
  background-color: #222;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

#toggleMusic,
#nextSong,
#shhhButton,
#playMusicBtn {
  padding: 6px 12px;
  background-color: #222;
  border: 1px solid #00ff00;
  color: #00ff00;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'VT323', monospace;
  font-size: 14px;
  transition: background-color 0.3s, transform 0.1s;
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#playMusicBtn {
  background-color: #1a1a1a;
  border: 1px solid #00ffff;
  color: #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
  50% { box-shadow: 0 0 12px rgba(0, 255, 255, 0.8); }
  100% { box-shadow: 0 0 5px rgba(0, 255, 255, 0.5); }
}

#toggleMusic::after,
#nextSong::after,
#shhhButton::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 75%);
  pointer-events: none;
}

#toggleMusic:hover,
#nextSong:hover,
#shhhButton:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

#shhhButton:hover {
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
}

#volumeSlider {
  width: 80px;
  height: 20px;
  background-color: #222;
  border: 1px solid #00ff00;
  border-radius: 4px;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#volumeSlider:hover {
  opacity: 1;
}

#volumeSlider::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  background-color: #00ff00;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
}

#volumeSlider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background-color: #00ff00;
  border-radius: 50%;
  cursor: pointer;
}

/* Footer styles removed */

/* CRT screen on effect */
@keyframes turnOn {
  0% {
    transform: scale(0.8, 0.1);
    opacity: 0;
  }
  5% {
    transform: scale(1, 0.03);
    opacity: 0.3;
  }
  10% {
    transform: scale(1, 0.06);
    opacity: 0.6;
  }
  15% {
    transform: scale(1, 0.1);
    opacity: 0.8;
  }
  30% {
    transform: scale(1.05, 1.1);
    opacity: 0.8;
  }
  40% {
    transform: scale(1, 1);
    opacity: 1;
  }
  70% {
    transform: scale(1, 1);
    opacity: 1;
  }
  100% {
    transform: scale(1, 1);
    opacity: 1;
  }
}

/* Apply the animation to the entire body content */
body {
  animation: turnOn 2s ease-in-out;
}

/* Floating Dogecoins */
.dogecoin {
  position: absolute;
  width: 30px;
  height: 30px;
  background-image: url('logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: -1;
  animation: float-coin 12s ease-out forwards;
  opacity: 0.35;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 0, 0.25);
  box-shadow: 0 0 5px rgba(0, 255, 0, 0.15);
}

@media (max-width: 768px) {
  /* Reduce coin count and effects on mobile */
  .dogecoin {
    opacity: 0.2;
  }
}

@keyframes float-coin {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.35;
  }
  80% {
    opacity: 0.3;
    transform: translateY(-80vh) rotate(270deg);
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Add variety to coin animations */
.dogecoin:nth-child(2n) {
  animation-duration: 15s;
}

.dogecoin:nth-child(3n) {
  animation-duration: 18s;
  animation-delay: 3s;
}

.dogecoin:nth-child(4n) {
  width: 25px;
  height: 25px;
}

.dogecoin:nth-child(5n) {
  width: 40px;
  height: 40px;
}

/* CRT screen flicker and distortion animations */
@keyframes textShadow {
  0% {
    textshadow: 0.4389924193300864px 0 1px rgba(0,30,255,0.5), -0.4389924193300864px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  5% {
    text-shadow: 2.7928974010788217px 0 1px rgba(0,30,255,0.5), -2.7928974010788217px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  10% {
    text-shadow: 0.02956275843481219px 0 1px rgba(0,30,255,0.5), -0.02956275843481219px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  15% {
    text-shadow: 0.40218538552878136px 0 1px rgba(0,30,255,0.5), -0.40218538552878136px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  20% {
    text-shadow: 3.4794037899852017px 0 1px rgba(0,30,255,0.5), -3.4794037899852017px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  25% {
    text-shadow: 1.6125630401149584px 0 1px rgba(0,30,255,0.5), -1.6125630401149584px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  30% {
    text-shadow: 0.7015590085143956px 0 1px rgba(0,30,255,0.5), -0.7015590085143956px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  35% {
    text-shadow: 3.896914047650351px 0 1px rgba(0,30,255,0.5), -3.896914047650351px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  40% {
    text-shadow: 3.870905614848819px 0 1px rgba(0,30,255,0.5), -3.870905614848819px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  45% {
    text-shadow: 2.231056963361899px 0 1px rgba(0,30,255,0.5), -2.231056963361899px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  50% {
    text-shadow: 0.08084290417898504px 0 1px rgba(0,30,255,0.5), -0.08084290417898504px 0 1px rgba(255,0,80,3), 0 0 3px;
  }
  55% {
    text-shadow: 2.3758461067427543px 0 1px rgba(0,30,255,0.5), -2.37758461067427543px 0 1px rgba(0,30,255,0.5), -2.3758461067427543px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  60% {
    text-shadow: 2.202193051050636px 0 1px rgba(0,30,255,0.5), -2.202193051050636px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  65% {
    text-shadow: 2.8638780614874975px 0 1px rgba(0,30,255,0.5), -2.8638780614874975px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  70% {
    text-shadow: 0.48874025155497314px 0 1px rgba(0,30,255,0.5), -0.48874025155497314px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  75% {
    text-shadow: 1.8948491305757957px 0 1px rgba(0,30,255,0.5), -1.8948491305757957px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  80% {
    text-shadow: 0.0833037308038857px 0 1px rgba(0,30,255,0.5), -0.0833037308038857px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  85% {
    text-shadow: 0.09769827255241735px 0 1px rgba(0,30,255,0.5), -0.09769827255241735px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  90% {
    text-shadow: 3.443339761481782px 0 1px rgba(0,30,255,0.5), -3.443339761481782px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  95% {
    text-shadow: 2.1841838852799786px 0 1px rgba(0,30,255,0.5), -2.1841838852799786px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  100% {
    text-shadow: 2.6208764473832513px 0 1px rgba(0,30,255,0.5), -2.6208764473832513px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
}

/* Improve the CRT effect for game cards */
.game-card {
  position: relative;
}

.game-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 480px) {
  .image-container, .game-image {
    height: 100px; /* Even smaller for mobile */
  }
}

@media (max-width: 850px) {
  #gameCanvas {
    width: 95%;
    height: auto;
    max-height: 65vh;
  }

  .header {
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
  }

  .header h1 {
    font-size: 14px; /* Reduced from 16px */
  }

  .music-controls {
    width: 100%;
    justify-content: center;
    gap: 5px;
  }

  /* Add padding to body to prevent content from hiding under the fixed header */
  body {
    padding-top: 120px;
  }

  /* Specific adjustments for portrait orientation */
  @media (orientation: portrait) {
    body {
      padding-top: 150px; /* More padding for portrait mode */
    }
  }
}