body {
  margin: 0;
  padding: 20px;
  font-family: sans-serif;
  background-color: #f0f8ff;
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1000px;
  margin: 0 auto;
}

/* Přesun celé formy a útoků vlevo */
.form-section {
  flex: 1;
  max-width: 450px;
}

.form-section h1 {
  font-size: 20px;
  margin-bottom: 15px;
}

input,
button {
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  width: 100%;
}

button {
  background-color: #4caf50;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

/* Obrázek a jméno vpravo */
.pokemon-display {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start; /* zarovná obsah nahoru */
  min-height: 340px; /* aby měla oblast dostatek místa a neměnila se výška */
}

.pokemon-display h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.pokemon-display img {
  width: 300px;
  height: 300px;
  image-rendering: pixelated;
}

/* Kontejner s obrázkem a tabulkou útoků vedle sebe */
.pokemon-details {
  display: flex;
  gap: 20px;
}

.pokemon-info {
  max-width: 200px;
}

.attack-section {
  flex: 1;
}

.attack-section h3 {
  margin-top: 0;
}

#attack-table {
  width: 100%;
  border-collapse: collapse;
  max-height: 180px;
  overflow-y: auto;
  display: block; 
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  padding: 4px;
}

#attack-table tbody {
  display: block;
  max-height: 180px;
  overflow-y: auto;
}

#attack-table tr {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding: 4px 0;
  width: 100%;
}

#attack-table td {
  flex: 1;
  padding: 4px;
}

#attack-table input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

#attack-table label {
  cursor: pointer;
  user-select: none;
}

/* Vybrané útoky jako rámečky pod tabulkou */
#selected-attacks-container {
  min-height: 40px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.selected-attack-box {
  padding: 4px 8px;
  border: 1px solid #007bff;
  border-radius: 12px;
  background-color: #cce5ff;
  font-size: 0.9em;
  user-select: none;
}

/* Sloty */
#pokemon-slots {
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.slot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #4caf50;
  background-color: #e0f7fa;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s, border-color 0.3s;
}

.slot.empty {
  background-color: #fff;
  border: 2px dashed #aaa;
}

.slot img {
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  pointer-events: none;
}

.slot.selected {
  border-color: #1b5e20;
  background-color: #a5d6a7;
}

.slot-tooltip {
  position: absolute;
  bottom: -25px;
  font-size: 12px;
  color: #333;
  background: #fff;
  border-radius: 4px;
  padding: 2px 6px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.slot:hover .slot-tooltip {
  opacity: 1;
}

/* Potvrzovací tlačítko */
#confirm-slot-btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #2196f3;
  background-color: #2196f3;
  color: white;
  cursor: pointer;
  margin-top: 8px;
  display: block;
  width: 150px;
  margin-left: auto;
  margin-right: auto;
}

#confirm-slot-btn:disabled {
  background-color: #90caf9;
  border-color: #90caf9;
  cursor: not-allowed;
}
.pokemon-details-flex {
  display: flex;
  gap: 20px;
}

.pokemon-image-block {
  flex-shrink: 0;
}

.pokemon-image {
  max-width: 200px;
}

.pokemon-attacks-block {
  flex: 1;
}

.attack-table-container {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 4px;
}

.attack-table {
  width: 100%;
  border-collapse: collapse;
}

.attack-table td {
  padding: 4px;
}

.selected-attacks-container {
  min-height: 40px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attack-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #007bff;
  border-radius: 12px;
  background-color: #cce5ff;
  font-size: 0.9em;
  user-select: none;
  text-align: center;
  min-height: 30px; 
}
.type-icons-container {
  display: flex;
  gap: 4px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}
.type-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  line-height: 24px;
  text-align: center;
  font-size: 12px;
  color: #333;
  border: 1px solid #999;
}
.type-icon.green { background: #a5d6a7; }
.type-icon.orange { background: #ffcc80; }
.type-icon.red { background: #ef9a9a; }
.type-icon.yellow { background: #fff59d; }