/* Base Reset & Theme Colors */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f4ff;
  color: #1e1e2f;
  margin: 0;
  padding: 2rem;
}

.container {
  max-width: 900px;
  margin: auto;
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(98, 0, 234, 0.08);
}

/* Header */
header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
  color: #3b0ca3; /* Deep purple */
  text-align: center;
}

header p {
  color: #5f5f7f;
  font-size: 1rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

/* Expandables */
.expandables details {
  margin-bottom: 1rem;
  background: #e8eaff;
  padding: 1rem;
  border-left: 6px solid #6a5acd;
  border-radius: 8px;
}

.expandables summary {
  font-weight: bold;
  cursor: pointer;
}

/* Form Section */
.form-section {
  margin-top: 2rem;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  color: #2c2c4a;
}

input {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 8px;
  border: 1px solid #b5b5d6;
  background: #f9faff;
}

/* Buttons */
.button-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

button {
  flex: 1;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button[type="submit"] {
  background-color: #3b82f6; /* Blue */
  color: white;
}

button[type="submit"]:hover {
  background-color: #2563eb;
}

button[type="button"] {
  background-color: #a855f7; /* Purple */
  color: white;
}

button[type="button"]:hover {
  background-color: #9333ea;
}

/* Output & Logs */
.output-section {
  margin-top: 2rem;
  background: #f0f2ff;
  padding: 1rem;
  border-left: 5px solid #3b82f6;
  border-radius: 10px;
}

pre {
  background: #e2e8f0;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  color: #1a1a2e;
}

/* Error Message */
.error {
  color: #e11d48;
  margin-top: 0.75rem;
  font-weight: bold;
}

#loading-overlay {
  display: none; /* hide initially */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7); /* light overlay */
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid #e0e0e0;
  border-top: 8px solid #4f46e5; /* blue */
  border-right: 8px solid #9333ea; /* purple */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-text {
  font-size: 1.2rem;
  color: #4f46e5; /* blue */
  font-weight: bold;
}

.error {
  color: #b30000;
  background-color: #ffe6e6;
  border: 1px solid #b30000;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
}

textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 8px;
  border: 1px solid #b5b5d6;
  background: #f9faff;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}