/* Modern, clean UI */
:root{
  --bg:#0b0f17;
  --bg2:#111827;
  --card:#0f172a;
  --muted:#93a3b3;
  --text:#e6eef8;
  --accent:#7c3aed;
  --accent-2:#22c55e;
  --border:#1f2937;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:linear-gradient(180deg, var(--bg), #0a0f1d 60%);
  color:var(--text);
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.app-shell{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:0;
  min-height:100vh;
}

.sidebar{
  background:linear-gradient(180deg, #0f172a, #0b1223);
  border-right:1px solid var(--border);
  padding:24px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

.brand{ display:flex; gap:12px; align-items:center; margin-bottom:20px; }
.logo{ font-size:28px; line-height:1; }
.brand-text h1{ margin:0; font-size:20px; font-weight:800; }
.brand-text p{ margin:2px 0 0; color:var(--muted); font-size:12px; }

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  margin:14px 0;
  box-shadow: var(--shadow);
}

.card h2{ margin:0 0 12px; font-size:16px; font-weight:700; }

.field{ display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.field > span{ font-size:12px; color:var(--muted); }
.field input, .field select{
  background:#0b1325;
  border:1px solid #1c2435;
  color:var(--text);
  border-radius:12px;
  padding:12px 12px;
  font-size:14px;
  outline:none;
  transition:.2s border;
}
.field input:focus, .field select:focus{ border-color:#2a62ff; }

.field.file input[type=file]{
  padding:10px;
  cursor:pointer;
}

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px; padding:10px 12px; border:1px solid var(--border);
  background:#111b33; color:#cbd5e1; cursor:pointer; font-weight:600;
}
.btn:hover{ border-color:#2a62ff; color:#fff; }

.btn.ghost{ background:transparent; }

.or{ text-align:center; color:var(--muted); font-size:12px; margin:8px 0; }

.tips{ color:var(--muted); font-size:12px; }

.switch{ display:flex; align-items:center; gap:10px; margin:10px 0; }
.switch input{ display:none; }
.switch span{
  width:44px; height:24px; background:#21304a; border-radius:999px; position:relative; transition:.2s background;
  border:1px solid #2b3a58;
}
.switch input:checked + span{ background:#22543d; border-color:#2f7f61; }
.switch span::after{
  content:""; width:18px; height:18px; background:#e5eefb; border-radius:50%;
  position:absolute; top:50%; left:3px; transform:translateY(-50%);
  transition:.2s left;
}
.switch input:checked + span::after{ left:23px; }
.switch em{ font-style:normal; color:#cbd5e1; font-size:14px; }

.sidebar-footer{ margin-top:16px; color:var(--muted); font-size:12px; }
.small{ font-size:12px; }

.content{ padding:20px 24px 40px; }

.tabs{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.tab{
  background:#0d1529; border:1px solid var(--border); color:#cbd5e1;
  padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:600;
}
.tab.active{ border-color:#2a62ff; color:#fff; }

.panel{ display:none; }
.panel.active{ display:block; }

.mock{ background:#0c1222; border:1px solid var(--border); border-radius:16px; padding:14px; box-shadow: var(--shadow); }

.yt-search-desktop .row, .yt-search-mobile .row{
  display:grid; gap:14px; align-items:start;
}
.yt-search-desktop .row{ grid-template-columns: 320px 1fr; }
.yt-search-mobile .row{ grid-template-columns: 180px 1fr; }

.thumb-wrap{ position:relative; overflow:hidden; background:#111827; border-radius:12px; border:1px solid #101826; }
.thumb{ width:100%; height:100%; object-fit:cover; display:block; }
.timestamp{
  position:absolute; right:6px; bottom:6px;
  background:rgba(0,0,0,.8); color:#fff; font-weight:700; font-size:12px; padding:2px 6px; border-radius:6px;
}
.badge{
  position:absolute; left:6px; top:6px;
  background:#e11d48; color:#fff; font-weight:800; font-size:11px; padding:2px 6px; border-radius:6px; letter-spacing:.5px;
}
.progress{
  position:absolute; left:0; right:0; bottom:0; height:4px; background:rgba(255,255,255,.2);
}
.progress::after{
  content:""; position:absolute; left:0; top:0; bottom:0; width:35%; background:#ef4444;
}

.meta h3, .meta h4{ margin:0 0 6px; }
.meta .muted{ color:#a2b1c6; }
.yt-home .card{ display:flex; flex-direction:column; gap:10px; }
.yt-home .meta{ display:flex; gap:10px; align-items:flex-start; }
.yt-home .avatar{ width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg, #2dd4bf, #3b82f6); flex-shrink:0; }

.yt-sidebar .side-row{
  display:grid; grid-template-columns: 168px 1fr; gap:10px; margin-bottom:12px; align-items:start;
}

.ratio-16x9{ aspect-ratio: 16 / 9; }

.grid-sizes{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap:14px;
}
.size-card{
  background:#0c1222; border:1px solid var(--border); border-radius:16px; overflow:hidden; box-shadow: var(--shadow);
}
.size-card header{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; color:#cbd5e1; border-bottom:1px solid var(--border);
  font-size:13px; font-weight:600;
}
.size-card .canvas{
  padding:12px;
}
.size-card .thumb-wrap{ border-radius:10px; }

.status{ font-size:12px; margin-top:8px; color:#a3e635; }
.scale-note{ color:var(--muted); font-size:12px; }

/* Light theme override (for previews only) */
.light .mock{ background:#fff; border-color:#e5e7eb; }
.light .thumb-wrap{ border-color:#e5e7eb; background:#f3f4f6; }
.light .meta .muted{ color:#6b7280; }
