body {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background: #181c1f;
  color: #f0f0f0;
}

body.light-mode {
  background: #f0f0f0;
  color: #222;
}

.container {
  margin-top: 60px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #d32f2f;
  font-size: 2em;
}

body.dark h1 {
  color: #ef5350;
}

.section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark .section {
  background: #23272a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #1976d2;
  font-size: 1.3em;
}

body.dark h2 {
  color: #90caf9;
}

.help-text {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 15px;
}

body.dark .help-text {
  color: #aaa;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #1976d2;
}

body.dark input[type="text"] {
  background: #2c2f33;
  border-color: #444;
  color: #f0f0f0;
}

body.dark input[type="text"]:focus {
  border-color: #90caf9;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-weight: 600;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

#addBtn {
  background: #4caf50;
  color: white;
}

#addBtn:hover {
  background: #45a049;
}

.generate-btn {
  width: 100%;
  padding: 15px;
  background: #d32f2f;
  color: white;
  font-size: 1.1em;
  margin-top: 10px;
}

.generate-btn:hover {
  background: #c62828;
}

.participants-list,
.exclusions-list {
  margin-top: 15px;
}

.participant-item,
.exclusion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #f5f5f5;
  border-radius: 8px;
  border-left: 4px solid #1976d2;
}

body.dark .participant-item,
body.dark .exclusion-item {
  background: #2c2f33;
  border-left-color: #90caf9;
}

.participant-name {
  font-weight: 500;
}

.remove-btn {
  background: #f44336;
  color: white;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #d32f2f;
}

.exclusion-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.exclusion-selector select {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  background: white;
  color: #222;
}

body.dark .exclusion-selector select {
  background: #2c2f33;
  border-color: #444;
  color: #f0f0f0;
}

.add-exclusion-btn {
  background: #ff9800;
  color: white;
  padding: 8px 16px;
}

.add-exclusion-btn:hover {
  background: #f57c00;
}

.empty-text {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

body.dark .empty-text {
  color: #666;
}

.results-section {
  background: #e8f5e9;
  border: 2px solid #4caf50;
}

body.dark .results-section {
  background: #1b5e20;
  border-color: #66bb6a;
}

.results-list {
  margin-bottom: 20px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark .result-item {
  background: #2c2f33;
}

.result-giver,
.result-receiver {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.result-label {
  font-size: 0.85em;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
}

body.dark .result-label {
  color: #aaa;
}

.result-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #1976d2;
}

body.dark .result-name {
  color: #90caf9;
}

.result-arrow {
  font-size: 1.5em;
  color: #4caf50;
  font-weight: bold;
}

body.dark .result-arrow {
  color: #66bb6a;
}

.copy-btn,
.reset-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
}

.copy-btn {
  background: #2196f3;
  color: white;
}

.copy-btn:hover {
  background: #1976d2;
}

.reset-btn {
  background: #757575;
  color: white;
}

.reset-btn:hover {
  background: #616161;
}

.hidden {
  display: none;
}

@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }

  .exclusion-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .exclusion-selector select {
    width: 100%;
  }

  .result-item {
    flex-direction: column;
    text-align: center;
  }

  .result-arrow {
    transform: rotate(90deg);
  }
}

