/* Дизайн-система pigmus.online – общая для всех pet-проектов */
:root {
  --bg-primary: #0f1412;
  --bg-secondary: #1a2320;
  --bg-card: #1e2a26;
  --gold: #d4af37;
  --gold-light: #e8c84a;
  --gold-dim: #9a7b2a;
  --text-primary: #e8e4dc;
  --text-secondary: #a8a49c;
  --text-muted: #6a6660;
  --border: #2a3632;
  --accent: #2a4a3a;
  --radius: 12px;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  max-width: 720px;
  width: 100%;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  padding: 3rem 0 2rem;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

textarea, input[type="text"] {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
}

textarea:focus, input:focus {
  outline: none;
  border-color: var(--gold);
}

button {
  background: var(--gold);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

button:hover { background: var(--gold-light); }
button:active { transform: scale(0.98); }
button:disabled { background: var(--gold-dim); cursor: not-allowed; }

.result {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 1rem;
  display: none;
}

.result.visible { display: block; }

.result h3 {
  font-family: var(--font-heading);
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.spinner {
  display: none;
  text-align: center;
  padding: 1rem;
  color: var(--text-secondary);
}

.spinner.active { display: block; }

.spinner::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

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

.error {
  color: #e74c3c;
  padding: 1rem;
  background: rgba(231, 76, 60, 0.1);
  border-radius: var(--radius);
  display: none;
  margin-top: 1rem;
}

.error.visible { display: block; }

.select-group {
  margin-bottom: 1rem;
}

select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  appearance: none;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .container { padding: 1rem; }
  header h1 { font-size: 1.6rem; }
}