/* Simple, clean UI */
:root{
  --bg:#0b0b10;
  --card:#12121a;
  --text:#f2f2f4;
  --muted:#a8a8b3;
  --red:#ff2d55;
  --line:#262634;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1200px 800px at 20% 0%, #2b1231 0%, var(--bg) 55%);
  color:var(--text);
}
.topbar{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  backdrop-filter: blur(10px);
  background: rgba(11,11,16,.65);
}
.brand{
  display:flex;
  gap:12px;
  align-items:flex-start;
  flex: 1 1 auto;
  justify-content:center;
}
.logo{
  width:38px;height:38px;border-radius:10px;
  display:grid;place-items:center;
  background: rgba(255,45,85,.12);
  border:1px solid rgba(255,45,85,.35);
}
.title{
  font-family:"Great Vibes", cursive;
  font-size:28px; line-height:1;
}
.subtitle{color:var(--muted); font-size:12px; margin-top:2px}
.top-right{
  display:flex;
  gap:10px;
  align-items:center;
  position:absolute;
  right:18px;
  top:14px;
}
.badge{
  font-size:12px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background: rgba(255,255,255,.03);
  white-space:nowrap;
}
.wrap{max-width:980px; margin:20px auto; padding:0 16px}
.card{
  background: rgba(18,18,26,.75);
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  margin:14px 0;
}
h2{margin:0 0 10px 0; font-size:16px}
.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
@media (max-width:800px){.grid2{grid-template-columns:1fr}}
.lbl{display:block; color:var(--muted); font-size:12px; margin-bottom:6px}
.small{color:var(--muted); font-size:12px}
.hint{color:var(--muted); font-size:12px; margin-top:10px}
.choose-btn{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
}
.choose-btn.active{
  border-color: rgba(255,45,85,.8);
  background: rgba(255,45,85,.18);
  color: var(--text);
}
.primary{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,45,85,.6);
  background: rgba(255,45,85,.25);
  color:var(--text);
  cursor:pointer;
  font-weight:600;
}
.primary[disabled]{opacity:.5; cursor:not-allowed}
.ghost{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
}
.statusline{
  display:flex; align-items:center; gap:10px;
  margin-top:12px;
}
.dot{width:10px;height:10px;border-radius:99px;background:#555}
.dot.ok{background:#27d07d}
.dot.run{background:#ffb300}
.dot.bad{background:#ff3b30}

.preview{margin-top:12px}
video{width:100%; max-height:420px; background:#000; border-radius:14px; border:1px solid var(--line)}

#loadingOverlay{
  position:fixed; inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:14px;
  background: rgba(0,0,0,.55);
  z-index:9999;
}
.spinner{
  width:44px;height:44px;border-radius:999px;
  border:4px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,45,85,.9);
  animation: spin 0.9s linear infinite;
}
.loadingText{color:var(--text); font-size:14px}
@keyframes spin{to{transform:rotate(360deg)}}

.foot{margin:22px 0; text-align:center; color:var(--muted)}

.input{width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background: rgba(255,255,255,.03); color:var(--text); outline:none}
.input:focus{border-color: rgba(255,45,85,.6)}


/* Brand marketing copy */
.brandText{
  margin-top:10px;
  color: var(--text);
  opacity: .9;
  font-size: 12px;
  line-height: 1.6;
  max-width: 720px;
  text-align: center;
}
.brandText .spacer{ height: 10px; }

/* Top frame: center layout + better mobile ergonomics */
@media (max-width: 720px){
  /* Make header non-sticky on phones so it doesn't occupy the whole viewport */
  .topbar{ position: static; }

  /* Stack header content to give marketing copy full width */
  .topbar{ flex-direction: column; align-items: center; gap: 10px; }
  .brand{ flex-direction: column; align-items: center; }
  .logo{ margin-bottom: 2px; }
  .title{ text-align:center; }
  .subtitle{ text-align:center; }
  .top-right{ position: static; justify-content:center; flex-wrap:wrap; }

  /* Use full width for text so it wraps less */
  .brandText{ max-width: 100%; }
}

/* Demo grid (product showcase) */
.demoGrid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:14px 0 6px; }
@media (max-width:800px){ .demoGrid{ grid-template-columns:1fr; } }
.demoItem{ border:1px solid var(--line); border-radius:14px; padding:10px; background: rgba(255,255,255,.02); }
.demoItem video{ width:100%; border-radius:10px; display:block; }
.demoLabel{ margin-top:8px; text-align:center; font-size:12px; color: var(--muted); }

/* Upload inputs: keep native file chooser reliable */
.uploader input[type="file"]{
  width:100%;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}

#previewCanvas{width:100%; border-radius:12px; background:#000; display:block;}

.badge.clickable{cursor:pointer; text-decoration:none;}
.badge.clickable:hover{filter:brightness(1.1);}

/* Ensure header badges look clickable when JS sets cursor */
#authBadge{ pointer-events:auto; }

/* Clickable inline items inside a badge (e.g., Logout) */
.linklike{
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
}
