body {
  background: linear-gradient(135deg, #4a7c59 0%, #6b8e7d 50%, #8fbc8f 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 10px 0;
  font-family: 'Arial', sans-serif;
  position: relative;
  box-sizing: border-box;
}

/* Add subtle background texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

#game-container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(145deg, #a8d4a8 0%, #92c292 100%);
  border-radius: 20px;
   padding: 25px 0; /* Use 0 for left/right padding */
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  display: flex;
  flex-direction: column;
  position: relative;
}

#game-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  border-radius: 20px;
  pointer-events: none;
}

#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3em;
  font-weight: bold;
  color: #2d5016;
  margin-bottom: 15px;
  padding: 0 25px; /* Add horizontal padding here */
  box-sizing: border-box; /* Add this to keep padding from affecting width */
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

#board-area {
  position: relative;
  width: 100%;
  height: 480px;
  margin-bottom: 15px;
  background: linear-gradient(145deg, #7fb069 0%, #8bc34a 100%);
  border-radius: 15px;
  box-shadow: 
    inset 0 3px 10px rgba(0,0,0,0.2),
    0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
}

#draw-decks-container {
  display: flex;
  justify-content: space-between;
  padding: 15px 50px;
  height: 70px;
  position: absolute;
  width: 100%;
  box-sizing: border-box;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

.draw-deck {
  width: 40px;
  height: 40px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #8b4513;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  display: none;
  pointer-events: auto;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
  animation: subtleGlow 3s ease-in-out infinite alternate;
}

/* Removed hover effect for mobile compatibility */

/* Dynamic deck stacking based on tile count */
.draw-deck.deck-empty::before,
.draw-deck.deck-empty::after {
  display: none;
}

.draw-deck.deck-single::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(245,222,179,0.4) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-2px, -2px);
  z-index: -1;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.draw-deck.deck-single::after {
  display: none;
}

.draw-deck.deck-few::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.6) 0%, rgba(245,222,179,0.6) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-3px, -3px);
  z-index: -1;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.draw-deck.deck-few::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.3) 0%, rgba(245,222,179,0.3) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-5px, -5px);
  z-index: -2;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.draw-deck.deck-many::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.7) 0%, rgba(245,222,179,0.7) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-4px, -4px);
  z-index: -1;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.1);
}

.draw-deck.deck-many::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.5) 0%, rgba(245,222,179,0.5) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-8px, -8px);
  z-index: -2;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.draw-deck.deck-full::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.8) 0%, rgba(245,222,179,0.8) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-5px, -5px);
  z-index: -1;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.15);
}

.draw-deck.deck-full::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.6) 0%, rgba(245,222,179,0.6) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-10px, -10px);
  z-index: -2;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

#game-board {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 10px;
  box-sizing: border-box;
}

#draw-decks-container:not(.hidden) + #game-board {
  top: 60px;
  height: 415px;
}

#holding-area {
  width: 100%;
  height: 50px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 5px;
  margin-bottom: 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.tile {
  width: 40px;
  height: 40px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #8b4513;
  border-radius: 5px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
}

/* Removed hover effect for mobile compatibility */

.tile:not(.disabled) {
  animation: subtleGlow 3s ease-in-out infinite alternate;
}

.tile.disabled {
  filter: grayscale(40%) brightness(0.5);
  pointer-events: none;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  background-color: #d3d3d3;
  background-image: linear-gradient(145deg, rgba(211,211,211,0.6) 0%, rgba(169,169,169,0.6) 100%);
}

/* Keep gold background for disabled pineapple-drink tiles */
.tile.disabled[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  filter: brightness(0.7) saturate(0.8);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 0 8px rgba(255,215,0,0.4);
}

@keyframes subtleGlow {
  0% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.3),
      inset 0 2px 0 rgba(255,255,255,0.8),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 5px rgba(255,248,220,0.3);
  }
  100% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.3),
      inset 0 2px 0 rgba(255,255,255,0.8),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 10px rgba(255,215,0,0.5);
  }
}

/* Better stacking effect for tiles */
.tile[style*="z-index: 2"] {
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

.tile[style*="z-index: 3"] {
  box-shadow: 
    0 5px 10px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

.tile[style*="z-index: 4"], .tile[style*="z-index: 5"] {
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

#collection-slot-container {
  width: 100%;
  background: linear-gradient(145deg, #8b4513 0%, #654321 100%);
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 3px 8px rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.2);
  position: relative;
}

#collection-slot-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(145deg, #a0522d 0%, #8b4513 100%);
  border-radius: 10px;
  z-index: -1;
}

#collection-slot {
  display: flex;
  align-items: center;
  height: 70px;
  width: 100%;
  background: linear-gradient(145deg, #daa520 0%, #b8860b 100%);
  border-radius: 8px;
  padding: 0 10px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 2px 5px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.2);
}

.collected-tile {
  width: 55px;
  height: 55px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  border: 2px solid #8b4513;
  margin: 0 3px;
  animation: popIn 0.3s ease;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
}

.collected-tile {
  animation: popIn 0.3s ease, subtleGlow 3s ease-in-out infinite alternate 0.3s;
}

/* Removed hover effect for mobile compatibility - selection handled via tap */
.collected-tile.selectable {
  cursor: pointer;
  border: 3px solid #ffd700;
}

#bonus-container {
  display: flex;
  justify-content: space-around;
  padding-top: 20px;
  padding-left: 25px; /* Add horizontal padding here */
  padding-right: 25px; /* Add horizontal padding here */
  box-sizing: border-box; /* Add this to keep padding from affecting width */
  gap: 10px;
}

.bonus-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #8b4513 0%, #654321 100%);
  border: 2px solid #5d4e37;
  border-radius: 12px;
  width: 90px;
  height: 90px;
  cursor: pointer;
  color: #f5deb3;
  font-weight: bold;
  font-size: 0.9em;
  box-shadow: 
    0 6px 0 #4a2c2a,
    0 8px 12px rgba(0,0,0,0.4);
  transition: all 0.15s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.bonus-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 0 #4a2c2a,
    0 10px 16px rgba(0,0,0,0.5);
}

.bonus-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 3px 0 #4a2c2a,
    0 5px 8px rgba(0,0,0,0.3);
}

.bonus-btn.disabled {
  background: linear-gradient(145deg, #696969 0%, #555555 100%);
  color: #999;
  cursor: not-allowed;
  box-shadow: 
    0 4px 0 #333,
    0 6px 8px rgba(0,0,0,0.3);
  opacity: 0.6;
}

.bonus-btn.disabled:hover {
  transform: none;
  box-shadow: 
    0 4px 0 #333,
    0 6px 8px rgba(0,0,0,0.3);
}

.bonus-img {
  width: 45px;
  height: 45px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 5px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.bonus-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 100%);
  color: #8b4513;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1em;
  font-weight: bold;
  border: 3px solid #fff;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.6);
  text-shadow: none;
}

@keyframes popIn {
  0% { 
    transform: scale(0.3); 
    opacity: 0;
    rotate: 180deg;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% { 
    transform: scale(1); 
    opacity: 1;
    rotate: 0deg;
  }
}

@keyframes burstOut {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
    filter: brightness(1.5) saturate(1.5);
  }
  100% {
    transform: scale(0.3);
    opacity: 0;
    filter: brightness(2) saturate(2);
  }
}

@keyframes sparkle {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

.collected-tile.bursting {
  animation: burstOut 0.4s ease-out forwards;
  z-index: 1000;
}

.burst-effect {
  position: absolute;
  pointer-events: none;
  z-index: 1001;
}

.burst-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ffd700 0%, #ff6b6b 100%);
  border-radius: 50%;
  animation: sparkle 0.6s ease-out forwards;
}

.burst-particle:nth-child(1) { animation-delay: 0s; }
.burst-particle:nth-child(2) { animation-delay: 0.1s; }
.burst-particle:nth-child(3) { animation-delay: 0.05s; }
.burst-particle:nth-child(4) { animation-delay: 0.15s; }
.burst-particle:nth-child(5) { animation-delay: 0.08s; }
.burst-particle:nth-child(6) { animation-delay: 0.12s; }

/* Animation for sliding tiles */
.tile-sliding {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000 !important;
}

/* Removed hover override since hover effects are removed */

#game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #f5deb3;
  font-size: 2em;
  z-index: 100;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

#game-over-screen.hidden {
  display: none;
}

#game-over-message {
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#next-level-btn, #try-again-btn {
  padding: 15px 30px;
  font-size: 0.9em;
  cursor: pointer;
  border-radius: 12px;
  border: none;
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 100%);
  margin: 8px;
  font-weight: bold;
  color: #8b4513;
  box-shadow: 
    0 4px 0 #b8860b,
    0 6px 8px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  text-shadow: 0 1px 1px rgba(255,255,255,0.3);
}

#next-level-btn:hover, #try-again-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #b8860b,
    0 8px 12px rgba(0,0,0,0.4);
}

#next-level-btn:active, #try-again-btn:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #b8860b,
    0 4px 6px rgba(0,0,0,0.3);
}

.tile[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 15px rgba(255,215,0,0.6);
  animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Pineapple-drink tiles in collection slot */
.collected-tile[style*="pineapple-drink"] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: popIn 0.3s ease, goldGlow 2s ease-in-out infinite alternate 0.3s;
}

/* Pineapple-drink tiles in draw decks */
.draw-deck[style*="pineapple-drink"] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Pineapple-drink tiles in holding area */
#holding-area .tile[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: goldGlow 2s ease-in-out infinite alternate;
}

@keyframes goldGlow {
  0% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.7),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 15px rgba(255,215,0,0.6);
  }
  100% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.7),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 25px rgba(255,215,0,0.9);
  }
}

#login-container, #reset-password-container {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 420px;
  padding: 30px;
  box-sizing: border-box;
  background: linear-gradient(145deg, #a8d4a8 0%, #92c292 100%);
  border-radius: 20px;
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

#login-container h3, #reset-password-container h3 {
  text-align: center;
  color: #2d5016;
  font-size: 2em;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(255,255,255,0.5);
}

#login-container input, #login-container button,
#reset-password-container input, #reset-password-container button {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 2px solid #8b4513;
  box-sizing: border-box;
  font-size: 1em;
  transition: all 0.2s ease;
}

#login-container input, #reset-password-container input {
  background: linear-gradient(145deg, #f5deb3 0%, #d2b48c 100%);
  color: #8b4513;
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.2),
    0 1px 0 rgba(255,255,255,0.3);
}

#login-container input:focus, #reset-password-container input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.2),
    0 1px 0 rgba(255,255,255,0.3),
    0 0 10px rgba(255,215,0,0.3);
}

#login-container button, #reset-password-container button {
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 100%);
  border: 2px solid #b8860b;
  cursor: pointer;
  font-weight: bold;
  color: #8b4513;
  box-shadow: 
    0 4px 0 #b8860b,
    0 6px 8px rgba(0,0,0,0.3);
  text-shadow: 0 1px 1px rgba(255,255,255,0.3);
}

#login-container button:hover, #reset-password-container button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #b8860b,
    0 8px 12px rgba(0,0,0,0.4);
}

#login-container button:active, #reset-password-container button:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #b8860b,
    0 4px 6px rgba(0,0,0,0.3);
}

#forgot-password-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #007bff !important;
  font-size: 0.9em !important;
  font-weight: normal !important;
  text-decoration: underline !important;
  text-shadow: none !important;
  padding: 8px 12px !important;
}

#forgot-password-btn:hover {
  transform: none !important;
  box-shadow: none !important;
  color: #0056b3 !important;
  text-decoration: underline !important;
}

#forgot-password-btn:active {
  transform: none !important;
  box-shadow: none !important;
}

#logout-btn {
  background: linear-gradient(145deg, #ff6b6b 0%, #ee5a24 100%);
  border: 2px solid #c23616;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 
    0 3px 0 #c23616,
    0 5px 8px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

#logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 0 #c23616,
    0 6px 10px rgba(0,0,0,0.4);
}

#logout-btn:active {
  transform: translateY(1px);
  box-shadow: 
    0 2px 0 #c23616,
    0 4px 6px rgba(0,0,0,0.3);
}

#bug-report-container {
  position: absolute;
  bottom: 10px;
  right: 15px;
  z-index: 50;
}

#bug-report-btn {
  background: linear-gradient(145deg, #666 0%, #444 100%);
  border: 1px solid #333;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8em;
  opacity: 0.7;
  transition: all 0.2s ease;
}

#bug-report-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(145deg, #a8d4a8 0%, #92c292 100%);
  border-radius: 15px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-header {
  background: linear-gradient(145deg, #8b4513 0%, #654321 100%);
  color: #f5deb3;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.close-btn {
  background: none;
  border: none;
  color: #f5deb3;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background: rgba(245,222,179,0.2);
}

.modal-body {
  padding: 20px;
  color: #2d5016;
}

.modal-body p {
  margin: 0 0 15px 0;
  font-weight: bold;
}

#bug-description {
  width: 100%;
  padding: 10px;
  border: 2px solid #8b4513;
  border-radius: 8px;
  background: linear-gradient(145deg, #f5deb3 0%, #d2b48c 100%);
  color: #8b4513;
  font-family: Arial, sans-serif;
  font-size: 1em;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

#bug-description:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 5px rgba(255,215,0,0.3);
}

#bug-info {
  background: rgba(139,69,19,0.1);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9em;
}

#bug-info p {
  margin: 5px 0;
  font-weight: normal;
}

#bug-info strong {
  font-weight: bold;
}

.modal-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(139,69,19,0.1);
}

.modal-footer button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

#submit-bug-btn {
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 100%);
  color: #8b4513;
  border: 2px solid #b8860b;
}

#submit-bug-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#cancel-bug-btn {
  background: linear-gradient(145deg, #ccc 0%, #999 100%);
  color: #333;
  border: 2px solid #666;
}

#cancel-bug-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile device adjustments */
@media (max-width: 420px) {
  body {
    align-items: flex-start;
    padding: 5px 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #game-container {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 15px 10px; /* Reduced padding */
    min-height: auto;
    max-height: none;
  }

  #board-area {
    height: 400px; /* Reduced height for mobile */
  }

  .tile {
    width: 40px; /* Match JavaScript TILE_SIZE for mobile */
    height: 40px;
    font-size: 0.8em; /* Smaller font if you have any text */
  }

  .collected-tile {
    width: 45px; /* Slightly smaller collection tiles */
    height: 45px;
    margin: 0 2px; /* Reduced margin */
  }

  .draw-deck {
    width: 40px; /* Same size as board tiles */
    height: 40px;
  }

  .draw-deck::before {
    transform: translate(-3px, -3px); /* Adjusted stacking effect */
  }

  .draw-deck::after {
    transform: translate(-6px, -6px);
  }

  #draw-decks-container {
    padding: 10px 30px; /* Reduced padding */
    height: 60px; /* Match desktop height for consistency */
  }

  .bonus-btn {
    width: 70px; /* Smaller bonus buttons */
    height: 70px;
    font-size: 0.8em;
  }

  .bonus-img {
    width: 30px;
    height: 30px;
  }

  .bonus-count {
    width: 24px;
    height: 24px;
    font-size: 0.9em;
    top: -6px;
    right: -6px;
  }

  #collection-slot {
    height: 55px; /* Reduced height */
    padding: 0 8px;
  }

  #top-bar {
    font-size: 1.1em; /* Smaller top bar font */
    padding: 0 15px;
  }

  #bonus-container {
    padding: 15px 15px 15px; /* Add bottom padding for mobile */
    gap: 8px; /* Smaller gap */
    margin-bottom: 10px; /* Ensure space at bottom */
  }

  #bug-report-container {
    bottom: 5px;
    right: 10px;
  }

  #bug-report-btn {
    font-size: 0.7em;
    padding: 6px 10px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 12px 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    padding: 12px 15px;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
    margin: 5px 0;
  }

  #holding-area {
    top: 10px;
    right: 10px;
    padding: 3px; /* Smaller padding */
  }
}

/* Tablet adjustments */
@media (max-width: 768px) and (min-width: 421px) {
  .tile {
    width: 40px; /* Match JavaScript TILE_SIZE for tablet */
    height: 40px;
  }

  .collected-tile {
    width: 40px;
    height: 40px;
  }

  .draw-deck {
    width: 40px;
    height: 40px;
  }
}