* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: start;
}

.wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.controls-section {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  height: fit-content;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #4a5568;
  font-size: 2.5em;
  font-weight: bold;
}

h2 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.5em;
}

#wheelOfFortune {
  position: relative;
  width: 400px;
  height: 400px;
  margin-bottom: 20px;
}

#wheel {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

#spin {
  font: 1.2em/1 sans-serif;
  font-weight: bold;
  user-select: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: #fff;
  color: #4a5568;
  box-shadow: 0 0 0 4px #4a5568, 0 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  transition: 0.3s;
  z-index: 10;
}

#spin:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 0 4px #667eea, 0 8px 25px rgba(0, 0, 0, 0.4);
}

#spin::after {
  content: "";
  position: absolute;
  top: -10px;
  border: 8px solid transparent;
  border-bottom-color: #4a5568;
  border-top: none;
}

.add-item {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-item input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.add-item input:focus {
  outline: none;
  border-color: #667eea;
}

.add-item button {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.add-item button:hover {
  background: #5a67d8;
}

.add-item button:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.items-list {
  max-height: 300px;
  overflow-y: auto;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f7fafc;
  border-radius: 8px;
  border-left: 4px solid var(--item-color);
}

.item-label {
  font-weight: 500;
  flex: 1;
}

.item-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-btn {
  padding: 6px 12px;
  background: #fed7d7;
  color: #c53030;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.3s;
}

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

.result {
  text-align: center;
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  padding: 15px;
  background: #f0fff4;
  border: 2px solid #68d391;
  border-radius: 10px;
  color: #22543d;
}

.empty-state {
  text-align: center;
  color: #a0aec0;
  font-style: italic;
  padding: 40px;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #wheelOfFortune {
    width: 300px;
    height: 300px;
  }
}
