:root{
  --bg:#070a12;
  --text:#eaf0ff;
  --muted:#a9b4d0;
  --line:rgba(255,255,255,.10);
  --panel:rgba(17,24,39,.65);
  --panel2:rgba(17,24,39,.35);

  --blue:#4f8cff;
  --blue2:#79b2ff;

  --purple:#7c3aed;
  --purple2:#b4a0ff;

  --green:#2dd4bf;
  --shadow: 0 22px 70px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 15% -10%, rgba(79,140,255,.55) 0%, rgba(79,140,255,0) 60%),
    radial-gradient(1000px 520px at 95% 0%, rgba(124,58,237,.55) 0%, rgba(124,58,237,0) 58%),
    radial-gradient(900px 500px at 40% 110%, rgba(45,212,191,.16) 0%, rgba(45,212,191,0) 60%),
    var(--bg);
}

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(7,10,18,.60);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: var(--text);
}
.brand-mark{
  width: 38px; height: 38px;
  border-radius: 14px;
  display:grid; place-items:center;
  font-weight: 900;
  letter-spacing: .2px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 34px rgba(124,58,237,.22);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand-name{ font-weight: 900; }
.brand-sub{ color: var(--muted); font-size: 12px; margin-top: 2px; }

.topbar-actions{ display:flex; align-items:center; gap: 12px; }
.link{ color: var(--text); text-decoration:none; font-weight: 700; }
.link:hover{ text-decoration: underline; }
.link.subtle{ color: var(--muted); font-weight: 700; }

/* Layout */
.shell{
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}
.hero{ padding: 28px 0 18px; text-align:center; }
.hero-inner{ max-width: 860px; margin: 0 auto; }
.hero h1{
  margin:0 0 10px;
  font-size: clamp(30px, 3.4vw, 52px);
  letter-spacing: -0.8px;
}
.hero p{
  margin: 0 auto;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

/* Pills & tags */
.pill{
  display:inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.pill.free{ border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.12); }
.pill.premium{ border-color: rgba(180,160,255,.40); background: rgba(180,160,255,.12); }

/* Tabs */
.tabs{
  margin: 16px auto 0;
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap: wrap;
}
.tabbtn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 900;
  display:flex;
  align-items:center;
  gap: 10px;
  transition: background .2s ease, border-color .2s ease, transform .05s ease;
}
.tabbtn:hover{ background: rgba(255,255,255,.10); }
.tabbtn:active{ transform: translateY(1px); }
.tabbtn.active{
  border-color: rgba(121,178,255,.35);
  background: rgba(79,140,255,.14);
}
.tag{
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.tag.free{ border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.12); }
.tag.premium{ border-color: rgba(180,160,255,.40); background: rgba(180,160,255,.12); }

/* Grid */
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items:start;
}

/* Panels */
.panel{
  display:none;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.panel.active{ display:block; }
.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.panel h2{ margin:0 0 6px; font-size: 18px; letter-spacing: -0.2px; }
.muted{ margin:0; color: var(--muted); line-height:1.45; }

.badge{
  height: fit-content;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.badge.free{ border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.12); }
.badge.premium{ border-color: rgba(180,160,255,.40); background: rgba(180,160,255,.12); }

/* Uploader */
.uploader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(17,24,39,.30);
}
.uploader.premium{
  border-color: rgba(180,160,255,.35);
  background: rgba(124,58,237,.08);
}
.uploader.drag{
  border-color: rgba(121,178,255,.65);
  background: rgba(79,140,255,.10);
}
.uploader.premium.drag{
  border-color: rgba(180,160,255,.75);
  background: rgba(180,160,255,.10);
}
.uploader-left{ min-width: 220px; }
.uploader-title{ font-weight: 900; }
.uploader-sub{ color: var(--muted); font-size: 13px; margin-top: 4px; }

.uploader-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.file-input{ display:none; }
.file-name{
  color: var(--muted);
  font-size: 13px;
  min-width: 160px;
  text-align: left;
}

/* Actions */
.panel-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.spacer{ flex: 1; min-width: 12px; }
.status{ color: var(--muted); font-size: 13px; }

/* Buttons */
.btn{
  border-radius: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
  transition: background .2s ease, border-color .2s ease, transform .05s ease;
}
.btn:hover{ background: rgba(255,255,255,.10); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.45; cursor:not-allowed; transform:none; }

.btn.small{ padding: 8px 12px; border-radius: 12px; font-size: 13px; }

.btn.primary{
  border-color: rgba(121,178,255,.40);
  background: rgba(79,140,255,.14);
}
.btn.premium{
  border-color: rgba(180,160,255,.45);
  background: rgba(124,58,237,.16);
}
.btn.ghost{
  background: transparent;
}

/* Callout */
.callout{
  margin-top: 14px;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.callout-title{ font-weight: 900; margin-bottom: 4px; }
.callout-text{ color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Progress */
.progress-card{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 22px;
  padding: 14px;
}
.progress-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.progress-title{ font-weight: 900; }
.progress-text{ color: var(--muted); font-size: 13px; }

.progress-track{
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.progress-fill{
  height: 12px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue2), var(--purple2));
  transition: width .18s ease;
}

/* Footer */
.footer{
  text-align:center;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 0 0;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  place-items:center;
  background: rgba(0,0,0,.55);
  padding: 18px;
}
.modal.show{ display:grid; }
.modal-card{
  width: min(720px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(17,24,39,.92);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  overflow:hidden;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.modal-title{ font-weight: 900; }
.modal-body{
  padding: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 720px){
  .uploader{ flex-direction: column; align-items: stretch; }
  .uploader-left{ min-width: auto; width: 100%; }
  .uploader-right{ width: 100%; justify-content:flex-start; }
  .file-name{ min-width: 0; }
}

/* ---------- Auth modal UI ---------- */
.switchRow{
  display:flex;
  gap:10px;
  margin-bottom: 12px;
}
.seg{
  flex:1;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
}
.seg:hover{ background: rgba(255,255,255,.10); }
.seg.active{
  border-color: rgba(121,178,255,.40);
  background: rgba(79,140,255,.14);
}

.form{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.form label{
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
}
.form input{
  width: 100%;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
}
.form input:focus{
  border-color: rgba(121,178,255,.45);
  box-shadow: 0 0 0 3px rgba(79,140,255,.12);
}
.btn.full{ width: 100%; justify-content:center; }

.formMsg{
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.formMsg.ok{ color: rgba(45,212,191,.95); }
.formMsg.err{ color: rgba(255,99,99,.95); }

.meRow{
  margin-top: 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Account button pill ---------- */
.mini-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.mini-pill.free{
  border-color: rgba(76, 185, 255, .25);
  background: rgba(76, 185, 255, .12);
}
.mini-pill.premium{
  border-color: rgba(245, 158, 11, .30);
  background: rgba(245, 158, 11, .14);
}

/* ---------- Account dashboard grid ---------- */
.acc-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .acc-grid{ grid-template-columns: 1fr; }
}
.acc-box{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.acc-k{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.acc-v{
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  word-break: break-word;
}

/* ---------- Modal improvements (optional but nice) ---------- */
.modal-card{
  max-width: 560px;
}


