/* ============================================================================
   style.css  —  "Juicy Couture" glam theme
   ----------------------------------------------------------------------------
   Hot pink + blush + soft gold. Rounded, playful, girly.
   Colors live in the :root block below — change one line to re-tint the app.
   Fonts are all built into the iPhone (no downloads), so it works offline.
   ============================================================================ */

:root {
  --hot:      #ff3ea5;   /* hot pink (main) */
  --hot-deep: #d81b83;   /* deeper pink for text/accents */
  --blush:    #ffe3f1;   /* soft blush */
  --blush-2:  #ffd0e6;
  --cream:    #fff6fb;   /* page background */
  --gold:     #e6c25f;   /* soft gold accents */
  --gold-deep:#c19a3f;
  --ink:      #5b0f37;   /* deep plum-pink — main text */
  --ink-soft: #a15b81;   /* muted text */
  --white:    #ffffff;

  --shadow:   0 10px 30px rgba(216, 27, 131, 0.18);
  --shadow-sm:0 4px 14px rgba(216, 27, 131, 0.14);
  --radius:   22px;

  --display: "Didot", "Bodoni 72", "Cochin", Georgia, "Times New Roman", serif;
  --script:  "Snell Roundhand", "Segoe Script", cursive;
  --body:    "Avenir Next", "Avenir", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(60% 40% at 100% 0%, #fff0f8 0%, transparent 60%),
    radial-gradient(50% 30% at 0% 5%, #ffe9f4 0%, transparent 55%),
    var(--cream);
  min-height: 100vh;
  /* respect iPhone notch / home bar */
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* ===== Header ============================================================= */
.header {
  text-align: center;
  padding: calc(18px + env(safe-area-inset-top)) 20px 20px;
  background:
    linear-gradient(160deg, var(--hot) 0%, #ff77c2 55%, var(--blush) 130%);
  color: var(--white);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.header::after { /* subtle sparkle */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 25%, rgba(255,255,255,.30) 0 2px, transparent 3px),
    radial-gradient(circle at 65% 70%, rgba(255,255,255,.25) 0 2px, transparent 3px);
  pointer-events: none;
}
.crown {
  font-size: 26px;
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
  margin-bottom: 2px;
}
.header h1 {
  font-family: var(--script);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  margin: 0;
  letter-spacing: .5px;
  text-shadow: 0 2px 8px rgba(140, 10, 74, .35);
}
#tagline {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: lowercase;
  margin: 8px 0 2px;
  opacity: .95;
}

/* ===== Sticky controls =================================================== */
.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 14px 8px;
  background: rgba(255, 246, 251, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--blush-2);
}

.searchRow { display: flex; gap: 8px; align-items: center; }
#search {
  flex: 1;
  font-family: var(--body);
  font-size: 16px;               /* 16px stops iOS zoom-on-focus */
  padding: 12px 16px;
  border: 1.5px solid var(--blush-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  outline: none;
}
#search::placeholder { color: var(--ink-soft); }
#search:focus { border-color: var(--hot); }

.iconBtn {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--white);
  color: var(--hot-deep);
  font-size: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s ease;
}
.iconBtn:active { transform: scale(.9); }
#refreshBtn.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Tabs ============================================================== */
.tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--blush-2);
  background: var(--white);
  color: var(--hot-deep);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.tab.on {
  background: linear-gradient(135deg, var(--hot), var(--hot-deep));
  color: var(--white);
  border-color: var(--hot-deep);
  box-shadow: var(--shadow-sm);
}
.count {
  display: inline-block;
  min-width: 18px; padding: 0 5px;
  margin-left: 2px;
  font-size: 11px; line-height: 18px;
  background: var(--gold);
  color: #4a2c00;
  border-radius: 999px;
}

/* ===== Filters (collapsible) ============================================= */
.filters { margin-top: 10px; }
.filters summary {
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hot-deep);
  cursor: pointer;
  list-style: none;
  padding: 6px 2px;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: "＋ "; }
.filters[open] summary::before { content: "－ "; }

.filterGroup { margin: 8px 0; }
.filterLabel {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--blush-2);
  background: var(--white);
  color: var(--hot-deep);
  cursor: pointer;
  transition: all .12s ease;
}
.chip:active { transform: scale(.94); }
.chip.on {
  background: linear-gradient(135deg, var(--hot), #ff6bb6);
  color: var(--white);
  border-color: var(--hot-deep);
  box-shadow: var(--shadow-sm);
}

/* ===== iOS-style toggles ================================================= */
.toggles { display: flex; flex-direction: column; gap: 12px; margin: 14px 2px 4px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.track {
  position: relative;
  width: 52px; height: 30px;
  border-radius: 999px;
  background: #e9c7db;
  transition: background .2s ease;
  flex: 0 0 auto;
}
.knob {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.toggle input:checked + .track { background: linear-gradient(135deg, var(--hot), var(--hot-deep)); }
.toggle input:checked + .track .knob { transform: translateX(22px); }
.toggleText { font-weight: 600; font-size: 15px; color: var(--ink); }
/* Age toggle glows gold when on */
.toggle.age-on .track { background: linear-gradient(135deg, var(--gold), #f0d074) !important; }
.ageNote { font-size: 12px; color: var(--ink-soft); margin: 4px 2px 2px; }

/* ===== List & cards ===================================================== */
.list {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .3px;
  padding: 2px 4px;
}
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 20px;
  font-size: 15px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  border: 1px solid #ffe6f2;
  position: relative;
  animation: pop .25s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Events get a gold ribbon accent up the left side */
.card.event { border-left: 5px solid var(--gold); }

.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.15;
  margin: 0;
  flex: 1;
  color: var(--ink);
}
.heart {
  flex: 0 0 auto;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--blush-2);
  cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.heart.on { color: var(--hot); }
.heart:active { transform: scale(1.35); }

.when {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--hot-deep);
}
.blurb { margin: 9px 0 0; font-size: 14.5px; line-height: 1.45; color: #6b3654; }

.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--hot-deep);
}
.badge.budget.b-free { background: #e5f7ec; color: #1c9a54; }
.badge.budget.b-low  { background: #fff2d4; color: #a5781a; }
.badge.budget.b-premium { background: #f7e6ff; color: #8b2fbe; }
.badge.age21 { background: #2a2a2a; color: var(--gold); letter-spacing: .5px; }
.badge.live { background: var(--hot); color: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff0f7;
  color: #b24d84;
  border: 1px solid #ffe0ee;
}

.links { display: flex; gap: 8px; margin-top: 12px; }
.link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--blush-2);
  color: var(--hot-deep);
  background: var(--white);
}
.link:active { background: var(--blush); }

/* Copy-my-list button (saved tab) */
.copyBtn {
  align-self: flex-start;
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 999px;
  border: none;
  color: #4a2c00;
  background: linear-gradient(135deg, var(--gold), #f3d783);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.copyBtn:active { transform: scale(.96); }

/* ===== Toast ============================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: linear-gradient(135deg, var(--hot-deep), var(--hot));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
