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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6fa;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2563eb;
}

.subtitle {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

.input-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 24px;
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

input[type="text"],
textarea {
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  resize: vertical;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary {
  flex: 1;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f3f4f6;
  color: #555;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.output-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: none;
}

.output-section.visible {
  display: block;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.output-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}

.btn-copy {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover {
  background: #059669;
}

#output-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
  background: #f8f9fb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  color: #333;
  min-height: 60px;
}

.copy-msg {
  text-align: center;
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-msg.show {
  opacity: 1;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.3rem;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
  }
}
