/* =========================================
   MOMENTA - PREMIUM MINIMAL MOBILE-FIRST
   ========================================= */

/* -------------------------
   RESET
------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* -------------------------
   ROOT
------------------------- */
:root {
  --bg-1: #0b0a12;
  --bg-2: #13111d;
  --bg-3: #1a1628;

  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);

  --text-main: #f8f6ff;
  --text-soft: #d6d0e8;
  --text-muted: #a8a1c2;

  --accent-1: #ffbe93;
  --accent-2: #ff97b7;
  --accent-3: #f0d4ff;

  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.34);

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 14px;

  --max-width: 760px;
}

/* -------------------------
   BASE
------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 178, 120, 0.10), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 130, 180, 0.09), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(210, 150, 255, 0.08), transparent 28%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2), var(--bg-3));
  overflow-x: hidden;
  line-height: 1.5;
}

/* -------------------------
   BACKGROUND GLOW
------------------------- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.bg-glow-1 {
  width: 220px;
  height: 220px;
  top: 30px;
  left: -60px;
  background: rgba(255, 180, 120, 0.14);
}

.bg-glow-2 {
  width: 260px;
  height: 260px;
  right: -80px;
  top: 120px;
  background: rgba(255, 120, 180, 0.12);
}

/* -------------------------
   APP WRAPPER
------------------------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 14px 42px;
}

/* -------------------------
   BUTTONS
------------------------- */
button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: all 0.25s ease;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #22141f;
  padding: 14px 18px;
  box-shadow: 0 10px 26px rgba(255, 150, 180, 0.18);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(255, 150, 180, 0.22);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 16px;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-btn {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}

.full-btn {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}

.small-btn {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: 14px;
}

.danger-btn {
  border-color: rgba(255, 110, 110, 0.18);
}

/* -------------------------
   TOPBAR
------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff7f7;
  background: linear-gradient(135deg, rgba(255, 190, 147, 0.22), rgba(255, 151, 183, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-copy h1 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1px;
}

.brand-copy p {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------
   HERO
------------------------- */
.hero {
  text-align: center;
  padding: 12px 4px 20px;
}

.hero-pill {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #ffe6d9;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
}

.hero-title span {
  background: linear-gradient(90deg, #ffffff, #ffd1b0, #ffb5cf, #f0d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 16px;
  white-space: pre-line;
}

/* -------------------------
   MAIN STACK
------------------------- */
.main-stack {
  display: grid;
  gap: 14px;
}

/* -------------------------
   PANELS
------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.section-head {
  margin-bottom: 14px;
}

.section-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffd3bf;
  font-weight: 800;
  margin-bottom: 5px;
}

.section-head h3 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* -------------------------
   INPUTS
------------------------- */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #eee8ff;
  margin-bottom: 7px;
}

.field select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  padding: 12px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.field select:focus,
.field select:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 190, 147, 0.24);
}

.field select option {
  color: #111;
}

.generator-actions {
  margin-top: 14px;
}

/* -------------------------
   EMPTY STATE
------------------------- */
.empty-state {
  min-height: 250px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px 14px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.empty-state.compact {
  min-height: 180px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
  white-space: pre-line;
}

/* -------------------------
   MOMENT CARD
------------------------- */
.moment-card {
  display: grid;
  gap: 12px;
  animation: fadeUp 0.35s ease;
}

.moment-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.moment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff5ef;
  background: linear-gradient(90deg, rgba(255, 190, 147, 0.18), rgba(255, 151, 183, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.moment-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.moment-title {
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff9f8;
}

.moment-line {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.moment-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #ffd5c3;
  font-weight: 800;
  margin-bottom: 7px;
}

.moment-value {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-main);
}

.quote-text {
  color: #fff2f6;
  font-weight: 600;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* -------------------------
   SAVED SECTION
------------------------- */
.saved-list {
  display: grid;
  gap: 12px;
}

.saved-card-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 10px;
  animation: fadeUp 0.3s ease;
}

.saved-card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.saved-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff4ec;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.saved-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff8f5;
}

.saved-row {
  display: grid;
  gap: 4px;
}

.saved-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffd4c0;
  font-weight: 800;
}

.saved-value {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.saved-quote {
  color: #fff0f5;
}

.saved-card-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.saved-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

/* -------------------------
   BRAND NOTE
------------------------- */
.brand-note {
  padding: 8px 6px 2px;
  text-align: center;
}

.brand-note p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

/* -------------------------
   UTILITIES
------------------------- */
.hidden {
  display: none !important;
}

/* -------------------------
   ANIMATION
------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------
   SCROLLBAR
------------------------- */
::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* -------------------------
   TABLET / DESKTOP
------------------------- */
@media (min-width: 700px) {
  .app {
    padding: 22px 20px 56px;
  }

  .topbar {
    margin-bottom: 22px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.15rem;
  }

  .brand-copy h1 {
    font-size: 1.08rem;
  }

  .brand-copy p {
    font-size: 0.82rem;
  }

  .hero {
    padding: 16px 10px 24px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .panel {
    padding: 20px;
    border-radius: 26px;
  }

  .section-head h3 {
    font-size: 1.2rem;
  }

  .input-grid {
    gap: 14px;
  }

  .moment-title {
    font-size: 1.7rem;
  }

  .moment-line {
    padding: 16px;
    border-radius: 20px;
  }

  .moment-value {
    font-size: 1rem;
  }

  .saved-card-item {
    padding: 16px;
    border-radius: 20px;
  }

  .saved-card-title {
    font-size: 1.1rem;
  }
}

@media (min-width: 900px) {
  :root {
    --max-width: 860px;
  }

  .app {
    padding: 28px 22px 60px;
  }

  .hero {
    padding: 20px 16px 28px;
  }

  .hero-btn {
    width: auto;
    min-width: 260px;
    padding-left: 22px;
    padding-right: 22px;
  }

  .panel {
    padding: 22px;
  }

  .moment-title {
    font-size: 1.9rem;
  }

  .brand-note p {
    font-size: 0.92rem;
  }
}