/* style.css — cosmetic layer. A reskin (03/04) can restyle this file freely;
   nothing here is required to change for the engine to keep working, since
   engine.js drives brand colors through the --brand-from/--brand-to and
   --accent CSS variables instead of hardcoded values. */

:root {
  --brand-from: #E63946;
  --brand-to: #1D3557;
  --bg: #0B0B12;
  --fg: #F5F5F7;
  --muted: #9A9AA5;
  --card-bg: #16161F;
  --accent: #E63946;
  --accent-soft: rgba(230, 57, 70, 0.16);
  --radius: 18px;
  --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 32px;
}

.site-header {
  width: 100%;
  max-width: var(--max-width);
  padding: 20px 0 8px;
  text-align: center;
}

.logo {
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(90deg, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ad-slot {
  width: 100%;
  max-width: 728px;
  min-height: 60px;
  margin: 12px auto;
  border: 1px dashed #3a3a45;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 8px;
  text-align: center;
}

main {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 12px 0 4px;
  line-height: 1.25;
}

.hero-sub {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 1rem;
}

.input-card {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
}

.input-card h2 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--muted);
}

.field select,
.field textarea,
.field input[type="text"] {
  width: 100%;
  background: #0F0F16;
  border: 1px solid #2c2c37;
  border-radius: 10px;
  color: var(--fg);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.field select:focus,
.field textarea:focus,
.field input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-error {
  color: #FF6B6B;
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1em;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--brand-from), var(--brand-to));
  color: #fff;
}

.btn-secondary {
  background: #232330;
  color: var(--fg);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.privacy-note {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  margin: 12px 0 0;
}

#view-loading, #view-error {
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid #2c2c37;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-message {
  font-size: 1.05rem;
  margin-bottom: 18px;
}

#view-result {
  width: 100%;
}

.result-card {
  width: 100%;
  background: linear-gradient(160deg, var(--accent-soft), var(--card-bg) 60%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.card-emoji { font-size: 3rem; margin-bottom: 6px; }

.card-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.card-gauge { margin: 10px 0 18px; }

.card-gauge-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.card-gauge-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.card-gauge-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}

.card-lines {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 14px 16px;
}

.card-lines li {
  margin-bottom: 10px;
  line-height: 1.45;
  font-size: 0.95rem;
}

.card-lines li:last-child { margin-bottom: 0; }

.card-lines li::before { content: "“"; opacity: 0.5; }
.card-lines li::after { content: "”"; opacity: 0.5; }

.card-extra {
  border: 1px dashed rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 12px 14px;
  font-style: italic;
  font-size: 0.88rem;
  margin-bottom: 14px;
  white-space: pre-line;
}

.card-footer {
  background: var(--accent);
  color: #111;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.card-watermark {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 4px;
}

#result-canvas { display: none; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.result-actions .btn { width: auto; flex: 1 1 auto; }

.premium-box {
  width: 100%;
  margin-top: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.premium-box h3 { margin: 0 0 4px; font-size: 1rem; }
.premium-price { font-size: 1.4rem; font-weight: 800; color: var(--accent); margin: 0 0 8px; }
.premium-sub { color: var(--muted); font-size: 0.82rem; margin: 0 0 14px; }

.premium-form {
  display: flex;
  gap: 8px;
}

.premium-form input {
  flex: 1;
  background: #0F0F16;
  border: 1px solid #2c2c37;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--fg);
  font-size: 0.9rem;
}

.premium-form .btn { width: auto; margin-top: 0; }

.premium-thanks {
  color: #7CE38B;
  font-size: 0.85rem;
  margin-top: 10px;
}

.btn-again { margin-top: 18px; }

.site-footer {
  max-width: var(--max-width);
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 24px;
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.related-tools-label { color: var(--muted); }

.related-tools a {
  color: var(--accent);
  text-decoration: underline;
}

@media (min-width: 540px) {
  h1 { font-size: 2.1rem; }
}
