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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: #16213e;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  color: #e94560;
}

.subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: 14px;
}

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #aaa;
  font-size: 14px;
}

input {
  width: 100%;
  padding: 14px 16px;
  font-size: 24px;
  font-family: 'Courier New', monospace;
  border: 2px solid #0f3460;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  text-align: center;
  letter-spacing: 4px;
  transition: border-color 0.3s;
}

input:focus {
  outline: none;
  border-color: #e94560;
}

input.error {
  border-color: #ff6b6b;
}

.result {
  margin-top: 30px;
  padding: 20px;
  background: #0f3460;
  border-radius: 8px;
  text-align: center;
}

.result-label {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

.result-value {
  font-size: 48px;
  font-weight: bold;
  color: #e94560;
}

.result-decimal {
  font-size: 14px;
  color: #888;
  margin-top: 8px;
}

.error-message {
  color: #ff6b6b;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

.fsm-diagram {
  margin-top: 30px;
  padding: 20px;
  background: #0f3460;
  border-radius: 8px;
}

.fsm-diagram h3 {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
  text-align: center;
}

.states {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.state {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #444;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  transition: all 0.3s;
}

.state.active {
  border-color: #e94560;
  background: rgba(233, 69, 96, 0.2);
  transform: scale(1.1);
}

.state-label {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: #888;
}
