:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --primary: #2563eb;
}

body.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e5e7eb;
  --primary: #38bdf8;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- HEADER ---------- */
header {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  padding: 30px 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 1px;
}

header p {
  margin: 6px 0 14px;
  opacity: 0.9;
}

header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

/* ---------- LAYOUT ---------- */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  padding: 35px;
}

/* ---------- CARD ---------- */
.card {
  background: var(--card);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 22px;
}

/* ---------- FORM ELEMENTS ---------- */
input,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

textarea {
  height: 140px;
  resize: vertical;
}

/* ---------- BUTTON ---------- */
button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ---------- OUTPUT ---------- */
pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: 10px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13px;
}

/* ---------- FOOTER SIGNATURE ---------- */
.signature {
  text-align: center;
  padding: 35px 20px;
  margin-top: 40px;
  opacity: 0.9;
}

.signature p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 1px;
}

.signature span {
  display: block;
  margin-top: 8px;
  font-family: "Playfair Display", "Lucida Handwriting", cursive;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 2px;
}
.signature span:hover {
  color: var(--primary);
  cursor: default;
}