/* ================================================================
   ListingAI — Styles
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --accent:  #F97316;
  --dark:    #0F0F0F;
  --surface: #1A1A1A;
  --card:    #242424;
  --border:  #2A2A2A;
  --muted:   #6B6B6B;
  --light:   #F5F5F5;
  --dim:     #D4D4D4;
  --red:     #F87171;
  --green:   #4ADE80;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────── */
html, body {
  background: var(--dark);
  color: var(--light);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Screens ────────────────────────────────────────────────────── */
.screen         { display: none; flex-direction: column; min-height: 100vh; }
.screen.active  { display: flex; }

/* ── Header ─────────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--dark);
  z-index: 10;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.logo-name { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }
.logo-sub  { font-size: 11px; color: var(--muted); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.quota-text   { font-size: 12px; color: var(--muted); }
.quota-num    { font-weight: 700; color: var(--accent); }
.quota-num.over { color: var(--red); }

.badge-free {
  margin-left: auto;
  background: #1C2A1C; color: var(--green);
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid #2D4A2D;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container    { max-width: 760px; margin: 0 auto; padding: 32px 20px; }
.container-sm { max-width: 420px; margin: 0 auto; padding: 60px 20px; }
.center       { text-align: center; }

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1           { font-size: 22px; font-weight: 700; }
.subtitle    { color: var(--muted); font-size: 14px; margin-top: 8px; }
.emoji-hero  { font-size: 36px; margin-bottom: 14px; }
.label {
  font-size: 12px; color: var(--muted);
  font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; display: block;
  margin-bottom: 8px;
}
.result-label {
  font-size: 11px; color: var(--accent);
  font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 10px;
}
.section-title {
  font-size: 13px; color: var(--muted);
  font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Form ───────────────────────────────────────────────────────── */
.field           { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--light);
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #444; }
select option { background: var(--surface); }
textarea      { resize: vertical; }

#otp-input {
  font-size: 28px;
  letter-spacing: 16px;
  text-align: center;
  padding: 14px;
}
#otp-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Options row ─────────────────────────────────────────────────── */
.options-row { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.options-row > div { flex: 1; min-width: 160px; }

/* ── Platform buttons ───────────────────────────────────────────── */
.platform-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-platform {
  padding: 10px 24px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600; font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-platform.active {
  border-color: var(--accent);
  background: #2A1810;
  color: var(--accent);
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none; border-radius: 10px;
  padding: 14px;
  font-size: 15px; font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.15s;
  margin-top: 16px;
}
.btn:disabled { background: #2A1810; color: var(--accent); cursor: not-allowed; }

.btn-ghost {
  width: 100%; background: transparent;
  color: var(--muted); border: none;
  font-size: 13px; font-family: 'Inter', sans-serif;
  cursor: pointer; padding: 10px; margin-top: 4px;
}

.btn-copy {
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.btn-copy.copied {
  background: #1C2A1C; color: var(--green);
  border-color: #2D4A2D;
}

.btn-upgrade {
  background: var(--accent); color: #000;
  font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
  text-decoration: none; white-space: nowrap;
}

/* ── Messages ───────────────────────────────────────────────────── */
.msg-error {
  background: #2A1010; border: 1px solid #4A2020;
  border-radius: 8px; padding: 12px 16px;
  color: var(--red); font-size: 13px;
  margin-top: 12px;
}
.msg-gen-error {
  background: #2A1010; border: 1px solid #4A2020;
  border-radius: 8px; padding: 12px 16px;
  color: var(--red); font-size: 14px;
  margin-bottom: 16px;
}

/* ── Result ─────────────────────────────────────────────────────── */
.result-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; margin-top: 32px;
}
.res-title { font-size: 16px; font-weight: 600; line-height: 1.4; }
.res-text  { font-size: 14px; line-height: 1.6; color: var(--dim); }
.res-italic { font-style: italic; }
.res-pre    { white-space: pre-line; }

.bullet-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start; }
.bullet-star { color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.keyword-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-tag {
  background: #1C1C1C; border: 1px solid #333;
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; color: #B0B0B0;
}

/* ── Spinner ────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--accent); border-top-color: transparent;
  border-radius: 50%; animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ── Note ───────────────────────────────────────────────────────── */
.note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }

/* ── Hidden ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Spacing ────────────────────────────────────────────────────── */
.mb-20 { margin-bottom: 20px; }
.mb-28 { margin-bottom: 28px; }
.mt-24 { margin-top: 24px; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .container-sm { padding: 40px 16px; }
  .container    { padding: 24px 16px; }
  .options-row  { flex-direction: column; }
  .platform-row { flex-direction: column; }
  .btn-platform { text-align: center; }
}
