body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  transition: background 0.3s, color 0.3s;
}
body.dark-mode {
  background: #1e1e1e;
  color: #f9f9f9;
}

.container {
  display: flex;
  height: 100vh;
}

.left {
  width: 50%;
  padding: 60px 20px 20px 20px;
  border-right: 1px solid #ccc;
  background: #fff;
  box-sizing: border-box;
}
body.dark-mode .left { background:#2c2c2c; border-color:#555 }

.top-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.search-container input[type="text"] {
  flex: 1;
  padding: 8px;
  font-size: 14px;
}
.search-container label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  white-space: nowrap;
}

#suggestions {
  border: 1px solid #ccc;
  background: #fff;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
}
body.dark-mode #suggestions { background:#333; border-color:#555; color:#f9f9f9; }

.sprite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 96px);
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-start;
}
.sprite-grid img {
  width: 96px;
  height: 96px;
  cursor: pointer;
  object-fit: contain;
  border: 2px solid transparent;
  background: transparent;
  transition: border-color 0.2s ease;
}
.sprite-grid img:hover {
  border-color: #007bff;
}
.sprite-item.active img {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.grid-buttons {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.orden-row {
  display: flex;
  gap: 10px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.orden-row img {
  width: 64px;
  height: 64px;
  cursor: pointer;
  opacity: 0.25;
  transition: opacity 0.2s;
}
.orden-row img.active {
  opacity: 1;
}

.right {
  width: 50%;
  padding: 60px 20px 20px 20px;
  box-sizing: border-box;
}

.teams-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}
.teams-header h3 {
  margin: 0;
}
#delete-all-btn {
  padding: 6px 12px;
  background: #ff4c4c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#delete-all-btn:hover { background:#ff0000; }

.teams-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.team-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}
.pokemon-box {
  width: 96px;
  height: 96px;
  border: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.pokemon-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.delete-row-btn {
  padding: 10px 16px;
  background: #ff4c4c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}
.delete-row-btn:hover { background:#ff0000; }

/* Darkmode Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input { display:none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .4s;
}
input:checked + .slider { background-color: #007bff; }
input:checked + .slider:before { transform: translateX(20px); }