body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f0f0f0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 2rem;
}

.visualization {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.number-columns {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 2rem;
}

.column {
  flex: 1;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.column h3 {
  text-align: center;
  color: #34495e;
  margin-top: 0;
}

.number {
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: #e9ecef;
  border-radius: 4px;
  text-align: center;
  font-family: monospace;
  font-size: 1.2rem;
  transition: background-color 0.3s;
}

.number.active {
  background: #007bff;
  color: white;
}

.controls {
  text-align: center;
  margin: 2rem 0;
}

button {
  padding: 0.8rem 1.5rem;
  margin: 0 0.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background: #0056b3;
}

.polynomial {
  text-align: center;
  margin-top: 2rem;
}

.polynomial h3 {
  color: #34495e;
}

#result {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 1rem;
}

.explanation {
  margin-top: 3rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.explanation h2 {
  color: #2c3e50;
  margin-top: 0;
}

@keyframes highlight {
  0% { background-color: #e9ecef; }
  50% { background-color: #007bff; color: white; }
  100% { background-color: #e9ecef; }
}

.number.calculating {
  animation: highlight 1s ease-in-out;
}