/* =========================================================
   VibeSnap — styles.css
   Single-page app + pricing section (no external deps)
   ========================================================= */

/* ---------- Theme ---------- */
:root{
  --bg:#0b0c10;
  --bg2:#0a0b12;
  --panel:#111217;
  --panel2:#141625;
  --border:#1f2230;
  --border2:#2b2f45;
  --text:#f5f6fa;
  --muted:#a4a7b3;
  --muted2:#7f8290;

  --accent:#ff7a45;
  --accent2:#ff9a6b;

  --good:#39d98a;
  --bad:#ff6b6b;

  --radius:16px;
  --radius-sm:12px;

  --shadow: 0 22px 60px rgba(0,0,0,.55);
  --shadow-soft: 0 14px 40px rgba(0,0,0,.45);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --container: 1200px;
}

/* ---------- Reset ---------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 520px at 50% -220px, #1b1e35 0%, var(--bg) 60%),
    radial-gradient(700px 420px at 15% 20%, rgba(255,122,69,.14), transparent 60%),
    radial-gradient(700px 420px at 85% 10%, rgba(255,154,107,.10), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}
a{ color:inherit; text-decoration:none; }
button,input,textarea{ font-family:inherit; }
img{ max-width:100%; display:block; }

.container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Topbar ---------- */
.topbar{
  position: sticky;
  top:0;
  z-index:20;
  background: rgba(11,12,16,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31,34,48,.7);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
  user-select:none;
}
.brand:focus{ outline: 2px solid rgba(255,122,69,.45); outline-offset: 3px; border-radius: 10px; }
.brand-mark{
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 10px 20px rgba(255,122,69,.28));
}
.brand-name{
  font-size: 16px;
  text-transform: lowercase;
}

.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.tab{
  border: 1px solid rgba(31,34,48,.9);
  background: rgba(17,18,23,.72);
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  transition: border-color .15s ease, transform .08s ease, color .15s ease, background .15s ease;
}
.tab:hover{
  color: var(--text);
  border-color: rgba(43,47,69,.95);
  background: rgba(20,22,37,.85);
}
.tab:active{ transform: translateY(1px); }
.tab.is-active{
  color: var(--text);
  border-color: rgba(255,122,69,.55);
  background: rgba(255,122,69,.10);
}
.tab-accent{
  color: #1a0f0b;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-weight: 700;
}
.tab-accent:hover{ filter: brightness(1.03); }

/* ---------- Pages ---------- */
.page{ display:none; padding-bottom: 74px; }
.page.page-active{ display:block; }

/* ---------- Hero ---------- */
.hero{
  padding: 48px 0 26px;
}
.hero-compact{
  padding: 38px 0 18px;
}
.hero-inner{
  text-align:center;
}
.hero h1{
  margin: 0 0 10px;
  font-size: clamp(30px, 4.0vw, 44px);
  line-height: 1.06;
  letter-spacing: -.6px;
}
.hero-sub{
  margin: 0 auto 16px;
  max-width: 860px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.pill-row{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap: 8px;
  margin: 12px 0 10px;
}
.pill{
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid rgba(31,34,48,.92);
  background: rgba(17,18,23,.55);
  border-radius: 999px;
}
.hero-privacy{
  margin: 10px auto 0;
  max-width: 860px;
  color: var(--muted2);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Grid Layout ---------- */
.grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items:start;
  padding-top: 16px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card{
  background: linear-gradient(180deg, rgba(20,22,37,.92), rgba(15,17,25,.92));
  border: 1px solid rgba(31,34,48,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.card-lg{
  padding: 18px;
}
.card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.card-title{
  font-size: 16px;
  margin: 0;
  letter-spacing: -.2px;
}
.card-sub{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.card-actions{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* ---------- Buttons / Inputs ---------- */
.btn{
  border: 1px solid rgba(31,34,48,.95);
  background: rgba(17,18,23,.55);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: transform .08s ease, border-color .15s ease, background .15s ease, filter .15s ease;
}
.btn:hover{
  border-color: rgba(43,47,69,.95);
  background: rgba(20,22,37,.70);
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}
.btn-primary{
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a0f0b;
  font-weight: 800;
}
.btn-primary:hover{ filter: brightness(1.03); }
.btn-secondary{
  border: 1px solid rgba(255,122,69,.45);
  background: rgba(255,122,69,.12);
  color: var(--text);
}
.btn-ghost{
  background: transparent;
}
.linklike{
  margin-left: 10px;
  border:none;
  background:none;
  padding:0;
  color: var(--muted);
  font-size: 12px;
  cursor:pointer;
}
.linklike:hover{ color: var(--text); text-decoration: underline; }

.input{
  width: 100%;
  border: 1px solid rgba(31,34,48,.95);
  background: rgba(10,11,18,.55);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}
.input::placeholder{ color: rgba(164,167,179,.55); }

.textarea{
  width:100%;
  min-height: 92px;
  border: 1px solid rgba(31,34,48,.95);
  background: rgba(10,11,18,.55);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}
.field-label{
  display:block;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Editor ---------- */
.editor{
  border: 1px solid rgba(31,34,48,.95);
  border-radius: var(--radius-sm);
  background: rgba(10,11,18,.55);
  overflow:hidden;
}
#codeInput{
  width:100%;
  min-height: 290px;
  padding: 12px 12px 16px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}
#codeInput::placeholder{ color: rgba(164,167,179,.55); }

/* ---------- Rows / Utils ---------- */
.row{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 12px;
}
.row-tight{ margin-top: 10px; }
.row-between{ justify-content:space-between; }
.row-wrap{ flex-wrap: wrap; }
.muted{ color: var(--muted); font-size: 13px; }
.tiny{ font-size: 12px; color: var(--muted2); }

.subsection{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(31,34,48,.85);
}
.subhead{
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: .2px;
}
.tip{
  margin-top: 10px;
  padding: 12px;
  background: rgba(17,18,23,.45);
  border: 1px solid rgba(31,34,48,.85);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.note{
  margin-top: 12px;
  padding: 12px;
  background: rgba(255,122,69,.08);
  border: 1px solid rgba(255,122,69,.28);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
}
.dot{ margin: 0 6px; }

/* ---------- Preview ---------- */
.preview-shell{
  background: #000;
  border: 1px solid rgba(31,34,48,.95);
  border-radius: var(--radius-sm);
  overflow:hidden;
  height: 520px;
  box-shadow: var(--shadow);
}
@media (max-width: 980px){
  .preview-shell{ height: 460px; }
}
#previewFrame{
  width:100%;
  height:100%;
  border:none;
  background:#0b0c10;
}

/* ---------- Chips ---------- */
.chip{
  border: 1px solid rgba(31,34,48,.95);
  background: rgba(17,18,23,.55);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.chip.is-selected{
  border-color: rgba(255,122,69,.55);
  background: rgba(255,122,69,.12);
}

/* ---------- Lists ---------- */
.bullets{
  margin: 10px 0 0;
  padding-left: 18px;
}
.bullets li{
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.list{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.list-item{
  padding: 10px 12px;
  border: 1px solid rgba(31,34,48,.85);
  background: rgba(10,11,18,.40);
  border-radius: var(--radius-sm);
}
.list-item .meta{
  display:flex;
  gap: 8px;
  align-items:center;
  color: var(--muted2);
  font-size: 12px;
  margin-top: 6px;
}

/* ---------- Stats ---------- */
.stats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 520px){
  .stats{ grid-template-columns: 1fr; }
}
.stat{
  text-align:center;
  padding: 14px 12px;
  border: 1px solid rgba(31,34,48,.85);
  background: rgba(10,11,18,.40);
  border-radius: var(--radius-sm);
}
.stat-label{
  color: var(--muted2);
  font-size: 12px;
}
.stat-value{
  margin-top: 6px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.6px;
}

/* ---------- CTA Strip ---------- */
.why{
  padding-top: 16px;
}
.why h2{
  margin: 0 0 8px;
  font-size: 18px;
}
.cta-strip{
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,122,69,.35);
  background: linear-gradient(135deg, rgba(255,122,69,.14), rgba(255,154,107,.06));
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
}
.cta-title{
  font-weight: 900;
  letter-spacing: -.2px;
}
.cta-sub{
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.cta-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
@media (max-width: 820px){
  .cta-strip{ flex-direction:column; align-items:flex-start; }
}

/* ---------- Footer ---------- */
.footer{
  margin-top: 46px;
  padding: 18px 0;
  border-top: 1px solid rgba(31,34,48,.75);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
@media (max-width: 720px){
  .footer-inner{ flex-direction:column; align-items:flex-start; }
}

/* ---------- Pricing ---------- */
.pricing-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
}
.pricing-nav{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.pricing{
  padding-top: 16px;
}

.plan-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px){
  .plan-grid{ grid-template-columns: 1fr; }
}

.plan{
  background: linear-gradient(180deg, rgba(20,22,37,.92), rgba(15,17,25,.92));
  border: 1px solid rgba(31,34,48,.92);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.plan-lifetime{
  border-color: rgba(255,122,69,.60);
  box-shadow: 0 0 0 1px rgba(255,122,69,.25), var(--shadow);
}
.plan-head{ margin-bottom: 10px; }
.plan-name{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.2px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.plan-tag{
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.badge{
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,122,69,.40);
}
.badge-lifetime{
  color: #1a0f0b;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.price{
  margin: 14px 0 12px;
  display:flex;
  align-items:baseline;
  gap: 10px;
}
.price-main{
  font-size: 40px;
  font-weight: 950;
  letter-spacing: -1px;
}
.price-sub{
  color: var(--muted2);
  font-size: 13px;
}
.plan-cta{
  width:100%;
  margin-bottom: 10px;
}
.plan-list{
  margin: 10px 0 0;
  padding-left: 18px;
}
.plan-list li{
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.plan-foot{
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted2);
}

/* Upsell */
.upsell{
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,122,69,.35);
  background: linear-gradient(135deg, rgba(255,122,69,.16), rgba(255,154,107,.06));
  display:grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 14px;
  align-items:center;
}
@media (max-width: 980px){
  .upsell{ grid-template-columns: 1fr; }
}
.upsell-label{
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.upsell h3{
  margin: 8px 0 8px;
  font-size: 18px;
  letter-spacing: -.3px;
}
.upsell-chips{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.mini-pill{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,122,69,.35);
  background: rgba(255,122,69,.08);
  color: var(--text);
}
.upsell-price{
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -1px;
}

/* Compare table */
.compare{ margin-top: 16px; }
.table-wrap{ overflow:auto; }
.table{
  width:100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.table th, .table td{
  text-align:left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(31,34,48,.85);
  font-size: 13px;
}
.table th{ color: var(--muted); font-weight: 800; }

/* FAQ accordion */
.faq{ margin-top: 16px; }
.accordion details{
  border-bottom: 1px solid rgba(31,34,48,.85);
  padding: 10px 0;
}
.accordion summary{
  cursor:pointer;
  list-style:none;
  font-weight: 800;
  color: var(--text);
}
.accordion summary::-webkit-details-marker{ display:none; }
.accordion .acc-body{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Pricing CTA strip */
.cta-strip-pricing{ margin-top: 16px; }

/* ---------- Spinner + Toast ---------- */
.spinner{
  display:none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(26,15,11,.35);
  border-top-color: rgba(26,15,11,.85);
  margin-left: 8px;
  animation: spin .9s linear infinite;
}
.btn.is-loading .spinner{ display:inline-block; }
.btn.is-loading .btn-label{ opacity:.92; }

@keyframes spin{ to{ transform: rotate(360deg);} }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(17,18,23,.92);
  border: 1px solid rgba(31,34,48,.95);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  display:none;
  max-width: min(720px, calc(100% - 24px));
}
.toast.show{ display:block; }

/* ---------- Focus states ---------- */
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid rgba(255,122,69,.45);
  outline-offset: 2px;
}

/* ---------- Small screens ---------- */
@media (max-width: 520px){
  .card-actions{ justify-content:flex-start; }
  .topbar-inner{ flex-direction:column; align-items:flex-start; }
  .tabs{ justify-content:flex-start; }
  .preview-shell{ height: 420px; }
}
