:root {
  --navy: #0b1c2d;
  --purple: #3b1e5a;
  --gold: #c5a46d;
  --ivory: #f5f1e8;
  --white: #ffffff;
  --dark: #17202a;
  --muted: #6b7280;
  --error: #b42318;
  --success: #2f6f4e;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(11, 28, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(197, 164, 109, 0.18), transparent 40%),
    linear-gradient(180deg, #f8f5ef 0%, var(--ivory) 100%);
  color: var(--dark);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  padding: 24px 20px 40px;
}

body[dir="rtl"] {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.shell {
  width: min(440px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.lang-btn {
  border: 1px solid rgba(23, 32, 42, 0.12);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.accent {
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 0 0 20px;
}

h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--navy);
  font-weight: 600;
}

.type {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.description {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.55;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.prompt {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--dark);
  font-weight: 600;
}

.actions {
  display: grid;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: var(--radius);
  border: none;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.2px solid var(--navy);
}

.btn-ghost {
  background: rgba(59, 30, 90, 0.06);
  color: var(--purple);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.state {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
}

.state.error {
  color: var(--error);
}

.hidden {
  display: none !important;
}

.composer {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 32, 42, 0.12);
  padding: 14px;
  font: inherit;
  color: var(--dark);
  background: var(--ivory);
}

.footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.reset-title {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--navy);
  font-weight: 600;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.field-input {
  width: 100%;
  min-height: 48px;
  margin: 0 0 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 32, 42, 0.12);
  padding: 12px 14px;
  font: inherit;
  color: var(--dark);
  background: var(--ivory);
}

#formSection .btn-primary,
#requestSection .btn-primary,
#successSection .btn-primary {
  width: 100%;
  margin-top: 4px;
}

#formStatus,
#requestStatus {
  margin-top: 12px;
}
