:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: #e74c3c;
  --background: #ecf0f1;
  --text: #2c3e50;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--background);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 800px;
  width: 100%;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

h1 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.participant-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

input {
  padding: 0.8rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 1rem;
  flex: 1;
}

button {
  padding: 0.8rem 1.5rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, background 0.2s;
}

button:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.participants-list {
  margin-top: 2rem;
}

.participant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  margin-bottom: 0.5rem;
  border-radius: 8px;
  animation: slideIn 0.3s ease-out;
}

.delete-btn {
  background: var(--accent);
  padding: 0.5rem 1rem;
}

#sortButton {
  width: 100%;
  margin-top: 2rem;
  padding: 1rem;
  font-size: 1.2rem;
  background: var(--primary);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
}

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
