/* ============================================================
   LIVINQUOTES — assets/style.css
   ============================================================ */

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg:        #08080f;
  --bg2:       #0f0f1a;
  --surface:   #141420;
  --surface2:  #1e1e2e;
  --surface3:  #252538;
  --border:    rgba(255,255,255,0.07);
  --cyan:      #00e5d4;
  --cyan2:     #00b8aa;
  --cyan-dim:  rgba(0,229,212,0.10);
  --cyan-glow: rgba(0,229,212,0.22);
  --white:     #f2f2fa;
  --grey:      #9898b0;
  --muted:     #55556a;
  --danger:    #ff6b8a;
  --gold:      #f5c842;
  --nav-h:     68px;
  --r:         18px;
  --r-sm:      12px;
}

html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--white); font-family: 'Outfit', sans-serif; }

/* ── APP SHELL ── */
#app { display: flex; flex-direction: column; height: 100dvh; max-width: 430px; margin: 0 auto; position: relative; overflow: hidden; background: var(--bg); }

.page { display: none; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: calc(var(--nav-h) + 20px); }
.page::-webkit-scrollbar { display: none; }
.page.active { display: block; }

/* ── AMBIENT ── */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient-orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.orb1 { width: 320px; height: 320px; background: var(--cyan); top: -100px; right: -100px; opacity: 0.13; }
.orb2 { width: 220px; height: 220px; background: #7b5ea7; bottom: 80px; left: -80px; opacity: 0.14; }
.orb3 { width: 160px; height: 160px; background: var(--cyan); bottom: 220px; right: -50px; opacity: 0.06; }

/* ── STATUS BAR ── */
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 4px; font-size: 12px; font-weight: 500; position: relative; z-index: 10; flex-shrink: 0; }

/* ── TOP BAR ── */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px 14px; position: relative; z-index: 10; flex-shrink: 0; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 36px; height: 36px; background: linear-gradient(135deg, var(--cyan), var(--cyan2)); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 16px var(--cyan-glow); }
.logo-name { font-family: 'Lora', serif; font-size: 20px; font-weight: 600; color: var(--white); letter-spacing: -0.5px; }
.logo-name em { color: var(--cyan); font-style: normal; }
.top-actions { display: flex; gap: 10px; }
.icon-btn { width: 38px; height: 38px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; transition: all 0.2s; }
.icon-btn:active { transform: scale(0.9); }

/* ── SEARCH ── */
.search-wrap { padding: 0 20px 16px; position: relative; z-index: 5; }
.search-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); display: flex; align-items: center; padding: 13px 16px; gap: 10px; transition: border-color 0.2s; }
.search-bar:focus-within { border-color: rgba(0,229,212,0.35); }
.search-icon { font-size: 16px; opacity: 0.4; flex-shrink: 0; }
.search-input { background: none; border: none; outline: none; color: var(--white); font-family: 'Outfit', sans-serif; font-size: 14px; width: 100%; }
.search-input::placeholder { color: var(--muted); }

/* ── SECTION HEADERS ── */
.sec-head { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; margin-bottom: 12px; }
.sec-title { font-size: 15px; font-weight: 600; color: var(--white); letter-spacing: -0.2px; }
.sec-more { font-size: 12px; color: var(--cyan); font-weight: 500; cursor: pointer; }
.mt20 { margin-top: 20px; }
.mb10 { margin-bottom: 10px; }
.mt16 { margin-top: 16px; }

/* ── HERO CARD ── */
.hero-wrap { padding: 0 20px 22px; position: relative; z-index: 5; }
.hero-label { font-size: 10px; font-weight: 600; color: var(--cyan); letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 10px; }
.hero-card { background: linear-gradient(145deg, #111128 0%, #0d1f3c 60%, #0a1a30 100%); border-radius: 22px; padding: 26px 22px 20px; border: 1px solid rgba(0,229,212,0.14); position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03); cursor: pointer; }
.hero-card::before { content: '\201C'; font-family: 'Lora', serif; font-size: 160px; color: rgba(0,229,212,0.06); position: absolute; top: -30px; left: 8px; line-height: 1; pointer-events: none; }
.hero-glow { position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(0,229,212,0.13) 0%, transparent 70%); border-radius: 50%; }
.hero-quote { font-family: 'Lora', serif; font-size: 17px; line-height: 1.72; font-style: italic; color: #dde0f5; position: relative; z-index: 1; margin-bottom: 20px; letter-spacing: 0.1px; }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.hero-tag { background: rgba(0,229,212,0.10); border: 1px solid rgba(0,229,212,0.22); color: var(--cyan); font-size: 11px; font-weight: 500; padding: 5px 12px; border-radius: 20px; }
.hero-acts { display: flex; gap: 8px; }
.act-btn { width: 36px; height: 36px; background: rgba(255,255,255,0.07); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s; }
.act-btn:active { transform: scale(0.86); }
.act-btn.liked { background: rgba(255,107,138,0.15); border-color: rgba(255,107,138,0.3); }
.act-btn.saved { background: var(--cyan-dim); border-color: rgba(0,229,212,0.3); }

/* ── CATEGORY PILLS ── */
.cats-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; margin-bottom: 20px; }
.cats-scroll::-webkit-scrollbar { display: none; }
.cat-pill { flex-shrink: 0; padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap; transition: all 0.2s; border: 1px solid transparent; }
.cat-pill.active { background: var(--cyan); color: #08080f; font-weight: 600; box-shadow: 0 4px 14px rgba(0,229,212,0.28); }
.cat-pill:not(.active) { background: var(--surface); color: var(--grey); border-color: var(--border); }

/* ── QUOTES GRID ── */
.quotes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; margin-bottom: 24px; }
.q-card { border-radius: 16px; padding: 16px 14px 14px; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; cursor: pointer; transition: transform 0.18s; border: 1px solid rgba(255,255,255,0.04); }
.q-card:active { transform: scale(0.95); }
.q-card::before { content: '\201C'; font-family: 'Lora', serif; font-size: 90px; color: rgba(255,255,255,0.04); position: absolute; top: -12px; left: 4px; line-height: 1; }
.q-card.g1 { background: linear-gradient(150deg, #151530, #1e1040); }
.q-card.g2 { background: linear-gradient(150deg, #0c1e32, #0a2a45); }
.q-card.g3 { background: linear-gradient(150deg, #161f10, #1e3018); }
.q-card.g4 { background: linear-gradient(150deg, #2a1020, #1a0a18); }
.q-card.g5 { background: linear-gradient(150deg, #1a1800, #2a2500); }
.q-card.g6 { background: linear-gradient(150deg, #0f2020, #0a2828); }
.q-text { font-family: 'Lora', serif; font-size: 13px; line-height: 1.65; font-style: italic; color: rgba(235,235,250,0.88); position: relative; z-index: 1; flex: 1; margin-bottom: 12px; }
.q-foot { display: flex; justify-content: space-between; align-items: center; }
.q-tag { font-size: 10px; color: rgba(255,255,255,0.3); font-family: 'Outfit', sans-serif; font-style: normal; }
.q-like { font-size: 15px; cursor: pointer; transition: transform 0.15s; }
.q-like:active { transform: scale(1.35); }
.loading-quotes { grid-column: span 2; text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }

/* ── TOOLS GRID ── */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; margin-bottom: 24px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 15px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.tool-card:active { transform: scale(0.95); }
.tool-card.span2 { grid-column: span 2; display: flex; align-items: center; gap: 16px; padding: 20px; background: linear-gradient(135deg, rgba(0,229,212,0.08), rgba(0,229,212,0.02)); border-color: rgba(0,229,212,0.18); }
.tool-emoji { font-size: 28px; margin-bottom: 10px; }
.tool-card.span2 .tool-emoji { font-size: 38px; margin-bottom: 0; flex-shrink: 0; }
.tool-title { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.tool-card.span2 .tool-title { font-size: 15px; color: var(--cyan); }
.tool-sub { font-size: 11px; color: var(--muted); line-height: 1.45; }
.tool-badge { position: absolute; top: 11px; right: 11px; background: var(--cyan); color: #08080f; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.8px; }
.tool-badge.soon { background: var(--surface3); color: var(--grey); }

/* ── DAILY DROP ── */
.daily-wrap { padding: 0 20px; margin-bottom: 24px; }
.daily-card { background: var(--surface); border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.daily-img-wrap { position: relative; width: 100%; min-height: 220px; background: linear-gradient(135deg, #1a1a3e, #0d2a4a); display: flex; align-items: center; justify-content: center; }
.daily-img { width: 100%; display: block; }
.daily-placeholder { display: none; align-items: center; justify-content: center; padding: 40px 24px; min-height: 220px; }
.daily-placeholder-text { font-family: 'Lora', serif; font-size: 16px; font-style: italic; color: rgba(255,255,255,0.45); text-align: center; line-height: 1.7; }
.daily-footer { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.daily-date { font-size: 12px; color: var(--grey); }
.daily-acts { display: flex; gap: 8px; }
.daily-btn { font-size: 13px; color: var(--cyan); font-weight: 500; cursor: pointer; padding: 7px 16px; background: var(--cyan-dim); border-radius: 8px; border: 1px solid rgba(0,229,212,0.2); transition: all 0.2s; }
.daily-btn:active { transform: scale(0.94); }

/* ── MOOD GRID ── */
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 20px; margin-bottom: 24px; }
.mood-card { border-radius: 14px; padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.18s; border: 1px solid rgba(255,255,255,0.04); text-align: center; }
.mood-card:active { transform: scale(0.93); }
.mood-card.m1 { background: linear-gradient(150deg,#1e1040,#150d30); }
.mood-card.m2 { background: linear-gradient(150deg,#0a2030,#081828); }
.mood-card.m3 { background: linear-gradient(150deg,#201010,#300a20); }
.mood-card.m4 { background: linear-gradient(150deg,#102010,#0a2010); }
.mood-card.m5 { background: linear-gradient(150deg,#201808,#302010); }
.mood-card.m6 { background: linear-gradient(150deg,#181828,#101030); }
.mood-emoji { font-size: 26px; }
.mood-name { font-size: 11px; font-weight: 500; color: var(--grey); }

/* ── COLLECTIONS ── */
.collections-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; margin-bottom: 24px; }
.collections-scroll::-webkit-scrollbar { display: none; }
.coll-card { flex-shrink: 0; width: 148px; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; transition: transform 0.18s; }
.coll-card:active { transform: scale(0.95); }
.coll-bg { height: 108px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.coll-bg.cb1 { background: linear-gradient(135deg,#1e1040,#2d1060); }
.coll-bg.cb2 { background: linear-gradient(135deg,#0a2a45,#0d1e32); }
.coll-bg.cb3 { background: linear-gradient(135deg,#1a1800,#302800); }
.coll-bg.cb4 { background: linear-gradient(135deg,#1a0a10,#300a20); }
.coll-info { background: var(--surface); padding: 10px 12px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--r-sm) var(--r-sm); }
.coll-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.coll-count { font-size: 11px; color: var(--muted); }

/* ── PAGE TITLE ── */
.page-title { font-size: 24px; font-weight: 600; padding: 16px 20px 20px; letter-spacing: -0.5px; }
.page-title span { color: var(--cyan); }

/* ── CREATE PAGE ── */
.create-wrap { padding: 0 20px 20px; }
.card-preview { border-radius: 18px; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; position: relative; overflow: hidden; background: linear-gradient(145deg,#111128,#0d1f3c); border: 1px solid rgba(0,229,212,0.15); transition: all 0.3s; margin-bottom: 4px; }
.card-preview-bg { position: absolute; top: -30px; left: 8px; font-family: 'Lora', serif; font-size: 130px; color: rgba(0,229,212,0.06); line-height: 1; }
.preview-quote-text { font-family: 'Lora', serif; font-size: 17px; font-style: italic; line-height: 1.72; text-align: center; color: #dde0f5; position: relative; z-index: 1; }
.card-watermark { position: absolute; bottom: 16px; right: 18px; font-size: 11px; color: rgba(255,255,255,0.2); font-family: 'Outfit', sans-serif; }
.quote-textarea { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; color: var(--white); font-family: 'Lora', serif; font-size: 14px; font-style: italic; line-height: 1.65; resize: none; height: 96px; outline: none; transition: border-color 0.2s; }
.quote-textarea:focus { border-color: rgba(0,229,212,0.35); }
.quote-textarea::placeholder { color: var(--muted); font-style: normal; }
.templates-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.templates-scroll::-webkit-scrollbar { display: none; }
.tpl { flex-shrink: 0; width: 84px; height: 84px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'Lora', serif; font-style: italic; font-size: 12px; color: rgba(255,255,255,0.65); text-align: center; border: 2px solid transparent; cursor: pointer; padding: 8px; transition: all 0.2s; }
.tpl.active { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.create-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; margin-bottom: 12px; }
.create-btn { padding: 14px; border-radius: var(--r-sm); font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.18s; border: none; }
.create-btn:active { transform: scale(0.96); }
.create-btn.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--white); }
.create-btn.primary { background: var(--cyan); color: #08080f; font-weight: 600; grid-column: span 2; box-shadow: 0 4px 18px rgba(0,229,212,0.3); }
.create-tip { background: var(--cyan-dim); border: 1px solid rgba(0,229,212,0.14); border-radius: var(--r-sm); padding: 12px 14px; font-size: 12px; color: var(--grey); line-height: 1.5; }
.create-tip strong { color: var(--cyan); }

/* ── SAVED PAGE ── */
.saved-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 40px; text-align: center; gap: 14px; }
.saved-empty-icon { font-size: 52px; opacity: 0.35; }
.saved-empty-title { font-size: 18px; font-weight: 600; color: var(--grey); }
.saved-empty-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.saved-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; margin-bottom: 24px; }

/* ── PROFILE PAGE ── */
.profile-header { padding: 10px 20px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.profile-avatar { width: 74px; height: 74px; background: linear-gradient(135deg, var(--cyan), var(--cyan2)); border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 6px 24px var(--cyan-glow); }
.profile-name { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.profile-sub { font-size: 13px; color: var(--muted); }
.profile-stats { display: flex; background: var(--surface); border-radius: var(--r-sm); margin: 0 20px 20px; border: 1px solid var(--border); overflow: hidden; }
.stat-item { flex: 1; padding: 16px 10px; text-align: center; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 22px; font-weight: 600; color: var(--cyan); }
.stat-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
.premium-banner { margin: 0 20px 20px; background: linear-gradient(135deg, rgba(245,200,66,0.10), rgba(245,200,66,0.03)); border: 1px solid rgba(245,200,66,0.2); border-radius: var(--r); padding: 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.premium-icon { font-size: 32px; }
.premium-title { font-size: 15px; font-weight: 600; color: var(--gold); margin-bottom: 3px; }
.premium-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.premium-arrow { color: var(--gold); font-size: 20px; margin-left: auto; flex-shrink: 0; }
.settings-list { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.setting-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 15px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: background 0.18s; }
.setting-item:active { background: var(--surface2); }
.setting-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.setting-label { font-size: 14px; font-weight: 400; flex: 1; }
.setting-arrow { color: var(--muted); font-size: 16px; }
.app-version { text-align: center; padding: 10px 20px 20px; font-size: 11px; color: var(--muted); }

/* ── BOTTOM NAV ── */
.bottom-nav { height: var(--nav-h); background: rgba(8,8,15,0.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; padding: 0 4px 8px; flex-shrink: 0; position: relative; z-index: 100; }
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 16px; border-radius: 14px; cursor: pointer; transition: all 0.2s; position: relative; }
.nav-btn:active { transform: scale(0.88); }
.nav-icon-wrap { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 22px; transition: all 0.2s; filter: grayscale(1) opacity(0.38); }
.nav-label { font-size: 10px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-btn.active .nav-icon-wrap { filter: none; }
.nav-btn.active .nav-label { color: var(--cyan); }
.nav-btn.active::before { content: ''; position: absolute; top: 0; width: 20px; height: 2px; background: var(--cyan); border-radius: 0 0 4px 4px; box-shadow: 0 0 8px var(--cyan); }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(8px); z-index: 200; display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet { background: var(--bg2); border-radius: 24px 24px 0 0; width: 100%; padding: 12px 24px 44px; border-top: 1px solid var(--border); transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32,0.72,0,1); }
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; background: var(--surface3); border-radius: 2px; margin: 0 auto 22px; }
.modal-quote { font-family: 'Lora', serif; font-size: 19px; line-height: 1.72; font-style: italic; color: var(--white); margin-bottom: 10px; text-align: center; }
.modal-tag { text-align: center; color: var(--cyan); font-size: 12px; font-weight: 500; margin-bottom: 28px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-btn { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--white); font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.18s; }
.modal-btn:active { transform: scale(0.95); }
.modal-btn.primary { background: var(--cyan); color: #08080f; border-color: var(--cyan); grid-column: span 2; }

/* ── TOAST ── */
.toast { position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(16px); background: var(--surface2); border: 1px solid var(--border); color: var(--white); padding: 10px 22px; border-radius: 20px; font-size: 13px; font-weight: 500; z-index: 999; opacity: 0; pointer-events: none; transition: all 0.28s; white-space: nowrap; backdrop-filter: blur(12px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.page.active > * { animation: fadeUp 0.32s ease both; }
