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

body {
  font-family: 'Inter', sans-serif;
  background: #0a1628;
  color: #fff;
  min-height: 100vh;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  background: linear-gradient(135deg, #0a1628 0%, #112244 100%);
  border-bottom: 3px solid #2563eb;
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: center;
}
.logo-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 6px;
  animation: fadeDown 0.5s ease both;
}
.logo-icon {
  width: 42px; height: 42px; background: #2563eb;
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 900; color: #fff;
}
.logo-text { font-size: 26px; font-weight: 900; letter-spacing: -1px; }
.logo-text span { color: #2563eb; }
.tagline {
  font-size: 12px; color: #93afd4;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.live-dot {
  display: inline-block; width: 7px; height: 7px;
  background: #ef4444; border-radius: 50%;
  margin-right: 5px; animation: pulse 1.5s infinite;
}

/* ── Demo banner ────────────────────────────────────────────── */
.demo-banner {
  background: linear-gradient(90deg, #1e3a6e, #2563eb22);
  border: 1px solid #2563eb55; border-radius: 10px;
  margin: 1rem 1.25rem 0; padding: .65rem 1rem;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: #93afd4;
}
.demo-badge {
  background: #2563eb; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 5px;
  letter-spacing: .06em; flex-shrink: 0;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex; margin: 1rem 1.25rem 0;
  background: #112244; border-radius: 12px; padding: 4px;
  animation: fadeUp 0.4s 0.1s ease both;
}
.tab {
  flex: 1; padding: 10px 0; border-radius: 9px;
  border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: #93afd4;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.tab.active { background: #2563eb; color: #fff; }
.tab:hover:not(.active) { color: #fff; }

/* ── Sections ───────────────────────────────────────────────── */
.section { display: none; padding: 1.1rem 1.25rem; }
.section.active { display: block; animation: fadeUp .3s ease both; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: #112244; border: 1px solid #1e3a6e;
  border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: .85rem;
}

/* ── Form elements ──────────────────────────────────────────── */
.field-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #4a7fc1;
  margin-bottom: 5px; display: block;
}
input[type=text], textarea, select {
  width: 100%; background: #0d1f3c;
  border: 1px solid #1e3a6e; border-radius: 8px;
  padding: 9px 12px; font-size: 13px; color: #fff;
  font-family: inherit; outline: none;
  resize: vertical; transition: border-color .2s;
}
input[type=text]:focus, textarea:focus, select:focus { border-color: #2563eb; }
textarea { min-height: 80px; }
select option { background: #0d1f3c; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.row > * { flex: 1; min-width: 140px; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.badge {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid #1e3a6e; background: #0d1f3c;
  font-size: 11px; font-weight: 600; color: #4a7fc1;
  cursor: pointer; transition: all .15s;
}
.badge.on { background: #1e3a6e; color: #60a5fa; border-color: #2563eb; }

/* ── Generate button ────────────────────────────────────────── */
.generate-btn {
  width: 100%; padding: 13px;
  background: #2563eb; border: none; border-radius: 11px;
  font-size: 15px; font-weight: 700; color: #fff;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
  margin-bottom: .85rem;
}
.generate-btn:hover { background: #1d4ed8; }
.generate-btn:active { transform: scale(.99); }
.generate-btn:disabled { background: #1e3a6e; color: #4a7fc1; cursor: not-allowed; }

/* ── Output box ─────────────────────────────────────────────── */
.output-box {
  display: none;
  background: #112244; border: 1px solid #2563eb;
  border-radius: 14px; padding: 1rem 1.1rem;
  position: relative; animation: fadeUp .4s ease both;
}
.output-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #2563eb; margin-bottom: 8px;
}
.output-text {
  font-size: 13px; line-height: 1.8;
  color: #d4e4ff; white-space: pre-wrap;
}
.copy-btn {
  position: absolute; top: .85rem; right: .85rem;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid #1e3a6e; background: #0d1f3c;
  font-size: 11px; font-weight: 600; color: #60a5fa;
  cursor: pointer; font-family: inherit;
}
.copy-btn:hover { background: #1e3a6e; }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}

/* ── News feed ──────────────────────────────────────────────── */
.feed-controls {
  display: flex; gap: 6px; margin-bottom: .85rem;
  flex-wrap: wrap; align-items: center;
}
.feed-cat {
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid #1e3a6e; background: #0d1f3c;
  font-size: 11px; font-weight: 600; color: #4a7fc1;
  cursor: pointer; transition: all .15s;
}
.feed-cat.on { background: #1e3a6e; color: #60a5fa; border-color: #2563eb; }
.refresh-btn {
  margin-left: auto; padding: 6px 12px;
  border-radius: 8px; border: 1px solid #1e3a6e;
  background: #0d1f3c; font-size: 11px; font-weight: 600;
  color: #60a5fa; cursor: pointer; font-family: inherit;
}
.refresh-btn:hover { background: #1e3a6e; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.news-card {
  background: #112244; border: 1px solid #1e3a6e;
  border-radius: 13px; padding: .9rem 1rem;
  cursor: pointer; transition: border-color .2s, transform .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.news-card:hover { border-color: #2563eb; transform: translateY(-2px); }
.news-source { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #2563eb; }
.news-title { font-size: 13px; font-weight: 600; color: #e8f0ff; line-height: 1.45; }
.news-desc { font-size: 11px; color: #6b8fc2; line-height: 1.5; }
.news-time { font-size: 10px; color: #3d5f8a; margin-top: auto; }
.news-actions { display: flex; gap: 6px; margin-top: 4px; }
.news-act-btn {
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid #1e3a6e; background: transparent;
  font-size: 10px; font-weight: 600; color: #60a5fa;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.news-act-btn:hover { background: #1e3a6e; }
.feed-status { text-align: center; padding: 2.5rem; color: #4a7fc1; font-size: 13px; }

/* ── Demo steps ─────────────────────────────────────────────── */
.demo-steps { display: flex; gap: 8px; margin-bottom: 1rem; flex-wrap: wrap; }
.demo-step {
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid #1e3a6e; background: #0d1f3c;
  font-size: 12px; font-weight: 600; color: #60a5fa;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.demo-step:hover { background: #1e3a6e; }
.step-num {
  background: #2563eb; color: #fff; border-radius: 50%;
  width: 18px; height: 18px; display: flex;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   { 0%,100%{opacity:1;} 50%{opacity:.3;} }
@keyframes fadeDown{ from{opacity:0;transform:translateY(-12px);} to{opacity:1;transform:translateY(0);} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(12px);}  to{opacity:1;transform:translateY(0);} }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .logo-text { font-size: 21px; }
  .section { padding: .9rem 1rem; }
  .generate-btn { font-size: 14px; }
}
