/* Y2Bmake — y2bmake.online */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --bg: #07070b;
  --bg2: #0d0d14;
  --panel: #12121c;
  --panel2: #171724;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f8;
  --muted: #9a9ab0;
  --accent: #8b5cf6;
  --accent2: #c084fc;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Sora", "Outfit", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
    radial-gradient(700px 400px at 100% 10%, rgba(192, 132, 252, 0.12), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { color: #fff; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--line);
  background: rgba(10, 10, 16, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 1rem;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}
.logo-text { font-family: "Outfit", sans-serif; font-weight: 800; letter-spacing: -0.02em; }
.logo-text span { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }

.side-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.side-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.85rem; border-radius: 12px; color: var(--muted); font-weight: 500;
}
.side-nav a:hover, .side-nav a.active {
  background: var(--accent-soft); color: #fff;
}
.badge {
  min-width: 1.35rem; padding: 0.1rem 0.4rem; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: #fff; font-size: 0.72rem; text-align: center;
}
.side-nav a.active .badge { background: var(--accent); }

.side-foot { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.side-foot form { margin: 0; }
.ghost-btn, button, .btn {
  appearance: none; border: 0; cursor: pointer;
  border-radius: 12px; font-weight: 600; font-family: inherit;
}
.ghost-btn {
  width: 100%; padding: 0.65rem 0.85rem; background: transparent; color: var(--muted); text-align: left;
}
.ghost-btn:hover { background: rgba(255,255,255,0.04); color: #fff; }

.main { padding: 1.5rem 1.75rem 2.5rem; min-width: 0; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.page-head h1 {
  margin: 0; font-family: "Outfit", sans-serif; font-size: 1.75rem;
  letter-spacing: -0.03em; font-weight: 800;
}
.page-head p { margin: 0.35rem 0 0; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1rem; background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: #fff; box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25);
}
.btn:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.btn.secondary {
  background: rgba(255,255,255,0.06); color: var(--text);
  box-shadow: none; border: 1px solid var(--line);
}
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: none; }
.btn.sm { padding: 0.45rem 0.75rem; font-size: 0.85rem; border-radius: 10px; }

.status-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.2rem;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--muted);
  text-decoration: none;
}
.status-pill.ok { color: var(--ok); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.status-pill.warn { color: var(--warn); border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.08); }
.status-pill.bad { color: var(--bad); border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.08); }
.status-pill.accent { color: var(--accent2); border-color: rgba(139,92,246,0.4); background: var(--accent-soft); }
.scene-list { list-style: none; padding: 0; margin: 0; }
.scene-list li {
  padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.scene-list li:last-child { border-bottom: 0; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li {
  padding: 0.85rem 1rem; border-radius: 12px; margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
}
.messages .success { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.messages .error { border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.08); }
.messages .warning { border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }

.stat-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.4rem;
}
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem;
}
.stat .label { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.35rem; }
.stat .num { font-family: "Outfit", sans-serif; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 0.9rem; font-size: 1rem; font-weight: 600; }

.clip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.clip-card {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.clip-card:hover { transform: translateY(-2px); border-color: rgba(139, 92, 246, 0.45); }
.clip-thumb {
  position: relative; aspect-ratio: 9/16; max-height: 320px; background: #000;
  overflow: hidden;
}
.clip-thumb img, .clip-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.clip-thumb .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted);
  background: linear-gradient(160deg, #1a1a2e, #0d0d14);
}
.pill {
  position: absolute; top: 0.65rem; left: 0.65rem;
  padding: 0.25rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1);
}
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }
.pill.accent { color: var(--accent2); }
.clip-body { padding: 0.85rem 0.9rem 1rem; }
.clip-body h3 {
  margin: 0 0 0.35rem; font-size: 0.95rem; line-height: 1.35; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clip-meta { color: var(--muted); font-size: 0.78rem; margin-bottom: 0.75rem; }
.clip-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.filters { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters a {
  padding: 0.4rem 0.8rem; border-radius: 999px; color: var(--muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); font-size: 0.85rem;
}
.filters a.active, .filters a:hover {
  background: var(--accent-soft); color: #fff; border-color: rgba(139, 92, 246, 0.35);
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

form.stack label { display: block; margin: 0.85rem 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
form.stack input[type="text"], form.stack input[type="url"], form.stack input[type="number"],
form.stack input[type="password"], form.stack textarea, form.stack select {
  width: 100%; padding: 0.75rem 0.85rem; border-radius: 12px;
  border: 1px solid var(--line); background: #0a0a12; color: var(--text); font-family: inherit;
}
form.stack input:focus, form.stack textarea:focus, form.stack select:focus {
  outline: 2px solid rgba(139, 92, 246, 0.45); border-color: transparent;
}
.muted { color: var(--muted); }
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 1.1rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
video.player { width: 100%; border-radius: 14px; background: #000; max-height: 70vh; }
pre.script {
  white-space: pre-wrap; background: #0a0a12; border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem; line-height: 1.5; color: #dddde8; font-size: 0.9rem;
}
.login-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
}
.login-card {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow);
}
.login-card h1 { font-family: "Outfit", sans-serif; margin: 0 0 0.35rem; letter-spacing: -0.03em; }
.alert {
  padding: 0.85rem 1rem; border-radius: 12px; margin: 0.8rem 0;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}
.alert.ok { border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.alert.bad { border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.08); }
.hero-banner {
  border-radius: 22px; padding: 1.4rem 1.5rem; margin-bottom: 1.3rem;
  background:
    linear-gradient(120deg, rgba(139,92,246,.28), rgba(236,72,153,.12) 45%, transparent),
    var(--panel);
  border: 1px solid var(--line);
}
.hero-banner h2 { margin: 0 0 0.4rem; font-family: "Outfit", sans-serif; font-size: 1.35rem; letter-spacing: -0.02em; }
.idea-row strong { display: block; margin-bottom: 0.2rem; }
.empty {
  padding: 2.5rem 1rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 18px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; color: #d8b4fe; }

.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.voice-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0a0a12;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.voice-card input { position: absolute; opacity: 0; pointer-events: none; }
.voice-card strong { font-family: "Outfit", sans-serif; font-size: 1.05rem; }
.voice-card.active, .voice-card:has(input:checked) {
  border-color: rgba(139, 92, 246, 0.55);
  background: var(--accent-soft);
}
.tts-preview-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .voice-grid { grid-template-columns: 1fr; }
}

.clip-card { position: relative; }
.clip-check {
  position: absolute; top: 0.55rem; left: 0.55rem; z-index: 3;
  background: rgba(0,0,0,.55); border-radius: 8px; padding: 0.25rem 0.35rem;
}
.clip-check input { width: 1rem; height: 1rem; accent-color: #fb7185; }
