/* ─── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0f; --bg2: #111118; --card: #16161f;
  --border: rgba(255,255,255,0.08); --text: #f0efe8;
  --muted: rgba(240,239,232,0.45); --accent: #c9a96e; --accent2: #e8c99a;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-weight: 300; line-height: 1.6; overflow-x: hidden; }

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0a0f; text-align: center; padding: 14px 20px;
  font-size: 0.9rem; font-weight: 500; transform: translateY(-100%);
  transition: transform 0.4s ease;
}
.toast.visible { transform: translateY(0); }

/* ─── Header ─────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px;
  background: rgba(10,10,15,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--text); text-decoration: none; }
.logo-icon { width: 34px; height: 34px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 8px; display: grid; place-items: center; font-size: 15px; color: #0a0a0f; }
nav { display: flex; gap: 2rem; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
nav a:hover { color: var(--text); }
.header-right { display: flex; align-items: center; gap: 12px; }

.usage-badge {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  font-size: 0.75rem; color: var(--muted);
}
.member-badge {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(201,169,110,0.15); border: 1px solid rgba(201,169,110,0.35);
  font-size: 0.75rem; color: var(--accent); font-weight: 500;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; background: var(--accent); color: #0a0a0f; border-radius: 8px; font-size: 0.875rem; font-weight: 500; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: opacity 0.2s; text-decoration: none; }
.btn:hover { opacity: 0.85; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid rgba(201,169,110,0.4); }
.btn-outline:hover { background: rgba(201,169,110,0.08); opacity: 1; }

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 90px 2rem 60px; text-align: center; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 55% at 50% -5%, rgba(201,169,110,0.16) 0%, transparent 70%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.04); font-size: 0.75rem; color: var(--muted); margin-bottom: 1.8rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.6); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; max-width: 780px; margin: 0 auto 1.4rem; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto 2.5rem; }

/* ─── Chat Section ──────────────────────────────────────────────── */
#chat-section { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 48px; }
.chat-container { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: 0 24px 80px rgba(0,0,0,0.4); }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.chat-avatar { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 8px; display: grid; place-items: center; font-size: 14px; color: #0a0a0f; }
.chat-title { font-size: 0.9rem; font-weight: 500; }
.chat-status { font-size: 0.72rem; color: var(--muted); }
.chat-messages { height: 480px; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Messages ─────────────────────────────────────────────────── */
.msg { display: flex; gap: 10px; align-items: flex-start; animation: fadeUp 0.3s ease; }
.msg.user { flex-direction: row-reverse; }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.msg.bot .msg-avatar { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0a0a0f; }
.msg.user .msg-avatar { background: rgba(255,255,255,0.1); color: var(--text); }
.msg-bubble { max-width: 78%; padding: 12px 16px; border-radius: 16px; font-size: 0.88rem; line-height: 1.65; word-break: break-word; }
.msg.bot .msg-bubble { background: #1e1e2a; border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--accent); color: #0a0a0f; border-top-right-radius: 4px; font-weight: 400; }
.typing-dots { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite; }
.typing-dots span:nth-child(2){animation-delay:0.2s} .typing-dots span:nth-child(3){animation-delay:0.4s}
@keyframes bounce { 0%,60%,100%{transform:translateY(0);opacity:0.5} 30%{transform:translateY(-6px);opacity:1} }

/* ─── Suggestion Cards (replaces old small pills) ──────────────── */
.suggestion-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 16px 20px 4px;
  border-top: 1px solid var(--border);
}
.sug-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
}
.sug-card:hover { border-color: rgba(201,169,110,0.45); background: rgba(201,169,110,0.07); transform: translateY(-2px); }
.sug-icon { font-size: 1.25rem; line-height: 1; }
.sug-text { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

/* ─── Chat Input ─────────────────────────────────────────────────── */
.chat-input-area { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.chat-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 12px; padding: 11px 16px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 300; resize: none; min-height: 44px; max-height: 140px; outline: none; transition: border-color 0.2s; line-height: 1.5; }
.chat-input::placeholder { color: var(--muted); }
.chat-input:focus { border-color: rgba(201,169,110,0.4); }
.send-btn { width: 44px; height: 44px; background: var(--accent); color: #0a0a0f; border: none; border-radius: 12px; cursor: pointer; flex-shrink: 0; display: grid; place-items: center; transition: opacity 0.2s; font-size: 18px; }
.send-btn:hover:not(:disabled){ opacity: 0.85; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Export Bar ─────────────────────────────────────────────────── */
#export-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 18px;
  background: rgba(201,169,110,0.08); border: 1px solid rgba(201,169,110,0.25);
  border-radius: 12px;
}
#export-bar.hidden { display: none; }
.export-label { font-size: 0.8rem; color: var(--accent); flex: 1; }
.export-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 500;
  border: 1px solid rgba(201,169,110,0.35); background: transparent;
  color: var(--accent); cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, border-color 0.2s;
}
.export-btn:hover { background: rgba(201,169,110,0.12); border-color: var(--accent); }

/* ─── Section Shared ─────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.section-header h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; margin-bottom: 0.6rem; }
.section-header p { color: var(--muted); font-size: 0.95rem; max-width: 440px; margin: 0 auto; }

/* ─── Pricing Section ─────────────────────────────────────────────── */
#pricing { padding: 80px 2rem; background: var(--bg); border-top: 1px solid var(--border); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; max-width: 860px; margin: 0 auto; }
.pricing-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 0;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
}
.pricing-card:hover { transform: translateY(-4px); border-color: rgba(201,169,110,0.25); }
.pricing-card.featured { border-color: rgba(201,169,110,0.5); background: linear-gradient(160deg, #1a1a24, #16161f); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0a0f; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.plan-name { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.plan-price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 0.3rem; }
.plan-currency { font-size: 1.1rem; font-weight: 500; color: var(--accent); }
.plan-amount { font-size: 2.6rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--text); line-height: 1; }
.plan-period { font-size: 0.8rem; color: var(--muted); }
.plan-orig { font-size: 0.75rem; color: var(--muted); text-decoration: line-through; margin-bottom: 0.2rem; }
.plan-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 1.25rem; min-height: 1.2em; }
.plan-features { list-style: none; margin-bottom: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.plan-features li { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.plan-btn {
  width: 100%; padding: 11px; border-radius: 10px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.875rem; font-weight: 500;
  transition: opacity 0.2s;
}
.pricing-card.featured .plan-btn { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0a0a0f; }
.pricing-card:not(.featured) .plan-btn { background: rgba(201,169,110,0.12); color: var(--accent); border: 1px solid rgba(201,169,110,0.3); }
.plan-btn:hover { opacity: 0.82; }

/* ─── Features Section ─────────────────────────────────────────────── */
#features { border-top: 1px solid var(--border); background: var(--bg2); padding: 80px 2rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.8rem; transition: transform 0.2s, border-color 0.2s; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(201,169,110,0.25); }
.feature-icon { width: 42px; height: 42px; background: rgba(201,169,110,0.1); border-radius: 10px; display: grid; place-items: center; margin-bottom: 1rem; font-size: 18px; }
.feature-card h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

/* ─── Footer ─────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; font-size: 0.78rem; color: var(--muted); }
.redeem-footer-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.76rem;
  transition: border-color 0.2s, color 0.2s;
}
.redeem-footer-btn:hover { border-color: rgba(201,169,110,0.4); color: var(--accent); }

/* ─── Modals ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 2rem; max-width: 480px; width: 100%; position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: color 0.2s, border-color 0.2s;
}
.modal-close:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.modal h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.modal p { color: var(--muted); font-size: 0.87rem; margin-bottom: 1.25rem; line-height: 1.6; }

/* Mini pricing in upgrade modal */
.mini-plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.25rem; }
.mini-plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.mini-plan:hover { border-color: rgba(201,169,110,0.4); background: rgba(201,169,110,0.07); }
.mini-plan.featured { border-color: rgba(201,169,110,0.45); }
.mini-plan-name { font-size: 0.85rem; font-weight: 500; }
.mini-plan-price { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.mini-plan-tag { font-size: 0.68rem; color: #0a0a0f; background: var(--accent); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.modal-skip { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.82rem; font-family: 'DM Sans', sans-serif; padding: 6px 0; width: 100%; text-align: center; transition: color 0.2s; }
.modal-skip:hover { color: var(--text); }

/* Redeem modal */
.redeem-input-row { display: flex; gap: 8px; margin-bottom: 0.75rem; }
.redeem-input {
  flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.06); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; outline: none;
  text-transform: uppercase; letter-spacing: 0.05em;
  transition: border-color 0.2s;
}
.redeem-input:focus { border-color: rgba(201,169,110,0.4); }
.redeem-msg { font-size: 0.82rem; min-height: 1.2em; }
.redeem-msg.ok { color: #4ade80; }
.redeem-msg.err { color: #f87171; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media(max-width: 640px) {
  nav { display: none; }
  .hero { padding: 60px 1.2rem 40px; }
  #chat-section { padding: 0 1rem 48px; }
  .chat-messages { height: 400px; }
  .suggestion-cards { grid-template-columns: repeat(2, 1fr); }
  #pricing { padding: 60px 1.2rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  #features { padding: 60px 1.2rem; }
  #export-bar { flex-direction: column; align-items: stretch; }
  .export-label { text-align: center; }
}
@media(max-width: 400px) {
  .suggestion-cards { grid-template-columns: 1fr; }
}
