/* ==================== GLOBAL STYLES ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== NAVBAR ==================== */

.navbar {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-title {
  font-size: 1.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.navbar-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #aaa;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-bottom-color: #667eea;
}

/* ==================== MAIN CONTENT ==================== */

main {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==================== GAME PAGE ==================== */

.game-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  margin-left: 0%;
  width: 100%;
}

.egg-area {
  margin-bottom: 2rem;
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.egg-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lorsque l'oeuf est éclos, cacher l'oeuf et son overlay (crack) mais garder l'underlay (rareté) */
.egg-wrapper.hatched .egg-image,
.egg-wrapper.hatched .egg-overlay {
  display: none;
}

.egg-underlay {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.egg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.egg-image:hover {
  transform: scale(1.05);
}

.egg-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  display: none;
}

.egg-overlay.show {
  display: block;
}

.game-info {
  margin-bottom: 2rem;
}

.clicks-info {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
}

.clicks-info p {
  margin: 0.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid #667eea;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.hatched-pokemon-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  text-align: center;
  display: none;
}

.hatched-pokemon-overlay.show {
  display: block;
}

.hatched-pokemon-overlay img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: slideIn 0.5s ease;
}

.hatched-pokemon-overlay p {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  margin-top: 1rem;
}

/* Legacy class for backwards compatibility */
.hatched-pokemon {
  display: none;
}

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

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

.action-button-container {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 1rem;
  min-height: 50px;
}

.egg-button,
.next-egg-button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.egg-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.egg-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.egg-button:active {
  transform: translateY(0);
}

.next-egg-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.next-egg-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

/* ==================== POKEDEX PAGE ==================== */

.pokedex-container {
  width: 100%;
  max-width: 100%;
  margin-left: 0%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.progress-section {
  margin-bottom: 2rem;
  text-align: center;
}

.progress-section h2 {
  margin-bottom: 1rem;
  color: #333;
}

.progress-stats {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.progress-stats p {
  margin-bottom: 0.5rem;
}

.filters-section {
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.filter-checkboxes {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.pokedex-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.pokemon-entry {
  text-align: center;
  padding: 1rem;
  border-radius: 10px;
  background: #f9f9f9;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pokemon-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pokemon-entry.uncaught {
  opacity: 0.7;
}

.pokemon-sprite {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
  margin-bottom: 0.5rem;
  filter: brightness(1);
}

.pokemon-entry.uncaught .pokemon-sprite {
  filter: brightness(0);
}

.pokemon-name {
  font-weight: bold;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.pokemon-index {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.pokemon-info-button {
  padding: 0.5rem 1rem;
  background: #ccc;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.pokemon-entry.uncaught .pokemon-info-button {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
}

.pokemon-entry.caught .pokemon-info-button {
  background: #667eea;
  color: white;
  cursor: pointer;
}

.pokemon-entry.caught .pokemon-info-button:hover {
  background: #764ba2;
}

/* ==================== MODAL ==================== */

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

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #000;
}

.modal-pokemon-info {
  /*display: flex;*/
  gap: 2rem;
  margin: 2rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-sprite,
.modal-egg {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  background: #f5f5f5;
  padding: 10px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.modal-details {
  margin: 2rem 0;
  text-align: left;
}

.modal-details p {
  margin: 0.8rem 0;
  font-size: 0.95rem;
}

.close-button,
.modal-close {
  padding: 0.8rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-top: 1rem;
  width: 100%;
}

.close-button:hover {
  background: #764ba2;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.button-secondary,
.button-danger {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.button-secondary {
  background: #ccc;
  color: #333;
}

.button-secondary:hover {
  background: #bbb;
}

.button-danger {
  background: #f5576c;
  color: white;
}

.button-danger:hover {
  background: #d63447;
}

/* ==================== OPTIONS PAGE ==================== */

.options-container {
  width: 100%;
  max-width: 100%;
  margin-left: 0%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.options-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.options-section:last-child {
  border-bottom: none;
}

.options-section h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.language-buttons {
  display: flex;
  gap: 1rem;
}

.lang-button {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-button:hover {
  border-color: #667eea;
}

.lang-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

/* ==================== DARK MODE TOGGLE ==================== */

.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 70px;
  height: 35px;
}

.toggle-input {
  display: none;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 28px;
  width: 28px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-input:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(35px);
}

.toggle-status {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  min-width: 60px;
}

/* ==================== IDLE MODE TOGGLE ==================== */

.idle-mode-toggle {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.info-icon {
  cursor: help;
  color: #667eea;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.info-icon:hover {
  color: #764ba2;
}

.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  margin-left: 0.5rem;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.option-button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  font-weight: bold;
}

.export-button,
.import-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.export-button:hover,
.import-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.delete-button {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
  color: white;
}

.delete-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.button-danger:active,
.delete-button:active {
  transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .navbar-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  main {
    padding: 1rem;
  }

  .game-container,
  .pokedex-container,
  .options-container {
    padding: 1.5rem;
  }

  .pokedex-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .filter-checkboxes {
    flex-direction: column;
    gap: 1rem;
  }

  .language-buttons {
    flex-direction: column;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-pokemon-info {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .navbar-title {
    font-size: 1.5rem;
  }

  .navbar-links {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .game-container {
    padding: 1rem;
  }

  .egg-wrapper {
    width: 150px;
    height: 150px;
  }

  .pokedex-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .pokemon-entry {
    padding: 0.5rem;
  }

  .pokemon-sprite {
    width: 80px;
    height: 80px;
  }

  .modal-content {
    width: 95%;
    padding: 1rem;
  }
}

/* ==================== FULL SCREEN MODALS ==================== */

.full-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.modal-container {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 2rem;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.8rem;
}

.modal-close-btn {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: #333;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modal-close-btn:hover {
  transform: rotate(90deg);
  box-shadow: 0 5px 15px rgba(250, 112, 154, 0.4);
}

.shop-balance {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
}

.shop-balance p {
  margin: 0;
  font-size: 1.2rem;
}

.confirmation-modal {
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmation-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.confirmation-content h3 {
  margin-top: 0;
  color: #333;
}

.confirmation-content p {
  color: #666;
  margin: 1rem 0;
}

/* ==================== SHOP PAGE ==================== */

.shop-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 1200px;
  width: 100%;
}

.shop-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.shop-header h2 {
  margin: 0;
  color: #333;
}

.shop-balance {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: bold;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.shop-item {
  background: white;
  border: 2px solid #ddd;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.shop-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.item-sprite {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.shop-item h3 {
  margin: 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.item-level,
.item-quantity,
.item-price {
  margin: 0.5rem 0;
  color: #666;
  font-size: 0.95rem;
}

.item-price {
  font-weight: bold;
  color: #667eea;
  font-size: 1.1rem;
}

.item-description {
  margin: 0.7rem 0;
  color: #555;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
  min-height: 2.8em;
}

/* ==================== INVENTORY PAGE ==================== */

.inventory-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 1200px;
  width: 100%;
}

.inventory-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.inventory-header h2 {
  margin: 0;
  color: #333;
}

.inventory-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: bold;
}

.stat-box p {
  margin: 0;
}

.inventory-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.inventory-item {
  background: white;
  border: 2px solid #ddd;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inventory-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.item-info {
  width: 100%;
}

.empty-inventory {
  grid-column: 1 / -1;
  padding: 3rem;
  color: #999;
  font-size: 1.2rem;
}

.modal {
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.modal-buttons button {
  padding: 0.8rem 2rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ==================== STATS DISPLAY ==================== */

.stats-display {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: bold;
}

.stat-item p {
  margin: 0;
}

.stat-item.stat-small {
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
}

/* ==================== COMMON BUTTON STYLES ==================== */

.buy-button,
.back-button,
.inventory-button,
.shop-button,
.use-button,
.confirm-button,
.cancel-button {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-button,
.use-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-top: 1rem;
}

.buy-button:hover:not(:disabled),
.use-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.buy-button:active,
.use-button:active {
  transform: translateY(0);
}

.buy-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.back-button,
.inventory-button,
.shop-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.back-button:hover,
.inventory-button:hover,
.shop-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.back-button:active,
.inventory-button:active,
.shop-button:active {
  transform: translateY(0);
}

.confirm-button {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #333;
}

.confirm-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(132, 250, 176, 0.4);
}

.cancel-button {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: #333;
}

.cancel-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(250, 112, 154, 0.4);
}

a {
  color: white;
}

/* ==================== NEW POKÉMON MODAL ==================== */

.new-pokemon-modal-content {
  max-width: 600px;
}

.new-pokemon-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.new-pokemon-sprites {
  display: flex;
  justify-content: center;
  gap: 3rem;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
}

.egg-sprite-container,
.pokemon-sprite-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.egg-sprite,
.pokemon-sprite {
  width: 120px;
  height: 120px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sprite-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: bold;
  margin: 0;
}

.new-pokemon-info {
  text-align: center;
  padding: 1rem;
  background: rgba(132, 250, 176, 0.1);
  border-radius: 10px;
  border: 2px solid #84fab0;
}

.new-pokemon-info h3 {
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
  color: #333;
}

.pokemon-types {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.type-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  color: white;
  text-transform: capitalize;
}

.type-badge.normal { background: #A8A878; }
.type-badge.fire { background: #F08030; }
.type-badge.water { background: #6890F0; }
.type-badge.grass { background: #78C850; }
.type-badge.electric { background: #F8D030; color: #333; }
.type-badge.ice { background: #98D8D8; color: #333; }
.type-badge.fighting { background: #C03028; }
.type-badge.poison { background: #A040A0; }
.type-badge.ground { background: #E0C068; color: #333; }
.type-badge.flying { background: #A890F0; }
.type-badge.psychic { background: #F85888; }
.type-badge.bug { background: #A8B820; }
.type-badge.rock { background: #B8A038; }
.type-badge.ghost { background: #705898; }
.type-badge.dragon { background: #7038F8; }
.type-badge.dark { background: #705848; }
.type-badge.steel { background: #B8B8D0; color: #333; }
.type-badge.fairy { background: #EE99AC; color: #333; }

.rarity-display {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

.rarity-display p {
  margin: 0;
  font-size: 1rem;
  color: #555;
}

.rarity-star {
  color: #FFD700;
  font-size: 1.2rem;
  margin: 0 0.2rem;
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 2px solid #ddd;
}

.modal-footer button {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

/* ==================== DARK MODE ==================== */

html.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --border-color: #444;
  --card-bg: #252525;
}

html.dark-mode,
html.dark-mode body {
  background: #1a1a1a;
  color: #e0e0e0;
}

html.dark-mode .container {
  background: #1a1a1a;
}

html.dark-mode .navbar {
  background: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid #444;
}

html.dark-mode .nav-link {
  color: #999;
}

html.dark-mode .nav-link:hover,
html.dark-mode .nav-link.active {
  color: #e0e0e0;
}

html.dark-mode .game-container,
html.dark-mode .pokedex-container,
html.dark-mode .options-container,
html.dark-mode .credits-container,
html.dark-mode .changelog-container {
  background: rgba(37, 37, 37, 0.95);
  color: #e0e0e0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

html.dark-mode .game-container h2,
html.dark-mode .pokedex-container h2,
html.dark-mode .options-container h2,
html.dark-mode .credits-container h2,
html.dark-mode .changelog-container h2 {
  color: #e0e0e0;
}

html.dark-mode .game-container h1,
html.dark-mode .pokedex-container h1,
html.dark-mode .options-container h1,
html.dark-mode .credits-container h1,
html.dark-mode .changelog-container h1 {
  color: #e0e0e0;
}

html.dark-mode .progress-section h2,
html.dark-mode .options-section h2 {
  color: #e0e0e0;
}

html.dark-mode .lang-button {
  background: #333;
  color: #e0e0e0;
  border: 2px solid #444;
}

html.dark-mode .lang-button:hover {
  border-color: #667eea;
}

html.dark-mode .lang-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

html.dark-mode .toggle-status {
  color: #e0e0e0;
}

html.dark-mode .options-section {
  border-bottom-color: #444;
}

html.dark-mode .dex-table {
  background: #252525;
  color: #e0e0e0;
}

html.dark-mode .dex-table tr:nth-child(even) {
  background: rgba(60, 60, 60, 0.5);
}

html.dark-mode .dex-table th {
  background: #333;
  color: #e0e0e0;
  border-bottom: 2px solid #444;
}

html.dark-mode .dex-table td {
  border-bottom: 1px solid #444;
}

html.dark-mode .search-bar,
html.dark-mode input[type="text"],
html.dark-mode input[type="number"],
html.dark-mode select {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .search-bar::placeholder,
html.dark-mode input[type="text"]::placeholder {
  color: #999;
}

html.dark-mode .filter-buttons button {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .filter-buttons button:hover,
html.dark-mode .filter-buttons button.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

html.dark-mode .modal-content {
  background: #252525;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .modal-content h3 {
  color: #e0e0e0;
}

html.dark-mode .button-secondary {
  background: #444;
  color: #e0e0e0;
}

html.dark-mode .button-secondary:hover {
  background: #555;
}

html.dark-mode .credits-container,
html.dark-mode .changelog-container {
  background: rgba(37, 37, 37, 0.95);
}

html.dark-mode .credits-container h2,
html.dark-mode .changelog-container h2 {
  color: #e0e0e0;
}

html.dark-mode .credits-container p,
html.dark-mode .changelog-container p,
html.dark-mode .changelog-container li {
  color: #b0b0b0;
}

html.dark-mode .credits-section {
  border-bottom: 1px solid #444;
}

html.dark-mode .changelog-entry {
  background: #333;
  border: 1px solid #444;
  color: #e0e0e0;
}

html.dark-mode .pokemon-name {
  color: #000;
}

html.dark-mode .pokemon-details {
  background: #252525;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .pokemon-details h3 {
  color: #e0e0e0;
}

html.dark-mode .pokemon-details p {
  color: #b0b0b0;
}
/* Dark mode - Clics */
html.dark-mode .clicks-info {
  color: #e0e0e0;
}

html.dark-mode .clicks-info p {
  color: #e0e0e0;
}

/* Dark mode - Modales */
html.dark-mode .modal-content {
  background: #252525;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .modal-content h2,
html.dark-mode .modal-content h3 {
  color: #e0e0e0;
}

html.dark-mode .modal-content p {
  color: #b0b0b0;
}

html.dark-mode .modal-close {
  color: #999;
}

html.dark-mode .modal-close:hover {
  color: #e0e0e0;
}

html.dark-mode .modal-details {
  color: #b0b0b0;
}

html.dark-mode .modal-details p {
  color: #b0b0b0;
}

html.dark-mode .modal-sprite,
html.dark-mode .modal-egg {
  background: #333;
}

html.dark-mode .full-modal {
  background-color: rgba(0, 0, 0, 0.9);
}

html.dark-mode .modal-container {
  background: rgba(37, 37, 37, 0.98);
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .modal-header {
  border-bottom-color: #444;
}

html.dark-mode .modal-header h2 {
  color: #e0e0e0;
}

html.dark-mode .modal-close-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

html.dark-mode .hatched-pokemon-overlay {
  background: rgba(37, 37, 37, 0.95);
}

html.dark-mode .hatched-pokemon-overlay p {
  color: #667eea;
}

html.dark-mode #newPokemonName {
  color: #ffffff;
}

html.dark-mode #newPokemonRarity {
  color: #ffffff;
}

html.dark-mode .rarity-display p {
  color: #ffffff;
}

html.dark-mode .inventory-item,
html.dark-mode .shop-item {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
}

html.dark-mode .inventory-item p,
html.dark-mode .shop-item p {
  color: #b0b0b0;
}

html.dark-mode .info-icon {
  color: #9aa5ce;
}

html.dark-mode .info-icon:hover {
  color: #b0c4ff;
}

html.dark-mode .tooltip {
  background: rgba(50, 50, 50, 0.95);
  color: #e0e0e0;
  border: 1px solid #555;
}
/* ==================== SPRITE SELECTOR ==================== */

.sprite-version-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sprite-version-selector label {
  font-size: 1rem;
  color: #333;
}

.option-select {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option-select:hover {
  border-color: #667eea;
}

.option-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

html.dark-mode .option-select {
  background: #2a2a2a;
  color: #e0e0e0;
  border-color: #555;
}

html.dark-mode .option-select:hover {
  border-color: #667eea;
}

html.dark-mode .sprite-version-selector label {
  color: #e0e0e0;
}

/* ==================== REDEEM CODE PAGE ==================== */

.redeem-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.code-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
}

.code-section h1 {
  text-align: center;
  color: #333;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.code-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.code-input-wrapper label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.code-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  color: #333;
  transition: all 0.3s ease;
}

.code-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.redeem-button {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.redeem-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.redeem-button:active {
  transform: translateY(0);
}

.code-status {
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.code-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.code-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== REWARDS MODAL ==================== */

.rewards-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rewards-modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.close-rewards {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-rewards:hover {
  color: #333;
}

.rewards-modal-content h2 {
  text-align: center;
  color: #333;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.rewards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.reward-section {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 1.5rem;
  border: 2px solid #e0e0e0;
}

.reward-section h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
  font-weight: 600;
}

.rewards-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reward-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  justify-content: space-between;
}

.reward-sprite {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.pokemon-sprite {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.reward-name {
  flex: 1;
  font-weight: 600;
  color: #333;
}

.reward-quantity {
  font-weight: 700;
  color: #667eea;
  min-width: 60px;
  text-align: right;
}

.close-modal-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.close-modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==================== DARK MODE - REDEEM CODE ==================== */

html.dark-mode .code-section {
  background: rgba(45, 45, 45, 0.95);
}

html.dark-mode .code-section h1 {
  color: #e0e0e0;
}

html.dark-mode .code-input-wrapper label {
  color: #e0e0e0;
}

html.dark-mode .code-input {
  background: #2a2a2a;
  color: #e0e0e0;
  border-color: #555;
}

html.dark-mode .code-input:focus {
  border-color: #667eea;
}

html.dark-mode .code-status.success {
  background: #1e5631;
  color: #90ee90;
  border-color: #2d7a3c;
}

html.dark-mode .code-status.error {
  background: #5a1f1f;
  color: #ff6b6b;
  border-color: #7a2f2f;
}

html.dark-mode .rewards-modal-content {
  background: #2a2a2a;
  color: #e0e0e0;
}

html.dark-mode .rewards-modal-content h2 {
  color: #e0e0e0;
}

html.dark-mode .reward-section {
  background: #3a3a3a;
  border-color: #555;
}

html.dark-mode .reward-section h3 {
  color: #e0e0e0;
}

html.dark-mode .reward-item {
  background: #2a2a2a;
  border-color: #555;
  color: #e0e0e0;
}

html.dark-mode .reward-name {
  color: #e0e0e0;
}

html.dark-mode .reward-quantity {
  color: #667eea;
}

html.dark-mode .close-rewards {
  color: #999;
}

html.dark-mode .close-rewards:hover {
  color: #e0e0e0;
}

/* ==================== GUIDE PAGE STYLES ==================== */

.guide-container {
  color: white;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.guide-container article {
  line-height: 1.8;
}

.guide-container h1 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 2em;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 10px;
}

.guide-container h2 {
  margin-top: 40px;
  margin-bottom: 15px;
  font-size: 1.5em;
  color: #4a90e2;
  border-left: 4px solid #4a90e2;
  padding-left: 10px;
}

.guide-container p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.guide-container ul {
  margin-left: 25px;
  margin-bottom: 20px;
  list-style-position: inside;
}

.guide-container ul li {
  margin-bottom: 10px;
  padding-left: 10px;
}

.guide-container ul li strong {
  color: #4a90e2;
  font-weight: 600;
}

/* Dark mode support for guide */
html.dark-mode .guide-container {
  color: #e0e0e0;
}

html.dark-mode .guide-container h1,
html.dark-mode .guide-container h2 {
  color: #64b5f6;
}

html.dark-mode .guide-container h2 {
  border-left-color: #64b5f6;
}

html.dark-mode .guide-container h1 {
  border-bottom-color: #64b5f6;
}

html.dark-mode .guide-container ul li strong {
  color: #64b5f6;
}