/* Main Menu Styles */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f5dc, #f8efd4);
  font-family: 'Roboto', sans-serif;
  color: #333;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#main-menu-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f8efd4, #f5e9c9, #ede0c8);
  position: relative;
  overflow: hidden;
}

/* Add animated background elements */
#main-menu-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(210, 180, 140, 0.3) 100%);
  opacity: 0.8;
  z-index: 0;
}

/* Create animated stars */
@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.8); }
}

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

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: #ffd700; /* Gold stars */
  border-radius: 50%;
  animation: twinkle 3s infinite;
  z-index: 10;
  box-shadow: 0 0 5px 1px rgba(255, 215, 0, 0.7);
}

.star.large {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 8px 2px rgba(255, 215, 0, 0.9);
}

.star.medium {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 6px 1px rgba(255, 215, 0, 0.8);
}

/* Apply to all pages */
body {
  position: relative;
  overflow: hidden;
}

#main-menu-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 248, 231, 0.3);
  z-index: 1;
}

.menu-content {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(255, 248, 231, 0.9);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(160, 120, 80, 0.3);
  border: 1px solid rgba(210, 180, 140, 0.3);
  backdrop-filter: blur(10px);
  max-width: 500px;
  width: 90%;
}

h1 {
  font-size: 48px;
  margin: 0 0 30px 0;
  color: #8B4513; /* SaddleBrown */
  text-shadow: 0 0 10px rgba(210, 180, 140, 0.7);
  font-weight: 700;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.menu-btn {
  padding: 15px 20px;
  font-size: 18px;
  background: linear-gradient(45deg, #D2B48C, #CD853F); /* Tan to Peru */
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 10px rgba(160, 120, 80, 0.3);
}

.menu-btn:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E); /* BurlyWood to Chocolate */
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(160, 120, 80, 0.4);
}

.menu-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.player-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(210, 180, 140, 0.3);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

.stat-label {
  color: #8B4513; /* SaddleBrown */
}

.stat-value {
  color: #A0522D; /* Sienna */
  font-weight: 600;
}

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

.modal.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(255, 248, 231, 0.95);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(160, 120, 80, 0.3), 0 0 20px rgba(210, 180, 140, 0.3);
  border: 1px solid rgba(210, 180, 140, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  color: #5D4037; /* Brown 700 */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(210, 180, 140, 0.5);
  padding-bottom: 15px;
}

.modal-header h2 {
  margin: 0;
  font-size: 28px;
  color: #8B4513; /* SaddleBrown */
  text-shadow: 0 0 10px rgba(210, 180, 140, 0.7);
}

.close-btn {
  font-size: 28px;
  color: #8B4513; /* SaddleBrown */
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-btn:hover {
  color: #A52A2A; /* Brown */
  transform: scale(1.2);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(210, 180, 140, 0.3);
}

.primary-btn {
  padding: 12px 25px;
  font-size: 16px;
  background: linear-gradient(45deg, #D2B48C, #CD853F); /* Tan to Peru */
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 10px rgba(160, 120, 80, 0.3);
}

.primary-btn:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E); /* BurlyWood to Chocolate */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(160, 120, 80, 0.4);
}

.primary-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.silver-display, .currency-display {
  font-size: 18px;
  color: #8B4513; /* SaddleBrown */
}

.silver-display span:last-child, .currency-display span:nth-child(2), .currency-display span:nth-child(5) {
  color: #A0522D; /* Sienna */
  font-weight: 600;
  margin-left: 5px;
}

.currency-separator {
  margin: 0 10px;
  color: #D2B48C; /* Tan */
}

/* Map Grid Styles */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Difficulty Intro Styles */
.difficulty-intro {
  background: rgba(245, 222, 179, 0.5);
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  text-align: center;
  border: 1px solid rgba(210, 180, 140, 0.4);
}

.difficulty-intro p {
  margin: 0;
  font-size: 16px;
  color: #8B4513;
  line-height: 1.5;
}

/* Difficulty Grid Styles */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.map-option {
  background: rgba(245, 222, 179, 0.7); /* Wheat with transparency */
  border: 1px solid rgba(210, 180, 140, 0.4);
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.map-option:hover {
  background: rgba(222, 184, 135, 0.7); /* BurlyWood with transparency */
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(160, 120, 80, 0.4), 0 0 15px rgba(210, 180, 140, 0.5);
}

.map-option.selected {
  background: rgba(205, 133, 63, 0.3); /* Peru with transparency */
  border: 2px solid #CD853F; /* Peru */
  box-shadow: 0 0 15px rgba(210, 180, 140, 0.7);
}

.map-option canvas {
  width: 100%;
  height: 120px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.map-option h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #8B4513; /* SaddleBrown */
}

.map-option p {
  margin: 0;
  font-size: 14px;
  color: #A0522D; /* Sienna */
}

/* Difficulty Option Styles */
.difficulty-option {
  background: rgba(245, 222, 179, 0.7); /* Wheat with transparency */
  border: 1px solid rgba(210, 180, 140, 0.4);
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.difficulty-option:hover {
  background: rgba(222, 184, 135, 0.7); /* BurlyWood with transparency */
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(160, 120, 80, 0.4), 0 0 15px rgba(210, 180, 140, 0.5);
}

.difficulty-option.selected {
  background: rgba(205, 133, 63, 0.3); /* Peru with transparency */
  border: 2px solid #CD853F; /* Peru */
  box-shadow: 0 0 15px rgba(210, 180, 140, 0.7);
}

.difficulty-option .difficulty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.difficulty-option h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #8B4513; /* SaddleBrown */
}

.difficulty-option p {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #A0522D; /* Sienna */
  min-height: 40px;
}

.difficulty-option .waves {
  font-size: 16px;
  color: #8B4513;
  font-weight: 600;
  margin-bottom: 5px;
}

.difficulty-option .reward {
  font-size: 14px;
  color: #4CAF50;
  font-weight: 600;
}

/* Difficulty-specific colors */
.difficulty-option.easy { border-color: #4CAF50; }
.difficulty-option.easy:hover, .difficulty-option.easy.selected { box-shadow: 0 0 15px #4CAF50; }
.difficulty-option.easy .difficulty-icon { color: #4CAF50; }

.difficulty-option.medium { border-color: #2196F3; }
.difficulty-option.medium:hover, .difficulty-option.medium.selected { box-shadow: 0 0 15px #2196F3; }
.difficulty-option.medium .difficulty-icon { color: #2196F3; }

.difficulty-option.hard { border-color: #FF9800; }
.difficulty-option.hard:hover, .difficulty-option.hard.selected { box-shadow: 0 0 15px #FF9800; }
.difficulty-option.hard .difficulty-icon { color: #FF9800; }

.difficulty-option.nightmare { border-color: #F44336; }
.difficulty-option.nightmare:hover, .difficulty-option.nightmare.selected { box-shadow: 0 0 15px #F44336; }
.difficulty-option.nightmare .difficulty-icon { color: #F44336; }

.difficulty-option.void { border-color: #9C27B0; }
.difficulty-option.void:hover, .difficulty-option.void.selected { box-shadow: 0 0 15px #9C27B0; }
.difficulty-option.void .difficulty-icon { color: #9C27B0; }

.difficulty-option.locked {
  opacity: 0.7;
  cursor: not-allowed;
}

.difficulty-option.locked:hover {
  transform: none;
  box-shadow: none;
}

.difficulty-option .lock-icon {
  font-size: 24px;
  color: #888;
  margin-top: 10px;
}

.secondary-btn {
  padding: 12px 25px;
  font-size: 16px;
  background: linear-gradient(45deg, #9E9E9E, #757575); /* Gray */
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.secondary-btn:hover {
  background: linear-gradient(45deg, #BDBDBD, #9E9E9E); /* Lighter Gray */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.secondary-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Shop Grid Styles */
.shop-grid, .upgrades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.shop-item, .upgrade-item {
  background: rgba(245, 222, 179, 0.7); /* Wheat with transparency */
  border: 1px solid rgba(210, 180, 140, 0.4);
  border-radius: 10px;
  padding: 15px;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.shop-item:hover, .upgrade-item:hover {
  background: rgba(222, 184, 135, 0.7); /* BurlyWood with transparency */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(160, 120, 80, 0.4), 0 0 15px rgba(210, 180, 140, 0.5);
}

.shop-item.locked, .upgrade-item.locked {
  opacity: 0.7;
  filter: grayscale(0.8);
}

.shop-item canvas, .upgrade-item canvas {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
}

.shop-item h3, .upgrade-item h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #8B4513; /* SaddleBrown */
}

.shop-item p, .upgrade-item p {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: #A0522D; /* Sienna */
  height: 40px;
  overflow: hidden;
}

.shop-item .price, .upgrade-item .price {
  display: inline-block;
  background: rgba(210, 180, 140, 0.3);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 14px;
  color: #8B4513; /* SaddleBrown */
  font-weight: 600;
}

.shop-item .buy-btn, .upgrade-item .buy-btn {
  margin-top: 10px;
  padding: 8px 15px;
  background: linear-gradient(45deg, #D2B48C, #CD853F); /* Tan to Peru */
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.shop-item .buy-btn:hover, .upgrade-item .buy-btn:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E); /* BurlyWood to Chocolate */
}

.shop-item .buy-btn:disabled, .upgrade-item .buy-btn:disabled {
  background: #D2B48C; /* Tan */
  cursor: not-allowed;
  opacity: 0.7;
}

/* Advanced Gacha System Styles */
.gacha-content {
  max-width: 1000px;
  width: 90%;
}

.gacha-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.gacha-main {
  flex: 2;
}

.gacha-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gacha-section {
  background: rgba(210, 180, 140, 0.2);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(210, 180, 140, 0.5);
}

.gacha-section h3 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 1px solid rgba(210, 180, 140, 0.5);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.gacha-box {
  width: 100%;
  height: 200px;
  background: rgba(255, 248, 231, 0.8);
  border-radius: 10px;
  border: 2px solid rgba(210, 180, 140, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.gacha-result {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: #8B4513;
}

.gacha-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.gacha-btn {
  padding: 12px 20px;
  background: linear-gradient(45deg, #D2B48C, #CD853F);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 16px;
}

.gacha-btn:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E);
  transform: translateY(-2px);
}

.gacha-btn:disabled {
  background: #D2B48C;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Drop Rate Chart Styles */
.drop-rate-chart {
  background: rgba(210, 180, 140, 0.2);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid rgba(210, 180, 140, 0.5);
}

.drop-rate-chart h3 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 1px solid rgba(210, 180, 140, 0.5);
  padding-bottom: 10px;
  margin-bottom: 15px;
  text-align: center;
  font-size: 18px;
}

.rate-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.rate-row.mythic {
  background: rgba(156, 39, 176, 0.2);
  color: #9C27B0;
}

.rate-row.legendary {
  background: rgba(255, 215, 0, 0.2);
  color: #B8860B;
}

.rate-row.epic {
  background: rgba(138, 43, 226, 0.2);
  color: #6A0DAD;
}

.rate-row.rare {
  background: rgba(30, 144, 255, 0.2);
  color: #0066CC;
}

.rate-row.common {
  background: rgba(200, 200, 200, 0.3);
  color: #555;
}

/* Pity System Styles */
.pity-system {
  background: rgba(210, 180, 140, 0.2);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid rgba(210, 180, 140, 0.5);
}

.pity-system h3 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 1px solid rgba(210, 180, 140, 0.5);
  padding-bottom: 10px;
  margin-bottom: 10px;
  text-align: center;
  font-size: 18px;
}

.pity-system p {
  margin: 0 0 10px 0;
  text-align: center;
  color: #A0522D;
  font-size: 14px;
}

.pity-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pity-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pity-row.mythic .pity-tier {
  color: #9C27B0;
}

.pity-row.legendary .pity-tier {
  color: #B8860B;
}

.pity-row.epic .pity-tier {
  color: #6A0DAD;
}

.pity-row.rare .pity-tier {
  color: #0066CC;
}

.pity-tier {
  font-weight: 600;
  font-size: 14px;
}

.pity-count {
  font-size: 12px;
  color: #A0522D;
}

.pity-bar {
  height: 8px;
  background: rgba(210, 180, 140, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.pity-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.pity-row.mythic .pity-progress {
  background: linear-gradient(90deg, #9C27B0, #E040FB);
}

.pity-row.legendary .pity-progress {
  background: linear-gradient(90deg, #FFC107, #FFD700);
}

.pity-row.epic .pity-progress {
  background: linear-gradient(90deg, #673AB7, #9575CD);
}

.pity-row.rare .pity-progress {
  background: linear-gradient(90deg, #2196F3, #64B5F6);
}

/* Gacha Result Styles */
.gacha-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.gacha-item-info {
  text-align: center;
}

.gacha-item-name {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}

.gacha-item-name.mythic {
  color: #9C27B0;
  text-shadow: 0 0 5px rgba(156, 39, 176, 0.5);
}

.gacha-item-name.legendary {
  color: #B8860B;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.gacha-item-name.epic {
  color: #6A0DAD;
}

.gacha-item-name.rare {
  color: #0066CC;
}

.gacha-item-name.common {
  color: #555;
}

.gacha-item-tier {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.gacha-item-tier.mythic {
  background: rgba(156, 39, 176, 0.2);
  color: #9C27B0;
}

.gacha-item-tier.legendary {
  background: rgba(255, 215, 0, 0.2);
  color: #B8860B;
}

.gacha-item-tier.epic {
  background: rgba(138, 43, 226, 0.2);
  color: #6A0DAD;
}

.gacha-item-tier.rare {
  background: rgba(30, 144, 255, 0.2);
  color: #0066CC;
}

.gacha-item-tier.common {
  background: rgba(200, 200, 200, 0.3);
  color: #555;
}

.gacha-summary-text {
  text-align: center;
  margin-bottom: 15px;
  font-size: 16px;
  color: #8B4513;
}

.gacha-summary-text span {
  font-weight: bold;
  margin: 0 5px;
}

.gacha-summary-text span.mythic {
  color: #9C27B0;
}

.gacha-summary-text span.legendary {
  color: #B8860B;
}

.gacha-summary-text span.epic {
  color: #6A0DAD;
}

.gacha-summary-text span.rare {
  color: #0066CC;
}

.gacha-summary-text span.common {
  color: #555;
}

/* Gacha Animation Styles */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes mythicReveal {
  0% { transform: scale(0.1); opacity: 0; filter: blur(20px); }
  30% { transform: scale(0.8); opacity: 0.5; filter: blur(10px); }
  50% { transform: scale(1.5); opacity: 0.8; filter: blur(5px); }
  75% { transform: scale(0.9); opacity: 0.9; filter: blur(0); }
  90% { transform: scale(1.1); opacity: 1; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes divineReveal {
  0% { transform: scale(0); opacity: 0; filter: blur(30px); }
  20% { transform: scale(0.5); opacity: 0.3; filter: blur(20px); }
  40% { transform: scale(1.0); opacity: 0.6; filter: blur(10px); }
  60% { transform: scale(2.0); opacity: 0.8; filter: blur(5px); }
  80% { transform: scale(1.5); opacity: 0.9; filter: blur(0); }
  90% { transform: scale(1.2); opacity: 1; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes holyWords {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(0.8); }
}

@keyframes satanicWords {
  0% { opacity: 0; transform: translateY(-20px) scale(0.8) rotate(-5deg); }
  20% { opacity: 1; transform: translateY(0) scale(1) rotate(5deg); }
  40% { opacity: 1; transform: translateY(0) scale(1.1) rotate(-3deg); }
  60% { opacity: 1; transform: translateY(0) scale(1) rotate(3deg); }
  80% { opacity: 1; transform: translateY(0) scale(1.05) rotate(-2deg); }
  100% { opacity: 0; transform: translateY(20px) scale(0.8) rotate(5deg); }
}

@keyframes holyLight {
  0% { opacity: 0; transform: scale(0.1); }
  50% { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(2); }
}

@keyframes satanicFire {
  0% { opacity: 0; height: 0; }
  30% { opacity: 0.7; height: 100%; }
  70% { opacity: 0.7; height: 100%; }
  100% { opacity: 0; height: 0; }
}

@keyframes legendaryReveal {
  0% { transform: scale(0.2); opacity: 0; filter: blur(15px); }
  40% { transform: scale(0.9); opacity: 0.7; filter: blur(8px); }
  60% { transform: scale(1.3); opacity: 0.9; filter: blur(2px); }
  80% { transform: scale(0.95); opacity: 0.95; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes epicReveal {
  0% { transform: scale(0.3); opacity: 0; filter: blur(10px); }
  50% { transform: scale(1.2); opacity: 0.8; filter: blur(3px); }
  70% { transform: scale(0.9); opacity: 0.95; filter: blur(1px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes rareReveal {
  0% { transform: scale(0.5); opacity: 0; filter: blur(5px); }
  60% { transform: scale(1.1); opacity: 0.9; filter: blur(2px); }
  80% { transform: scale(0.95); opacity: 0.98; filter: blur(0); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

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

.gacha-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9000;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.7);
}

.gacha-animation {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gacha-animation.divine {
  animation: divineReveal 4s ease-out forwards;
}

.gacha-animation.mythic {
  animation: mythicReveal 3s ease-out forwards;
}

.gacha-animation.legendary {
  animation: legendaryReveal 2.5s ease-out forwards;
}

.gacha-animation.epic {
  animation: epicReveal 2s ease-out forwards;
}

.gacha-animation.rare {
  animation: rareReveal 1.5s ease-out forwards;
}

.gacha-animation.common {
  animation: commonReveal 0.8s ease-out forwards;
}

.gacha-animation-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.8;
}

.gacha-animation-bg.divine.holy {
  background: radial-gradient(circle, #FFFFFF 0%, #FFFFCC 30%, #FFEB3B 60%, transparent 100%);
  box-shadow: 0 0 60px #FFEB3B, 0 0 120px #FFEB3B, 0 0 180px #FFEB3B;
  animation: pulse 1.5s infinite;
}

.gacha-animation-bg.divine.satanic {
  background: radial-gradient(circle, #FF5722 0%, #D50000 40%, #880E4F 70%, transparent 100%);
  box-shadow: 0 0 60px #D50000, 0 0 120px #D50000, 0 0 180px #D50000;
  animation: pulse 1.5s infinite;
}

.gacha-animation-bg.divine.hell {
  background: radial-gradient(circle, #FF9800 0%, #FF3300 40%, #990000 70%, transparent 100%);
  box-shadow: 0 0 80px #FF3300, 0 0 160px #FF3300, 0 0 240px #FF3300;
  animation: pulse 1.2s infinite;
}

.gacha-animation-bg.mythic {
  background: radial-gradient(circle, #E1BEE7 0%, #9C27B0 50%, transparent 100%);
  box-shadow: 0 0 50px #9C27B0, 0 0 100px #9C27B0, 0 0 150px #9C27B0;
  animation: pulse 2s infinite;
}

.gacha-animation-bg.legendary {
  background: radial-gradient(circle, #FFF9C4 0%, #FFC107 50%, transparent 100%);
  box-shadow: 0 0 40px #FFC107, 0 0 80px #FFC107, 0 0 120px #FFC107;
  animation: pulse 1.8s infinite;
}

.gacha-animation-bg.epic {
  background: radial-gradient(circle, #D1C4E9 0%, #673AB7 50%, transparent 100%);
  box-shadow: 0 0 30px #673AB7, 0 0 60px #673AB7, 0 0 90px #673AB7;
  animation: pulse 1.6s infinite;
}

.gacha-animation-bg.rare {
  background: radial-gradient(circle, #BBDEFB 0%, #2196F3 50%, transparent 100%);
  box-shadow: 0 0 20px #2196F3, 0 0 40px #2196F3, 0 0 60px #2196F3;
  animation: pulse 1.4s infinite;
}

.gacha-animation-ring {
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
  box-shadow: 0 0 15px;
}

.gacha-animation-ring.divine.holy {
  width: 320px;
  height: 320px;
  border-color: #FFD700;
  border-width: 5px;
  box-shadow: 0 0 25px #FFD700;
  animation: rotate 5s linear infinite;
}

.gacha-animation-ring.divine.satanic {
  width: 320px;
  height: 320px;
  border-color: #D50000;
  border-width: 5px;
  box-shadow: 0 0 25px #D50000;
  animation: rotate 5s linear infinite reverse;
}

.gacha-animation-ring.divine.hell {
  width: 340px;
  height: 340px;
  border-color: #FF3300;
  border-width: 6px;
  box-shadow: 0 0 30px #FF3300;
  animation: rotate 4s linear infinite alternate;
}

.gacha-animation-ring.mythic {
  width: 280px;
  height: 280px;
  border-color: #9C27B0;
  box-shadow: 0 0 15px #9C27B0;
  animation: rotate 4s linear infinite;
}

.gacha-animation-ring.legendary {
  width: 240px;
  height: 240px;
  border-color: #FFC107;
  box-shadow: 0 0 15px #FFC107;
  animation: rotate 3.5s linear infinite reverse;
}

.gacha-animation-ring.epic {
  width: 200px;
  height: 200px;
  border-color: #673AB7;
  box-shadow: 0 0 15px #673AB7;
  animation: rotate 3s linear infinite;
}

.gacha-animation-ring.rare {
  width: 160px;
  height: 160px;
  border-color: #2196F3;
  box-shadow: 0 0 15px #2196F3;
  animation: rotate 2.5s linear infinite reverse;
}

.gacha-animation-sparkle {
  position: absolute;
  width: 15px;
  height: 15px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  transform-origin: center center;
}

.gacha-animation-sparkle.s1 {
  top: 10%;
  left: 10%;
  animation: sparkle 2s infinite 0.2s;
  width: 20px;
  height: 20px;
}

.gacha-animation-sparkle.s2 {
  top: 10%;
  right: 10%;
  animation: sparkle 2s infinite 0.5s;
  width: 18px;
  height: 18px;
}

.gacha-animation-sparkle.s3 {
  bottom: 10%;
  left: 10%;
  animation: sparkle 2s infinite 0.8s;
  width: 22px;
  height: 22px;
}

.gacha-animation-sparkle.s4 {
  bottom: 10%;
  right: 10%;
  animation: sparkle 2s infinite 1.1s;
  width: 16px;
  height: 16px;
}

.gacha-animation-sparkle.s5 {
  top: 50%;
  left: 5%;
  animation: sparkle 2s infinite 1.4s;
  width: 25px;
  height: 25px;
}

.gacha-animation-sparkle.s6 {
  top: 50%;
  right: 5%;
  animation: sparkle 2s infinite 1.7s;
  width: 20px;
  height: 20px;
}

.gacha-animation-sparkle.s7 {
  top: 30%;
  left: 50%;
  animation: sparkle 2s infinite 0.3s;
  width: 30px;
  height: 30px;
}

.gacha-animation-sparkle.s8 {
  bottom: 30%;
  left: 50%;
  animation: sparkle 2s infinite 0.9s;
  width: 28px;
  height: 28px;
}

.gacha-animation-sparkle.divine.holy {
  background: #FFFFFF;
  box-shadow: 0 0 30px #FFD700, 0 0 60px #FFD700;
}

.gacha-animation-sparkle.divine.satanic {
  background: #FF5722;
  box-shadow: 0 0 30px #D50000, 0 0 60px #D50000;
}

.gacha-animation-sparkle.divine.hell {
  background: #FF9800;
  box-shadow: 0 0 40px #FF3300, 0 0 80px #FF3300;
}

.gacha-animation-sparkle.mythic {
  background: #E040FB;
  box-shadow: 0 0 20px #9C27B0, 0 0 40px #9C27B0;
}

.gacha-animation-sparkle.legendary {
  background: #FFD700;
  box-shadow: 0 0 15px #FFC107, 0 0 30px #FFC107;
}

.gacha-animation-sparkle.epic {
  background: #B39DDB;
  box-shadow: 0 0 10px #673AB7, 0 0 20px #673AB7;
}

.gacha-animation-sparkle.rare {
  background: #64B5F6;
  box-shadow: 0 0 8px #2196F3, 0 0 16px #2196F3;
}

/* Divine Animation Styles */
.divine-cutscene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 8000;
  pointer-events: none;
  overflow: hidden;
}

.divine-cutscene.holy {
  background-color: rgba(255, 255, 255, 0.95);
}

.divine-cutscene.satanic {
  background-color: rgba(0, 0, 0, 0.95);
}

.divine-cutscene.hell {
  background-color: rgba(50, 0, 0, 0.95);
}

.divine-words-circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.divine-words-circle.holy {
  border: 3px solid #FFD700;
  box-shadow: 0 0 50px #FFD700;
  animation: rotate 20s linear infinite;
}

.divine-words-circle.satanic {
  border: 3px solid #D50000;
  box-shadow: 0 0 50px #D50000;
  animation: rotate 20s linear infinite reverse;
}

.divine-word {
  position: absolute;
  transform-origin: center center;
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 18px;
  width: auto;
  white-space: nowrap;
}

.divine-word.holy {
  color: #FFD700;
  text-shadow: 0 0 10px #FFFFFF;
  animation: holyWords 4s infinite;
}

.divine-word.satanic {
  color: #D50000;
  text-shadow: 0 0 10px #000000;
  animation: satanicWords 4s infinite;
}

.divine-word.hell {
  color: #FF3300;
  text-shadow: 0 0 15px #FF3300;
  animation: hellWords 3s infinite;
  font-family: 'Creepster', cursive;
}

.divine-center-icon {
  position: absolute;
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 80px;
  z-index: 10;
}

.divine-center-icon.holy {
  color: #FFD700;
  text-shadow: 0 0 20px #FFFFFF;
}

.divine-center-icon.satanic {
  color: #D50000;
  text-shadow: 0 0 20px #000000;
}

.divine-center-icon.hell {
  color: #FF3300;
  text-shadow: 0 0 30px #FF3300;
}

.divine-light {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: holyLight 3s infinite;
}

.divine-light.holy {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.5) 50%, transparent 100%);
}

.divine-fire {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, #D50000, #FF5722, transparent);
  animation: satanicFire 4s infinite;
}

.divine-hellfire {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #FF3300, #FF9800, transparent);
  animation: hellFire 3s infinite;
}

/* Divine animation keyframes */
@keyframes holyWords {
  0% { opacity: 0.5; text-shadow: 0 0 5px #FFFFFF; }
  50% { opacity: 1; text-shadow: 0 0 20px #FFFFFF, 0 0 30px #FFD700; }
  100% { opacity: 0.5; text-shadow: 0 0 5px #FFFFFF; }
}

@keyframes satanicWords {
  0% { opacity: 0.5; text-shadow: 0 0 5px #000000; }
  50% { opacity: 1; text-shadow: 0 0 20px #000000, 0 0 30px #D50000; }
  100% { opacity: 0.5; text-shadow: 0 0 5px #000000; }
}

@keyframes hellWords {
  0% { opacity: 0.5; transform: scale(0.9) rotate(-3deg); text-shadow: 0 0 10px #FF3300; }
  25% { opacity: 0.8; transform: scale(1.1) rotate(2deg); text-shadow: 0 0 20px #FF3300, 0 0 30px #FF9800; }
  50% { opacity: 1; transform: scale(1.2) rotate(-2deg); text-shadow: 0 0 30px #FF3300, 0 0 50px #FF9800; }
  75% { opacity: 0.8; transform: scale(1.1) rotate(3deg); text-shadow: 0 0 20px #FF3300, 0 0 30px #FF9800; }
  100% { opacity: 0.5; transform: scale(0.9) rotate(-3deg); text-shadow: 0 0 10px #FF3300; }
}

@keyframes holyLight {
  0% { opacity: 0.5; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

@keyframes satanicFire {
  0% { height: 30%; opacity: 0.7; }
  50% { height: 50%; opacity: 0.9; }
  100% { height: 30%; opacity: 0.7; }
}

@keyframes hellFire {
  0% { height: 40%; opacity: 0.7; transform: scale(1, 0.9); }
  25% { height: 50%; opacity: 0.8; transform: scale(1.05, 1); }
  50% { height: 60%; opacity: 0.9; transform: scale(1.1, 1.1); }
  75% { height: 50%; opacity: 0.8; transform: scale(1.05, 1); }
  100% { height: 40%; opacity: 0.7; transform: scale(1, 0.9); }
}

/* Gacha Button Styles */
.gacha-button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.gacha-btn {
  position: relative;
  overflow: hidden;
  flex: 1;
  padding: 10px;
  background: linear-gradient(45deg, #D2B48C, #CD853F);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.gacha-btn:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E);
  transform: translateY(-2px);
}

.gacha-btn.premium {
  background: linear-gradient(45deg, #E91E63, #9C27B0);
  border: 1px solid #E91E63;
}

.gacha-btn.premium:hover {
  background: linear-gradient(45deg, #F06292, #BA68C8);
  box-shadow: 0 0 15px rgba(233, 30, 99, 0.5);
}

/* Cooldown Styles */

.gacha-btn.cooldown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.gacha-btn.cooldown::after {
  content: attr(data-cooldown);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  z-index: 2;
}

.tower-selector {
  margin-bottom: 20px;
}

.tower-selector label {
  display: block;
  margin-bottom: 8px;
  color: #8B4513;
  font-weight: bold;
}

.tower-selector select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(210, 180, 140, 0.5);
  background: rgba(255, 248, 231, 0.9);
  font-size: 16px;
  color: #8B4513;
  cursor: pointer;
}

.tower-selector select:focus {
  outline: none;
  border-color: #CD853F;
  box-shadow: 0 0 5px rgba(205, 133, 63, 0.5);
}

/* Loadout Styles */
.loadout-content {
  max-width: 800px;
  max-height: 80vh;
}

.selected-loadout-section {
  margin-bottom: 20px;
  background: rgba(210, 180, 140, 0.2);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(210, 180, 140, 0.3);
}

.selected-loadout-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #8B4513;
  font-size: 18px;
  text-align: center;
}

.selected-loadout {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.loadout-slot {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(210, 180, 140, 0.5);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
}

.loadout-slot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(160, 120, 80, 0.3);
}

.loadout-slot.empty::after {
  content: '+';
  font-size: 30px;
  color: rgba(210, 180, 140, 0.7);
}

.loadout-slot canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 5px;
}

.remove-from-loadout {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #F44336;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loadout-slot:hover .remove-from-loadout {
  opacity: 1;
}

.loadout-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.loadout-tab {
  padding: 10px 20px;
  background: linear-gradient(45deg, #D2B48C, #CD853F);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 16px;
}

.loadout-tab:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E);
  transform: translateY(-2px);
}

.loadout-tab.active {
  background: linear-gradient(45deg, #A0522D, #8B4513);
  box-shadow: 0 0 10px rgba(160, 120, 80, 0.5);
}

.loadout-tab-content {
  display: none;
  padding: 20px;
}

.loadout-tab-content.active {
  display: block;
}

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.loadout-tower-header {
  grid-column: 1 / -1;
  background: rgba(210, 180, 140, 0.3);
  padding: 8px 15px;
  border-radius: 8px;
  color: #8B4513;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 10px;
}

.loadout-tower-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  grid-column: 1 / -1;
}

.loadout-item {
  background: rgba(210, 180, 140, 0.2);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  border: 1px solid rgba(210, 180, 140, 0.5);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
}

.loadout-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(160, 120, 80, 0.3);
}

.loadout-item-image {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loadout-item-name {
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 5px;
}

.loadout-item-tier {
  font-size: 12px;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 10px;
  display: inline-block;
}

.loadout-item-desc {
  font-size: 12px;
  color: #A0522D;
  margin-bottom: 10px;
  max-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loadout-item-actions {
  margin-top: auto;
  width: 100%;
}

.add-to-loadout-button {
  background: linear-gradient(45deg, #D2B48C, #CD853F);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  width: 100%;
}

.add-to-loadout-button:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E);
  transform: translateY(-2px);
}

.loadout-item.common {
  border-color: #ccc;
}

.loadout-item.rare {
  border-color: #1E90FF;
}

.loadout-item.epic {
  border-color: #8A2BE2;
}

.loadout-item.legendary {
  border-color: #FFD700;
}

.loadout-item.mythic {
  border-color: #FF5722;
}

.loadout-item.divine {
  border-color: #E91E63;
}

.loadout-item-tier.common {
  background-color: rgba(204, 204, 204, 0.3);
  color: #666;
}

.loadout-item-tier.rare {
  background-color: rgba(30, 144, 255, 0.3);
  color: #1E90FF;
}

.loadout-item-tier.epic {
  background-color: rgba(138, 43, 226, 0.3);
  color: #8A2BE2;
}

.loadout-item-tier.legendary {
  background-color: rgba(255, 215, 0, 0.3);
  color: #B8860B;
}

.loadout-item-tier.mythic {
  background-color: rgba(255, 87, 34, 0.3);
  color: #FF5722;
}

.loadout-item-tier.divine {
  background-color: rgba(233, 30, 99, 0.3);
  color: #E91E63;
}

.loadout-slot.common {
  border-color: #ccc;
  background-color: rgba(204, 204, 204, 0.1);
}

.loadout-slot.rare {
  border-color: #1E90FF;
  background-color: rgba(30, 144, 255, 0.1);
}

.loadout-slot.epic {
  border-color: #8A2BE2;
  background-color: rgba(138, 43, 226, 0.1);
}

.loadout-slot.legendary {
  border-color: #FFD700;
  background-color: rgba(255, 215, 0, 0.1);
}

.loadout-slot.mythic {
  border-color: #FF5722;
  background-color: rgba(255, 87, 34, 0.1);
}

.loadout-slot.divine {
  border-color: #E91E63;
  background-color: rgba(233, 30, 99, 0.1);
}

.inventory-item.mythic {
  border-color: #9C27B0;
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.inventory-item.divine {
  border-color: #FFEB3B;
  box-shadow: 0 0 20px rgba(255, 235, 59, 0.7);
}

.inventory-item.locked {
  border-color: #aaa;
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.05);
}

.inventory-item-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  background: rgba(210, 180, 140, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.inventory-item-image.common {
  background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
}

.inventory-item-image.rare {
  background: linear-gradient(45deg, #bbdefb, #90caf9);
}

.inventory-item-image.epic {
  background: linear-gradient(45deg, #d1c4e9, #b39ddb);
}

.inventory-item-image.legendary {
  background: linear-gradient(45deg, #fff9c4, #ffee58);
}

.inventory-item-image.mythic {
  background: linear-gradient(45deg, #e1bee7, #ce93d8);
}

.inventory-item-image.locked {
  background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
}

.inventory-item-name {
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 5px;
}

.inventory-item-tier {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 5px;
}

.inventory-item-tier.common {
  background: rgba(200, 200, 200, 0.3);
  color: #555;
}

.inventory-item-tier.rare {
  background: rgba(30, 144, 255, 0.2);
  color: #0066CC;
}

.inventory-item-tier.epic {
  background: rgba(138, 43, 226, 0.2);
  color: #6A0DAD;
}

.inventory-item-tier.legendary {
  background: rgba(255, 215, 0, 0.2);
  color: #B8860B;
}

.inventory-item-tier.mythic {
  background: rgba(156, 39, 176, 0.2);
  color: #9C27B0;
}

.inventory-item-tier.divine {
  background: rgba(255, 235, 59, 0.2);
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
  font-weight: bold;
}

.inventory-item-tier.locked {
  background: rgba(0, 0, 0, 0.1);
  color: #777;
}

.inventory-item-description {
  font-size: 12px;
  color: #A0522D;
  margin-top: 5px;
  height: 36px;
  overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .menu-content {
    padding: 30px 20px;
  }

  h1 {
    font-size: 36px;
    margin-bottom: 20px;
  }

  .menu-btn {
    padding: 12px 15px;
    font-size: 16px;
  }

  .map-grid, .shop-grid, .upgrades-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .modal-content {
    padding: 20px;
    width: 95%;
  }

  .gacha-container {
    flex-direction: column;
  }

  .gacha-box-container {
    margin-bottom: 20px;
  }

  .gacha-buttons {
    flex-direction: column;
    align-items: center;
  }

  .gacha-tab {
    padding: 8px 15px;
    font-size: 14px;
  }
}
