body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-color: #fcf1da;
}

header,
footer {
  background: #fef4cc;
  padding: 10px;
  border: 3px solid #aa5045;
  margin: 10px;
}

input,
select,
button {
  background: #fef4cc;
  border: 2px solid #aa5045;
  margin: 15px;
  padding: 5px;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: #333;
}

#enc {
  background: #fef4cc;
  padding: 10px;
  border: 3px solid #aa5045;
  margin: 10px;
}

.monster-card {
  background: #fff;
  border: 2px solid #aa5045;
  border-radius: 5px;
  margin: 10px 0;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.monster-card:hover {
  background: #f0f8ff;
  box-shadow: 0 4px 8px rgba(170, 80, 69, 0.3);
}

.monster-name {
  font-size: 18px;
  font-weight: bold;
  color: #aa5045;
  margin-bottom: 5px;
}

.monster-basic {
  color: #666;
  font-size: 14px;
}

.monster-details {
  display: none;
  margin-top: 15px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 3px;
  border-left: 4px solid #aa5045;
}

.monster-details.show {
  display: block;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}

.stat-block {
  background: #e8e8e8;
  padding: 5px 10px;
  border-radius: 3px;
  margin: 2px;
  flex: 1;
  text-align: center;
}

.loading {
  color: #aa5045;
  font-style: italic;
}

.expand-hint {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.actions,
.special-abilities {
  margin-top: 10px;
}

.action-item,
.ability-item {
  background: #fff;
  padding: 8px;
  margin: 5px 0;
  border-radius: 3px;
  border-left: 3px solid #aa5045;
}

.action-name,
.ability-name {
  font-weight: bold;
  color: #aa5045;
}

/* New styles for save/load functionality */
.encounter-controls {
  background: #fef4cc;
  border: 2px solid #aa5045;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.save-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.save-controls input[type="text"] {
  flex: 1;
  min-width: 200px;
  margin: 5px;
}

.save-controls button {
  margin: 5px;
  padding: 8px 15px;
  background: #aa5045;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.save-controls button:hover {
  background: #8a4035;
}

.saved-encounters {
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid #aa5045;
  padding-top: 10px;
  margin-top: 10px;
}

.saved-encounter-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 10px;
  margin: 5px 0;
  border-left: 4px solid #aa5045;
}

.saved-encounter-item strong {
  color: #aa5045;
  font-size: 16px;
}

.saved-encounter-item button {
  margin: 5px 5px 0 0;
  padding: 5px 10px;
  font-size: 12px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.saved-encounter-item button:first-of-type {
  background: #4caf50;
  color: white;
}

.saved-encounter-item button:first-of-type:hover {
  background: #45a049;
}

.saved-encounter-item button:last-of-type {
  background: #f44336;
  color: white;
}

.saved-encounter-item button:last-of-type:hover {
  background: #da190b;
}

/* Responsive design */
@media (max-width: 768px) {
  .save-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .save-controls input[type="text"] {
    min-width: auto;
    width: 100%;
  }

  .stat-row {
    flex-wrap: wrap;
  }

  .stat-block {
    min-width: 80px;
  }
}
