:root {
  color-scheme: light dark;
  --bg: #f9f5ff;
  --card: #ffffff;
  --border: #d6c2ff;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --text: #2d1b69;
  --text-muted: #675987;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.app {
  width: min(640px, 100%);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 24px 40px -24px rgba(92, 72, 186, 0.4);
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

p {
  margin: 0;
  line-height: 1.7;
}

.input-card,
.output-card {
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-size: 1rem;
  line-height: 1.6;
  font-family: inherit;
}

button {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button#generateButton {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 24px -12px rgba(124, 58, 237, 0.8);
}

button#generateButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -16px rgba(124, 58, 237, 0.9);
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(124, 58, 237, 0.4);
}

button.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 18px -14px rgba(124, 58, 237, 0.6);
}

.output-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

#outputText {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.placeholder {
  color: rgba(45, 27, 105, 0.55);
}

.cta-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

@media (max-width: 540px) {
  body {
    padding: 1.25rem;
  }

  .app {
    padding: 1.5rem;
  }
}
