/* Warp Clips: the panel's dark Warp Blocks look. */
:root {
  --bg: #0b0b10;
  --surface: #13131c;
  --surface-raised: #1b1b27;
  --border: rgba(88, 28, 135, 0.4);
  --border-hover: rgba(168, 85, 247, 0.55);
  --accent: #a855f7;
  --accent-strong: #9333ea;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --ok: #22c55e;
  --bad: #ef4444;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.ok { color: var(--ok); font-weight: 600; }

/* wordmark: styled text, like warpblocks.com and the panel */
.wordmark { font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; font-size: 1.35rem; white-space: nowrap; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.word-warp { color: #f3f4f6; }
.word-blocks { color: var(--accent); }
.word-sub { color: var(--muted); font-weight: 700; font-size: 0.8em; margin-left: 10px; letter-spacing: 0.12em; }
.wordmark-auth { font-size: 2.3rem; text-align: center; }

/* sign in */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at top, rgba(126, 34, 206, 0.25), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.auth-sub { text-align: center; color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-weight: 700; font-size: 0.8rem; margin: 2px 0 24px; }
label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
label input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1rem; }
label input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25); }
.error { color: #fca5a5; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; padding: 9px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-raised); color: var(--text); cursor: pointer; font-weight: 600; font-size: 0.92rem; text-decoration: none; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--border-hover); text-decoration: none; }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; padding: 12px; margin-top: 6px; }
.btn-sub { font-weight: 500; opacity: 0.75; font-size: 0.82em; }

/* layout */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: rgba(19, 19, 28, 0.85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.topbar-user { display: flex; align-items: center; gap: 12px; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.page-title { margin: 0 0 6px; font-size: 1.7rem; }
.lede { margin: 0 0 24px; }
.back { display: inline-block; margin-bottom: 14px; font-size: 0.9rem; }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }

/* drops list */
.drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.drop { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .15s, border-color .15s; }
.drop:hover { border-color: var(--border-hover); transform: translateY(-2px); text-decoration: none; }
.drop-covers { display: flex; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.drop-covers img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; display: block; }
.drop-body { padding: 14px 16px 16px; }
.drop-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.drop-meta { color: var(--muted); font-size: 0.85rem; }
progress { width: 100%; height: 6px; margin: 10px 0 6px; appearance: none; border: 0; border-radius: 99px; background: var(--surface-raised); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-raised); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }

/* batch page */
.batch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.batch-head p { margin: 0; }
.note { margin-top: 8px !important; max-width: 70ch; }
.howto { background: rgba(168, 85, 247, 0.08); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 22px; font-size: 0.92rem; color: #d8d4e8; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.clip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.clip.is-posted { border-color: rgba(34, 197, 94, 0.45); }
.player { position: relative; background: #000; }
.player video { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 560px; background: #000; object-fit: contain; }
.badge-posted { display: none; position: absolute; top: 10px; left: 10px; background: var(--ok); color: #04140a; font-weight: 800; font-size: 0.75rem; padding: 3px 9px; border-radius: 99px; letter-spacing: .04em; text-transform: uppercase; }
.clip.is-posted .badge-posted { display: block; }
.clip-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.clip-top { display: flex; align-items: center; gap: 8px; }
.num { font-weight: 800; color: var(--accent); }
.tag { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border-radius: 99px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.clip-title { margin: 0; font-size: 1.1rem; }
.field-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 5px; }
.field-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; white-space: pre-wrap; word-break: break-word; }
.field-box.tags { color: #c4b5fd; font-size: 0.9rem; }
.copy { cursor: pointer; }
.field-label .copy { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 2px 9px; font-size: 0.75rem; text-transform: none; letter-spacing: 0; font-weight: 600; }
.field-label .copy:hover { border-color: var(--accent); }
.hidden-full { position: absolute; left: -9999px; width: 1px; height: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.actions .btn-primary { flex: 1 1 100%; }
.posted-toggle { display: flex; align-items: center; gap: 10px; margin: 0; padding-top: 10px; border-top: 1px solid rgba(88, 28, 135, 0.25); cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.posted-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: var(--surface-raised); border: 1px solid var(--border); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.posted-toggle input:checked + .switch { background: rgba(34, 197, 94, 0.25); border-color: var(--ok); }
.posted-toggle input:checked + .switch::after { transform: translateX(16px); background: var(--ok); }
.posted-toggle input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35); }
.clip.is-posted .posted-text { color: #86efac; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--surface-raised); border: 1px solid var(--accent); color: var(--text);
  padding: 10px 18px; border-radius: 99px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .word-sub { display: none; }
  .wrap { padding: 20px 16px 48px; }
  .clips { grid-template-columns: 1fr; }
  .batch-head .btn { width: 100%; }
}
