@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600;700&display=swap');

body {
  font-family: 'Rajdhani', 'Arial Black', 'Helvetica', sans-serif;
  text-align: center;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  color: #fff;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
  /* Enable hardware acceleration for smoother performance */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* EPIC BACKGROUND SYSTEM */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 40% 80%, rgba(119, 198, 255, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 60% 30%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(0, 255, 127, 0.3) 0%, transparent 50%);
  animation: backgroundShift 15s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -3;
  /* Hardware acceleration */
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* STARFIELD BACKGROUND */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.9), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: starfield 200s linear infinite;
  z-index: -2;
  /* Hardware acceleration */
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* FLOATING GEOMETRIC SHAPES */
.floating-shape {
  position: fixed;
  pointer-events: none;
  opacity: 0.1;
  animation: floatShape 20s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.floating-shape:nth-child(1) {
  top: 10%;
  left: 10%;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  animation-delay: 0s;
}

.floating-shape:nth-child(2) {
  top: 30%;
  right: 20%;
  width: 30px;
  height: 30px;
  background: linear-gradient(45deg, #feca57, #ff9ff3);
  transform: rotate(45deg);
  animation-delay: 5s;
}

.floating-shape:nth-child(3) {
  bottom: 20%;
  left: 30%;
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #48dbfb, #0abde3);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: 10s;
}

/* MATRIX RAIN EFFECT */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.matrix-drop {
  position: absolute;
  color: #00ff41;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  opacity: 0.3;
  animation: matrixFall 3s linear infinite;
}

/* NEBULA CLOUDS */
.nebula-cloud {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: nebulaDrift 30s ease-in-out infinite;
  z-index: -2;
}

.nebula-cloud:nth-child(1) {
  top: 20%;
  left: 10%;
  width: 300px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
  animation-delay: 0s;
}

.nebula-cloud:nth-child(2) {
  top: 60%;
  right: 15%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
  animation-delay: 10s;
}

.nebula-cloud:nth-child(3) {
  bottom: 10%;
  left: 40%;
  width: 200px;
  height: 300px;
  background: radial-gradient(circle, rgba(254, 202, 87, 0.3) 0%, transparent 70%);
  animation-delay: 20s;
}

@keyframes backgroundShift {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1) rotate(0deg);
  }
  33% { 
    opacity: 0.8; 
    transform: scale(1.1) rotate(120deg);
  }
  66% { 
    opacity: 0.9; 
    transform: scale(0.9) rotate(240deg);
  }
}

@keyframes starfield {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-100px) translateX(-50px); }
}

@keyframes floatShape {
  0% { 
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.1;
  }
  25% { 
    transform: translateY(-20px) rotate(90deg) scale(1.2);
    opacity: 0.2;
  }
  50% { 
    transform: translateY(0) rotate(180deg) scale(1);
    opacity: 0.1;
  }
  75% { 
    transform: translateY(-15px) rotate(270deg) scale(0.8);
    opacity: 0.15;
  }
  100% { 
    transform: translateY(0) rotate(360deg) scale(1);
    opacity: 0.1;
  }
}

@keyframes matrixFall {
  0% { 
    transform: translateY(-100vh);
    opacity: 1;
  }
  100% { 
    transform: translateY(100vh);
    opacity: 0;
  }
}

@keyframes nebulaDrift {
  0%, 100% { 
    transform: translateX(0) translateY(0) scale(1);
    opacity: 0.3;
  }
  25% { 
    transform: translateX(50px) translateY(-30px) scale(1.1);
    opacity: 0.4;
  }
  50% { 
    transform: translateX(-30px) translateY(50px) scale(0.9);
    opacity: 0.2;
  }
  75% { 
    transform: translateX(-50px) translateY(-20px) scale(1.05);
    opacity: 0.35;
  }
}

/* EPIC UI ENHANCEMENTS */
#main-title {
  font-family: 'Orbitron', 'Impact', 'Arial Black', monospace;
  font-weight: 900;
  font-size: 4rem;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff6b6b);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: epicGradientShift 4s ease-in-out infinite;
  text-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
  position: relative;
  /* Enhanced glow effect */
  filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.4)) 
          drop-shadow(0 0 30px rgba(78, 205, 196, 0.3));
}

#main-title::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -20px;
  right: -20px;
  bottom: -10px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
  background-size: 400% 400%;
  animation: epicGradientShift 4s ease-in-out infinite;
  z-index: -1;
  border-radius: 20px;
  filter: blur(20px);
  opacity: 0.4;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

#subtitle {
  font-size: 1.5rem;
  color: #a0a0a0;
  margin-bottom: 40px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  animation: subtitleGlow 3s ease-in-out infinite alternate;
  /* Enhanced visual appeal */
  filter: drop-shadow(0 0 10px rgba(160, 160, 160, 0.3));
}

.controls-panel {
  background: rgba(0, 0, 0, 0.6);
  /* Fallback for browsers that don't support backdrop-filter */
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); /* Safari support */
  border: 2px solid rgba(78, 205, 196, 0.4);
  border-radius: 25px;
  padding: 30px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(78, 205, 196, 0.2);
  /* Hardware acceleration */
  will-change: transform, box-shadow;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* Modern browsers with backdrop-filter support */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .controls-panel {
    background: rgba(0, 0, 0, 0.6);
  }
}

.epic-button {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #feca57);
  background-size: 200% 200%;
  border: none;
  border-radius: 20px;
  padding: 15px 30px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin: 10px 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  animation: buttonGradient 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  /* Hardware acceleration */
  will-change: transform, box-shadow, background-position;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.epic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.6, 1);
  /* Hardware acceleration */
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.epic-button:hover::before {
  left: 100%;
}

.epic-button:hover {
  -webkit-transform: translate3d(0, -5px, 0) scale3d(1.05, 1.05, 1);
  transform: translate3d(0, -5px, 0) scale3d(1.05, 1.05, 1);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6), 
              0 0 20px rgba(255, 107, 107, 0.4);
  background-position: 100% 100%;
  /* Enhanced glow effect */
  filter: brightness(1.1) saturate(1.2);
}

.score-display {
  font-size: 2rem;
  margin: 30px 0;
  text-align: center;
  /* Enhanced glow and pulse effect */
  animation: scorePulse 2s ease-in-out infinite alternate;
}

@keyframes scorePulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.4));
  }
  100% {
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px rgba(78, 205, 196, 0.8));
  }
}

.score-label {
  color: #4ecdc4;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(78, 205, 196, 0.6);
}

#banana-container {
  margin: 40px 0;
  position: relative;
  display: inline-block;
}

/* ACHIEVEMENT POPUP */
.achievement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 3px solid #fff;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
  transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.achievement-popup.show {
  -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
  transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
  animation: achievementBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-content {
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
  text-align: left;
}

.achievement-icon {
  font-size: 3rem;
  animation: achievementSpin 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  /* Hardware acceleration */
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.achievement-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.achievement-description {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 5px;
}

/* COMBO DISPLAY */
.combo-display {
  position: fixed;
  top: 30%;
  right: 30px;
  transform: translateY(-50%) scale(0);
  background: linear-gradient(45deg, #feca57, #ff9ff3);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(254, 202, 87, 0.4);
  z-index: 5000;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid #fff;
  /* Hardware acceleration */
  will-change: transform;
  -webkit-transform: translate3d(0, -50%, 0) scale3d(0, 0, 1);
  transform: translate3d(0, -50%, 0) scale3d(0, 0, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.combo-display.show {
  -webkit-transform: translate3d(0, -50%, 0) scale3d(1, 1, 1);
  transform: translate3d(0, -50%, 0) scale3d(1, 1, 1);
  animation: comboPulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.combo-text {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.combo-multiplier {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* FLYING BANANAS */
#flying-bananas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.flying-banana {
  position: absolute;
  font-size: 2rem;
  animation: flyAcross 8s linear infinite;
  opacity: 0.7;
}

@keyframes epicGradientShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

@keyframes subtitleGlow {
  0% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
  100% { text-shadow: 0 0 25px rgba(255, 255, 255, 0.4), 0 0 35px rgba(78, 205, 196, 0.3); }
}

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

@keyframes achievementBounce {
  0% { transform: translate(-50%, -50%) scale(0); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes achievementSpin {
  0%, 100% { 
    -webkit-transform: rotateZ(0deg) scale3d(1, 1, 1); 
    transform: rotateZ(0deg) scale3d(1, 1, 1); 
  }
  25% {
    -webkit-transform: rotateZ(90deg) scale3d(1.1, 1.1, 1);
    transform: rotateZ(90deg) scale3d(1.1, 1.1, 1);
  }
  50% { 
    -webkit-transform: rotateZ(180deg) scale3d(1.2, 1.2, 1); 
    transform: rotateZ(180deg) scale3d(1.2, 1.2, 1); 
  }
  75% {
    -webkit-transform: rotateZ(270deg) scale3d(1.1, 1.1, 1);
    transform: rotateZ(270deg) scale3d(1.1, 1.1, 1);
  }
}

@keyframes comboPulse {
  0%, 100% { 
    -webkit-transform: translate3d(0, -50%, 0) scale3d(1, 1, 1); 
    transform: translate3d(0, -50%, 0) scale3d(1, 1, 1); 
  }
  25% {
    -webkit-transform: translate3d(0, -50%, 0) scale3d(1.05, 1.05, 1);
    transform: translate3d(0, -50%, 0) scale3d(1.05, 1.05, 1);
  }
  50% { 
    -webkit-transform: translate3d(0, -50%, 0) scale3d(1.1, 1.1, 1); 
    transform: translate3d(0, -50%, 0) scale3d(1.1, 1.1, 1); 
  }
  75% {
    -webkit-transform: translate3d(0, -50%, 0) scale3d(1.05, 1.05, 1);
    transform: translate3d(0, -50%, 0) scale3d(1.05, 1.05, 1);
  }
}

@keyframes flyAcross {
  0% { 
    left: -100px; 
    top: 20%; 
    transform: rotate(0deg);
  }
  25% { 
    top: 60%; 
    transform: rotate(90deg);
  }
  50% { 
    top: 30%; 
    transform: rotate(180deg);
  }
  75% { 
    top: 70%; 
    transform: rotate(270deg);
  }
  100% { 
    left: 100vw; 
    top: 50%; 
    transform: rotate(360deg);
  }
}

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

p {
  font-size: 1.3rem;
  color: #a0a0a0;
  margin-bottom: 30px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

label {
  display: block;
  margin: 15px 0;
  font-size: 1.1rem;
  color: #4ecdc4;
  font-weight: 600;
}

input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #4ecdc4;
  border-radius: 10px;
  padding: 10px 15px;
  color: #fff;
  font-size: 1rem;
  margin-left: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  /* Hardware acceleration */
  will-change: transform, box-shadow, border-color;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

input:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
  -webkit-transform: scale3d(1.05, 1.05, 1);
  transform: scale3d(1.05, 1.05, 1);
}

input::placeholder {
  color: #888;
}

button {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  border-radius: 15px;
  padding: 12px 24px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 10px 5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
  background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
}

button:active {
  transform: translateY(-1px);
}

button:disabled {
  background: linear-gradient(45deg, #666, #888);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#banana {
  font-size: 6rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.6, 1);
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
  animation: float 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  position: relative;
  z-index: 10;
  /* Hardware acceleration for smoother performance */
  will-change: transform, filter;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Better transform origin for scaling */
  -webkit-transform-origin: center center;
  transform-origin: center center;
}

/* EPIC BANANA GLOW RINGS */
#banana::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  border: 3px solid rgba(255, 235, 59, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
}

#banana::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160%;
  height: 160%;
  border: 2px solid rgba(255, 235, 59, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite reverse;
  z-index: -1;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
}

/* ENHANCED SCREEN EFFECTS */
.screen-shake {
  animation: screenShake 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen-glow {
  animation: screenGlow 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes screenShake {
  0%, 100% { 
    -webkit-transform: translate3d(0, 0, 0); 
    transform: translate3d(0, 0, 0); 
  }
  10% { 
    -webkit-transform: translate3d(-10px, 0, 0); 
    transform: translate3d(-10px, 0, 0); 
  }
  20% { 
    -webkit-transform: translate3d(10px, 0, 0); 
    transform: translate3d(10px, 0, 0); 
  }
  30% { 
    -webkit-transform: translate3d(-8px, 0, 0); 
    transform: translate3d(-8px, 0, 0); 
  }
  40% { 
    -webkit-transform: translate3d(8px, 0, 0); 
    transform: translate3d(8px, 0, 0); 
  }
  50% { 
    -webkit-transform: translate3d(-6px, 0, 0); 
    transform: translate3d(-6px, 0, 0); 
  }
  60% { 
    -webkit-transform: translate3d(6px, 0, 0); 
    transform: translate3d(6px, 0, 0); 
  }
  70% { 
    -webkit-transform: translate3d(-4px, 0, 0); 
    transform: translate3d(-4px, 0, 0); 
  }
  80% { 
    -webkit-transform: translate3d(4px, 0, 0); 
    transform: translate3d(4px, 0, 0); 
  }
  90% { 
    -webkit-transform: translate3d(-2px, 0, 0); 
    transform: translate3d(-2px, 0, 0); 
  }
}

@keyframes screenGlow {
  0%, 100% {
    box-shadow: inset 0 0 0 rgba(255, 107, 107, 0);
  }
  25% {
    box-shadow: inset 0 0 50px rgba(255, 107, 107, 0.2);
  }
  50% {
    box-shadow: inset 0 0 80px rgba(255, 107, 107, 0.4);
  }
  75% {
    box-shadow: inset 0 0 50px rgba(255, 107, 107, 0.2);
  }
}

@keyframes pulseRing {
  0% {
    -webkit-transform: translate3d(-50%, -50%, 0) scale3d(0.8, 0.8, 1);
    transform: translate3d(-50%, -50%, 0) scale3d(0.8, 0.8, 1);
    opacity: 1;
  }
  25% {
    -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1);
    transform: translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1);
    opacity: 0.8;
  }
  50% {
    -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1.2, 1.2, 1);
    transform: translate3d(-50%, -50%, 0) scale3d(1.2, 1.2, 1);
    opacity: 0.5;
  }
  75% {
    -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1.4, 1.4, 1);
    transform: translate3d(-50%, -50%, 0) scale3d(1.4, 1.4, 1);
    opacity: 0.2;
  }
  100% {
    -webkit-transform: translate3d(-50%, -50%, 0) scale3d(1.5, 1.5, 1);
    transform: translate3d(-50%, -50%, 0) scale3d(1.5, 1.5, 1);
    opacity: 0;
  }
}

@keyframes float {
  0%, 20%, 80%, 100% { 
    -webkit-transform: translate3d(0, 0px, 0); 
    transform: translate3d(0, 0px, 0); 
  }
  25%, 35% {
    -webkit-transform: translate3d(0, -5px, 0);
    transform: translate3d(0, -5px, 0);
  }
  45%, 55% { 
    -webkit-transform: translate3d(0, -10px, 0); 
    transform: translate3d(0, -10px, 0); 
  }
  65%, 75% {
    -webkit-transform: translate3d(0, -5px, 0);
    transform: translate3d(0, -5px, 0);
  }
}

#banana:hover {
  -webkit-transform: scale3d(1.15, 1.15, 1) translate3d(0, -8px, 0) rotateZ(5deg);
  transform: scale3d(1.15, 1.15, 1) translate3d(0, -8px, 0) rotateZ(5deg);
  filter: drop-shadow(0 0 40px rgba(255, 235, 59, 0.9)) drop-shadow(0 0 60px rgba(255, 235, 59, 0.6));
  animation: epicBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes epicBounce {
  0%, 100% { 
    -webkit-transform: scale3d(1.15, 1.15, 1) translate3d(0, -8px, 0) rotateZ(5deg); 
    transform: scale3d(1.15, 1.15, 1) translate3d(0, -8px, 0) rotateZ(5deg); 
  }
  25% { 
    -webkit-transform: scale3d(1.2, 1.2, 1) translate3d(0, -12px, 0) rotateZ(-2deg); 
    transform: scale3d(1.2, 1.2, 1) translate3d(0, -12px, 0) rotateZ(-2deg); 
  }
  50% { 
    -webkit-transform: scale3d(1.18, 1.18, 1) translate3d(0, -10px, 0) rotateZ(3deg); 
    transform: scale3d(1.18, 1.18, 1) translate3d(0, -10px, 0) rotateZ(3deg); 
  }
  75% { 
    -webkit-transform: scale3d(1.22, 1.22, 1) translate3d(0, -14px, 0) rotateZ(-1deg); 
    transform: scale3d(1.22, 1.22, 1) translate3d(0, -14px, 0) rotateZ(-1deg); 
  }
}

#banana:active {
  -webkit-transform: scale3d(1.3, 1.3, 1) translate3d(0, -12px, 0) rotateZ(-10deg);
  transform: scale3d(1.3, 1.3, 1) translate3d(0, -12px, 0) rotateZ(-10deg);
  filter: drop-shadow(0 0 60px rgba(255, 235, 59, 1)) drop-shadow(0 0 100px rgba(255, 235, 59, 0.8));
  transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#inventory {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 20px;
}

.banana-item {
  flex: 0 1 140px;
  margin: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  border: 2px solid rgba(78, 205, 196, 0.3);
  border-radius: 20px;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  position: relative;
  overflow: hidden;
  /* Hardware acceleration */
  will-change: transform, box-shadow, border-color;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.banana-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
  pointer-events: none; /* Prevent intercepting mouse events */
}

.banana-item:hover::before {
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { 
    -webkit-transform: translate3d(-100%, -100%, 0) rotateZ(45deg); 
    transform: translate3d(-100%, -100%, 0) rotateZ(45deg); 
    opacity: 0; 
  }
  25% {
    -webkit-transform: translate3d(-50%, -50%, 0) rotateZ(45deg);
    transform: translate3d(-50%, -50%, 0) rotateZ(45deg);
    opacity: 0.5;
  }
  50% { 
    opacity: 1; 
  }
  75% {
    -webkit-transform: translate3d(50%, 50%, 0) rotateZ(45deg);
    transform: translate3d(50%, 50%, 0) rotateZ(45deg);
    opacity: 0.5;
  }
  100% { 
    -webkit-transform: translate3d(100%, 100%, 0) rotateZ(45deg); 
    transform: translate3d(100%, 100%, 0) rotateZ(45deg); 
    opacity: 0; 
  }
}

.banana-item:hover {
  -webkit-transform: translate3d(0, -5px, 0) scale3d(1.05, 1.05, 1);
  transform: translate3d(0, -5px, 0) scale3d(1.05, 1.05, 1);
  border-color: #4ecdc4;
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

/* Fix button interaction issues */
.collection-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Prevent conflicting transforms when button is hovered */
.banana-item:hover .collection-btn {
  /* Reset parent transform effect for the button specifically */
  transform: none;
}

.collection-btn:hover {
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6) !important;
  background-position: 100% 100% !important;
}

.banana-item .emoji {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.banana-item div:last-of-type {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.banana-item button {
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 10px;
}

/* Special styling for rare banana items */
.banana-item:has(button) {
  flex: 0 1 180px;
  border-color: #feca57;
  background: rgba(254, 202, 87, 0.1);
  animation: rarePulse 3s ease-in-out infinite;
}

@keyframes rarePulse {
  0%, 100% { 
    box-shadow: 0 10px 30px rgba(254, 202, 87, 0.3);
    border-color: rgba(254, 202, 87, 0.6);
  }
  50% { 
    box-shadow: 0 15px 40px rgba(254, 202, 87, 0.5);
    border-color: rgba(254, 202, 87, 0.9);
  }
}

#collection-area {
  position: fixed;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border: 2px solid #4ecdc4;
  border-radius: 20px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(78, 205, 196, 0.3);
  transition: all 0.3s ease;
}

#collection-area:hover {
  box-shadow: 0 12px 40px rgba(78, 205, 196, 0.4);
  transform: translateY(-2px);
}

#collection-area h2 {
  color: #4ecdc4;
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#leaderboard-area {
  position: fixed;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border: 2px solid #ff6b6b;
  border-radius: 20px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
  transition: all 0.3s ease;
}

#leaderboard-area:hover {
  box-shadow: 0 12px 40px rgba(255, 107, 107, 0.4);
  transform: translateY(-2px);
}

#leaderboard-area h2 {
  color: #ff6b6b;
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#collection {
  margin-top: 15px;
}

#collection .banana-item {
  background: rgba(78, 205, 196, 0.1);
  border-color: rgba(78, 205, 196, 0.5);
}

#leaderboard {
  list-style: none;
  padding: 0;
  max-width: 250px;
  margin: 15px 0;
  text-align: left;
}

#leaderboard li {
  border-bottom: 1px solid rgba(255, 107, 107, 0.3);
  padding: 8px 0;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

#leaderboard li:hover {
  color: #ff6b6b;
  padding-left: 10px;
}

/* Score display styling */
div:has(#score) {
  font-size: 1.5rem;
  color: #4ecdc4;
  font-weight: 700;
  margin: 20px 0;
  text-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
}

#score {
  color: #feca57;
  font-family: 'Orbitron', 'Impact', monospace;
  font-size: 2rem;
  text-shadow: 0 0 20px rgba(254, 202, 87, 0.6);
  animation: scoreGlow 2s ease-in-out infinite alternate;
}

@keyframes scoreGlow {
  0% { text-shadow: 0 0 20px rgba(254, 202, 87, 0.6); }
  100% { text-shadow: 0 0 30px rgba(254, 202, 87, 0.9), 0 0 40px rgba(254, 202, 87, 0.6); }
}

/* Enhanced hover effects for inventory */
.banana-item:hover .emoji {
  transform: scale(1.1) rotate(10deg);
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
}

/* Additional glow effects */
#collection-area h2, #leaderboard-area h2 {
  text-shadow: 0 0 15px currentColor;
}

/* Responsive design */
/* EPIC PARTICLE SYSTEM */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #4ecdc4;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  z-index: 1000;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.particle-star {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #fff 0%, #ffeb3b 100%);
  /* Fallback for browsers that don't support clip-path */
  border-radius: 50%;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  -webkit-clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: particle-star 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  /* Hardware acceleration */
  will-change: transform, opacity;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.particle-sparkle {
  width: 6px;
  height: 6px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #feca57);
  animation: particle-sparkle 3s ease-out forwards;
}

.particle-confetti {
  width: 8px;
  height: 3px;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
  animation: particle-confetti 4s ease-out forwards;
}

.particle-banana {
  width: 16px;
  height: 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: particle-banana 5s ease-out forwards;
}

.particle-ring {
  width: 20px;
  height: 20px;
  border: 2px solid #feca57;
  border-radius: 50%;
  background: transparent;
  animation: particle-ring 2s ease-out forwards;
}

.particle-trail {
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, #fff, transparent);
  animation: particle-trail 2s ease-out forwards;
}

/* FIREWORK PARTICLES */
.firework-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1001;
}

@keyframes particle-float {
  0% {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotateZ(0deg);
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) rotateZ(0deg);
  }
  25% {
    opacity: 0.9;
    -webkit-transform: translate3d(0, -30px, 0) scale3d(1.1, 1.1, 1) rotateZ(45deg);
    transform: translate3d(0, -30px, 0) scale3d(1.1, 1.1, 1) rotateZ(45deg);
  }
  50% {
    opacity: 0.7;
    -webkit-transform: translate3d(0, -60px, 0) scale3d(0.9, 0.9, 1) rotateZ(90deg);
    transform: translate3d(0, -60px, 0) scale3d(0.9, 0.9, 1) rotateZ(90deg);
  }
  75% {
    opacity: 0.4;
    -webkit-transform: translate3d(0, -90px, 0) scale3d(0.7, 0.7, 1) rotateZ(135deg);
    transform: translate3d(0, -90px, 0) scale3d(0.7, 0.7, 1) rotateZ(135deg);
  }
  100% {
    opacity: 0;
    -webkit-transform: translate3d(0, -120px, 0) scale3d(0.5, 0.5, 1) rotateZ(180deg);
    transform: translate3d(0, -120px, 0) scale3d(0.5, 0.5, 1) rotateZ(180deg);
  }
}

@keyframes particle-star {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translateY(-20px) scale(1) rotate(72deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(0.3) rotate(360deg);
  }
}

@keyframes particle-sparkle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-60px) scale(1.5) rotate(180deg);
    filter: brightness(2);
  }
  100% {
    opacity: 0;
    transform: translateY(-130px) scale(0.2) rotate(360deg);
    filter: brightness(0.5);
  }
}

@keyframes particle-confetti {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-140px) scale(0.8) rotate(720deg);
  }
}

@keyframes particle-banana {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translateY(-40px) scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-160px) scale(0.3) rotate(540deg);
  }
}

@keyframes particle-ring {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.2);
    border-width: 4px;
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50px) scale(1.5);
    border-width: 2px;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(2.5);
    border-width: 1px;
  }
}

@keyframes particle-trail {
  0% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scaleY(3);
  }
}

/* GAME OVER MODAL */
.game-over-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.5s ease-out;
}

.game-over-content {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 3px solid #fff;
  color: white;
  max-width: 400px;
  animation: scaleIn 0.6s ease-out;
}

.game-over-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.final-score, .final-clicks {
  font-weight: 900;
  font-size: 1.5rem;
  color: #ffeb3b;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.8);
}

/* ENHANCED BANANA ITEM STYLING */
.banana-item {
  position: relative;
  overflow: visible;
}

.banana-item.rare-banana {
  border-color: #feca57;
  background: rgba(254, 202, 87, 0.1);
  animation: rarePulse 3s ease-in-out infinite;
}

.banana-item.common-banana {
  border-color: rgba(78, 205, 196, 0.3);
  background: rgba(78, 205, 196, 0.05);
}

.new-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(45deg, #ff6b6b, #ff9ff3);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  animation: newBadgePulse 2s ease-in-out infinite;
  z-index: 10;
}

.banana-name {
  font-weight: 700;
  font-size: 1rem;
  margin: 5px 0;
}

.banana-points {
  color: #feca57;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(254, 202, 87, 0.6);
}

.banana-count {
  color: #4ecdc4;
  font-weight: 700;
  font-size: 1rem;
}

.banana-total {
  color: #ff6b6b;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 5px;
}

.collection-btn {
  font-size: 0.9rem !important;
  padding: 8px 16px !important;
  margin-top: 10px;
}

/* LEADERBOARD ENHANCEMENTS */
.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 107, 107, 0.3);
  transition: all 0.3s ease;
}

.leaderboard-entry:hover {
  color: #ff6b6b;
  padding-left: 15px;
  background: rgba(255, 107, 107, 0.1);
}

.leaderboard-entry.rank-1 {
  color: #ffd700;
  font-weight: 900;
  font-size: 1.1rem;
}

.leaderboard-entry.rank-2 {
  color: #c0c0c0;
  font-weight: 700;
}

.leaderboard-entry.rank-3 {
  color: #cd7f32;
  font-weight: 700;
}

.rank {
  font-weight: 700;
  margin-right: 10px;
}

.username {
  flex: 1;
  text-align: left;
  margin: 0 10px;
}

.score {
  font-weight: 900;
  color: #feca57;
}

/* SLIDE IN ANIMATION */
@keyframes slideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes newBadgePulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
  }
}

/* EPIC SCORE ANIMATIONS */
@keyframes epicScoreGlow {
  0% { 
    text-shadow: 0 0 20px rgba(254, 202, 87, 0.6);
    transform: scale(1);
  }
  100% { 
    text-shadow: 0 0 40px rgba(254, 202, 87, 1), 0 0 60px rgba(255, 107, 107, 0.8);
    transform: scale(1.05);
  }
}

@keyframes superScoreGlow {
  0% { 
    text-shadow: 0 0 25px rgba(254, 202, 87, 0.7);
    transform: scale(1);
  }
  100% { 
    text-shadow: 0 0 35px rgba(254, 202, 87, 0.9), 0 0 50px rgba(254, 202, 87, 0.6);
    transform: scale(1.03);
  }
}

/* ENHANCED RESPONSIVE DESIGN */

/* Extra large screens */
@media (min-width: 1200px) {
  .controls-panel {
    max-width: 700px;
  }
  
  #main-title {
    font-size: 5rem;
  }
  
  #banana {
    font-size: 7rem;
  }
}

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  #main-title {
    font-size: 3.5rem;
  }
  
  .controls-panel {
    max-width: 80%;
    padding: 25px;
  }
  
  .banana-item {
    flex-basis: 130px;
  }
}

/* Standard tablets */
@media (max-width: 800px) {
  .controls-panel {
    padding: 20px;
    margin: 10px;
    max-width: 90%;
  }
  
  .epic-button {
    font-size: 1rem;
    padding: 12px 20px;
    margin: 8px 5px;
    /* Ensure buttons are touch-friendly */
    min-height: 44px;
    min-width: 44px;
  }
  
  .banana-item {
    flex-basis: 120px;
    margin: 8px;
    padding: 12px;
  }
  
  #main-title {
    font-size: 3rem;
    padding: 0 15px;
  }
  
  #subtitle {
    font-size: 1.2rem;
    padding: 0 15px;
  }
  
  .game-over-content {
    margin: 20px;
    padding: 30px;
  }
  
  #collection-area, #leaderboard-area {
    max-width: 95%;
    margin: 15px auto;
  }
  
  .combo-display {
    right: 15px;
    top: 25%;
    padding: 15px;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  #main-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
  }
  
  #subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  
  #banana {
    font-size: 4rem;
    /* Ensure banana is easily tappable on mobile */
    padding: 10px;
    margin: 15px 0;
  }
  
  .controls-panel {
    padding: 15px;
    margin: 10px 5px;
    border-radius: 15px;
  }
  
  .epic-button {
    font-size: 0.9rem;
    padding: 12px 20px;
    /* Full width buttons on small screens */
    width: 100%;
    max-width: 200px;
    margin: 8px auto;
    display: block;
  }
  
  .banana-item {
    flex-basis: 100px;
    margin: 6px;
    padding: 10px;
    font-size: 0.9rem;
  }
  
  #collection-area, #leaderboard-area {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 15px auto;
    max-width: 95%;
    padding: 15px;
  }
  
  input {
    margin: 8px 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    font-size: 16px; /* Prevent zoom on iOS */
    border-radius: 8px;
  }
  
  label {
    margin: 15px 0 8px 0;
    text-align: left;
    display: block;
    width: 100%;
  }
  
  .combo-display {
    right: 10px;
    top: 20%;
    padding: 12px;
    font-size: 0.9rem;
  }
  
  .achievement-popup {
    margin: 15px;
    padding: 20px;
    border-radius: 15px;
    max-width: calc(100vw - 30px);
  }
  
  .achievement-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .achievement-icon {
    font-size: 2.5rem;
  }
  
  .achievement-title {
    font-size: 1.3rem;
  }
  
  /* Improve inventory layout on mobile */
  #inventory {
    gap: 10px;
    padding: 15px;
  }
  
  /* Better score display on mobile */
  .score-display {
    font-size: 1.5rem;
    margin: 20px 0;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  #main-title {
    font-size: 2rem;
  }
  
  #banana {
    font-size: 3.5rem;
  }
  
  .controls-panel {
    padding: 12px;
  }
  
  .banana-item {
    flex-basis: 80px;
    margin: 4px;
    padding: 8px;
    font-size: 0.8rem;
  }
  
  .epic-button {
    font-size: 0.8rem;
    padding: 10px 16px;
  }
}
