:root {
  --primary-color: #007bff;
  --bg-color: #f4f7f6;
  --text-color: #333;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

.container {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 650px;
}

h1 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 26px;
  text-align: center;
}

p {
  color: #666;
  text-align: center;
  margin-bottom: 25px;
}

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

input[type="text"] {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
}

button {
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.1s;
}

button:hover:not(:disabled) {
  background-color: #0056b3;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

#loading {
  color: #e67e22;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(230, 126, 34, 0.3);
  border-radius: 50%;
  border-top-color: #e67e22;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#result {
  margin-top: 20px;
  line-height: 1.6;
}

#result h3 {
  margin-top: 0;
  font-size: 18px;
}

#result pre {
  white-space: pre-wrap;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  font-family: inherit;
  font-size: 15px;
  color: #333;
  overflow-x: auto;
}

.success h3 {
  color: #27ae60;
}

.error {
  color: #e74c3c;
  background-color: #fdf0ed;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
}
