/* ── Variables ── */
:root {
  --bg: #fdf6ee;
  --surface: #ffffff;
  --primary: #c8500a;
  --accent: #e8a240;
  --text: #2c1a0e;
  --text-soft: #7a5c43;
  --border: #e8d5be;
  --radius: 12px;
}

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

body {
  background-color: var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  min-height: 100vh;
}

/* ── Layout ── */
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 60px 20px 40px;
}

/* ── Header ── */
header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.tagline {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-soft);
  font-style: italic;
}

/* ── Form Card ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(100, 50, 10, 0.08);
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

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

input::placeholder {
  color: #c4a98a;
}

/* ── Button ── */
.submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: #9e3c06;
}
.submit-btn:active {
  background-color: #7a2e04;
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Generating state ── */
.generating {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-soft);
  font-family: Arial, sans-serif;
  padding: 16px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ── Recipe Card ── */
.recipe-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(100, 50, 10, 0.08);
}

.recipe-card.hidden {
  display: none;
}

/* ── Recipe Content ── */
#recipe-content h2 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 8px;
}

#recipe-content .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

#recipe-content .meta span {
  background: #fdeac7;
  color: var(--primary);
  font-size: 12px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 20px;
}

#recipe-content h3 {
  font-size: 16px;
  color: var(--text);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#recipe-content ul {
  list-style: none;
  padding: 0;
}

#recipe-content ul li {
  padding: 7px 0 7px 20px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px dashed var(--border);
}

#recipe-content ul li:last-child {
  border-bottom: none;
}

#recipe-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.1;
}

#recipe-content ol {
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

#recipe-content ol li {
  counter-increment: steps;
  padding: 10px 0 10px 40px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  border-bottom: 1px dashed var(--border);
}

#recipe-content ol li:last-child {
  border-bottom: none;
}

#recipe-content ol li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

#recipe-content .tip {
  margin-top: 20px;
  padding: 12px 16px;
  background: #fef5e4;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  font-family: Arial, sans-serif;
}

#recipe-content .tip strong {
  color: var(--primary);
}

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 40px;
  font-family: Arial, sans-serif;
}

footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Animation ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .form-card,
  .recipe-card {
    padding: 24px 16px;
  }
  h1 {
    font-size: 28px;
  }
}
