html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel-2: #f1f4f8;
  --text: #141923;
  --muted: #697386;
  --border: #e1e6ee;
  --accent: #3157f5;
  --accent-2: #6f7cff;
  --danger: #c0392b;
  --success: #0c8b5f;
  --shadow: 0 16px 44px rgba(15, 23, 42, .08);
  --radius: 18px;
  --header-bg: rgba(255,255,255,.88);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1117;
  --panel: #151a23;
  --panel-2: #1b222e;
  --text: #f6f8fb;
  --muted: #9ca8bb;
  --border: #293242;
  --accent: #5c78ff;
  --accent-2: #8e9cff;
  --danger: #ff6b6b;
  --success: #38d39f;
  --shadow: 0 18px 52px rgba(0,0,0,.28);
  --radius: 18px;
  --header-bg: rgba(14,17,23,.88);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select, input, textarea { outline-color: var(--accent); }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.motion-app { min-height: 100vh; }
.motion-shell,
.motion-editor-shell {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.motion-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(92,120,255,.18), transparent 32%),
    linear-gradient(145deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
}
.motion-hero h1,
.motion-editor-heading h1 {
  margin: 5px 0 8px;
  letter-spacing: -.045em;
  line-height: .98;
}
.motion-hero h1 { font-size: clamp(40px, 6vw, 72px); }
.motion-hero p,
.motion-editor-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}
.motion-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.motion-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.motion-hero-badges span,
.motion-card-meta span,
.motion-count {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--muted);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 11px;
}

.motion-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 24px;
}
.motion-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.motion-filters::-webkit-scrollbar { display: none; }
.motion-filter {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--panel);
}
.motion-filter.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.motion-search input {
  width: min(320px, 38vw);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
}

.motion-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.motion-library-head h2,
.motion-panel-head h2 {
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.motion-library-head p,
.motion-panel-head p {
  margin: 0;
  color: var(--muted);
}

.motion-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.motion-template-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.motion-template-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow);
}
.motion-card-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(45deg, #d7dce5 25%, transparent 25%),
    linear-gradient(-45deg, #d7dce5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d7dce5 75%),
    linear-gradient(-45deg, transparent 75%, #d7dce5 75%),
    #eef1f5;
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.motion-card-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.motion-card-preview canvas {
  height: 92%;
  width: auto;
  max-width: 82%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.motion-card-body { padding: 16px; }
.motion-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.motion-card-meta span { padding: 6px 9px; }
.motion-card-body h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}
.motion-card-body p {
  margin: 8px 0 16px;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.motion-card-button,
.button.primary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  padding: 11px 14px;
  font-weight: 800;
}
.motion-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.motion-editor-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.motion-editor-heading h1 { font-size: clamp(28px, 4vw, 44px); }
.motion-back,
.motion-reset {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 13px;
  font-weight: 700;
}
.motion-editor-grid {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(420px, 1fr) minmax(240px, 290px);
  gap: 18px;
  align-items: start;
}
.motion-panel,
.motion-stage-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .04);
}
.motion-panel { padding: 18px; }
.motion-controls-panel,
.motion-export-panel {
  position: sticky;
  top: 18px;
}
.motion-panel-head { margin-bottom: 16px; }
.motion-panel-divider {
  height: 1px;
  background: var(--border);
  margin: 22px -18px;
}
.motion-controls,
.motion-field-grid {
  display: grid;
  gap: 14px;
}
.motion-field-grid { grid-template-columns: 1fr 1fr; }
.motion-field { min-width: 0; }
.motion-field label,
.motion-label-line label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 750;
}
.motion-field input[type="text"],
.motion-field textarea,
.motion-field select,
.motion-field-grid select,
.motion-export-panel select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 11px;
}
.motion-field textarea { resize: vertical; min-height: 78px; }
.motion-field input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
}
.motion-field input[type="range"],
.motion-playback input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.motion-label-line,
.motion-range-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.motion-label-line { justify-content: space-between; }
.motion-label-line strong,
.motion-range-line strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
}
.motion-range-line input { flex: 1; }
.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.motion-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 13px;
}
.motion-check input { accent-color: var(--accent); }

.motion-stage-panel {
  overflow: hidden;
  min-width: 0;
}
.motion-stage-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.motion-preview-wrap {
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 22px;
  overflow: hidden;
  background: #0b0d12;
}
.motion-preview-wrap.is-transparent {
  background:
    linear-gradient(45deg, #2b3039 25%, transparent 25%),
    linear-gradient(-45deg, #2b3039 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2b3039 75%),
    linear-gradient(-45deg, transparent 75%, #2b3039 75%),
    #1d222a;
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}
.motion-preview-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}
.motion-preview-wrap[data-ratio="9x16"] canvas { max-height: 72vh; }
.motion-preview-wrap[data-ratio="1x1"] canvas { width: min(76%, 560px); }
.motion-preview-wrap[data-ratio="16x9"] canvas { width: min(94%, 760px); }
.motion-playback {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.motion-playback-buttons { display: flex; gap: 7px; }
.motion-playback-buttons button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 8px 10px;
  font-weight: 750;
}
.motion-playback-buttons button.is-primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.motion-time {
  display: flex;
  gap: 5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.motion-export-button {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 13px;
  padding: 13px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 850;
}
.motion-export-button:disabled { opacity: .6; cursor: wait; }
.notice {
  margin-top: 14px;
  border-radius: 12px;
  padding: 12px;
  line-height: 1.45;
  font-size: 12px;
}
.notice.info {
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}
.notice.error {
  color: color-mix(in srgb, var(--danger) 70%, var(--text));
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
}
.notice.is-compact { padding: 10px; }
.motion-export-progress { margin-top: 14px; }
.motion-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}
.motion-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .15s linear;
}
.motion-export-progress p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.motion-export-facts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.motion-export-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.motion-export-facts span { color: var(--muted); }

@media (max-width: 1120px) {
  .motion-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .motion-editor-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .motion-export-panel { grid-column: 1 / -1; position: static; }
  .motion-export-panel .motion-export-facts { grid-template-columns: repeat(3, 1fr); }
  .motion-controls-panel { position: static; }
}

@media (max-width: 820px) {
  .motion-shell,
  .motion-editor-shell { width: min(100% - 20px, 720px); padding-top: 12px; }
  .motion-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .motion-hero-badges { justify-content: flex-start; }
  .motion-toolbar { align-items: stretch; flex-direction: column; }
  .motion-search input { width: 100%; }
  .motion-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .motion-editor-topbar {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .motion-reset { grid-column: 2; justify-self: start; }
  .motion-editor-grid { display: flex; flex-direction: column; }
  .motion-stage-panel { order: -1; width: 100%; }
  .motion-panel { width: 100%; }
  .motion-preview-wrap { min-height: 420px; }
  .motion-preview-wrap canvas { max-height: 60vh; }
  .motion-playback { grid-template-columns: 1fr; }
  .motion-playback-buttons { justify-content: center; }
  .motion-time { justify-content: center; }
}

@media (max-width: 560px) {
  .motion-template-grid { grid-template-columns: 1fr; }
  .motion-library-head { align-items: flex-start; flex-direction: column; }
  .motion-card-preview { aspect-ratio: 16 / 9; }
  .motion-field-grid { grid-template-columns: 1fr; }
  .motion-preview-wrap { min-height: 360px; padding: 14px; }
  .motion-editor-heading p { font-size: 13px; }
  .motion-export-panel .motion-export-facts { grid-template-columns: 1fr; }
}

/* v1.1 visual refresh */
body {
  background:
    radial-gradient(circle at top center, rgba(92,120,255,.14), transparent 30%),
    var(--bg);
}
.motion-shell,
.motion-editor-shell {
  width: min(1480px, calc(100% - 32px));
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.site-header__inner {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.site-brand { text-decoration: none; color: var(--text); }
.site-brand__wordmark {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}
.site-brand__wordmark span { color: var(--accent); }
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}
.site-nav a,
.site-header__link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.site-nav a:hover,
.site-header__link:hover { color: var(--text); }
.motion-shell { padding-top: 24px; }
.motion-hero {
  align-items: stretch;
  min-height: 260px;
  padding: 38px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(92,120,255,.34), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(87,154,255,.13), transparent 32%),
    linear-gradient(130deg, color-mix(in srgb, var(--panel) 92%, #0f172a 8%), color-mix(in srgb, var(--panel-2) 92%, #111827 8%));
}
.motion-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  max-width: 840px;
}
.motion-hero h1 { font-size: clamp(36px, 5.8vw, 66px); max-width: 820px; }
.motion-hero__preview {
  display: grid;
  align-items: center;
  justify-items: end;
  min-width: 240px;
}
.motion-hero-mini-card {
  width: min(300px, 100%);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.motion-hero-mini-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
}
.motion-hero-mini-card span { color: var(--muted); }
.motion-hero-mini-card__chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 14px;
}
.motion-toolbar { margin: 30px 0 24px; }
.motion-search input {
  width: min(340px, 40vw);
  min-height: 48px;
}
.motion-template-grid { gap: 22px; }
.motion-template-card {
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.motion-card-preview {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.18), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 74%, #0f172a 26%), color-mix(in srgb, var(--panel) 90%, transparent));
}
.motion-card-preview::before {
  content: 'Canlı önizleme';
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(8,12,20,.44);
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 6px 10px;
}
.motion-card-preview canvas {
  height: 90%;
  max-width: 86%;
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(0,0,0,.32);
}
.motion-card-body { padding: 18px 18px 16px; }
.motion-card-body h3 { margin: 12px 0 8px; font-size: 28px; letter-spacing: -.03em; }
.motion-card-body p {
  min-height: 52px;
  color: var(--muted);
  line-height: 1.5;
}
.motion-card-button {
  min-height: 46px;
  border-radius: 14px;
}
.motion-editor-topbar,
.motion-editor-grid { position: relative; z-index: 1; }
.motion-preview-wrap {
  background:
    radial-gradient(circle at 50% 0%, rgba(92,120,255,.22), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 85%, transparent), color-mix(in srgb, var(--panel) 92%, transparent));
}
.notice.info.is-compact::before {
  content: 'İpucu';
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
@media (max-width: 1180px) {
  .site-header__inner { grid-template-columns: 1fr; justify-items: center; padding: 12px 0; }
  .site-nav { gap: 14px; }
  .motion-hero { grid-template-columns: 1fr; }
  .motion-hero__preview { justify-items: start; }
  .motion-template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 840px) {
  .site-nav { display: none; }
  .site-header__actions { display: none; }
  .motion-template-grid { grid-template-columns: 1fr; }
  .motion-toolbar,
  .motion-library-head { flex-direction: column; align-items: stretch; }
  .motion-search input { width: 100%; }
}

/* v1.2 — CebeciAI site shell + dynamic library */
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 30%),
    var(--bg);
}
.cai-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.cai-header__inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.cai-logo {
  color: var(--text);
  text-decoration: none;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1;
}
.cai-logo span { color: var(--accent); }
.cai-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}
.cai-nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  opacity: .82;
}
.cai-nav a:hover,
.cai-nav a.is-active { opacity: 1; color: var(--accent); }
.cai-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}
.cai-actions { display: flex; align-items: center; gap: 7px; }
.cai-icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
}
.cai-icon-button:hover { background: var(--panel-2); }
.cai-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.motion-shell,
.motion-editor-shell { width: min(1240px, calc(100% - 32px)); }
.motion-shell { padding-top: 34px; }

.lab-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 54px;
  align-items: center;
  min-height: 530px;
  padding: 64px 58px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 30%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 34%),
    linear-gradient(135deg, var(--panel), color-mix(in srgb, var(--panel-2) 94%, var(--accent) 6%));
  box-shadow: var(--shadow);
}
.lab-hero::before {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  bottom: -150px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 0 46px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 92px color-mix(in srgb, var(--accent) 3%, transparent);
  pointer-events: none;
}
.lab-hero__copy { position: relative; z-index: 2; }
.lab-hero h1 {
  max-width: 700px;
  margin: 12px 0 20px;
  font-size: clamp(48px, 6.2vw, 78px);
  line-height: .96;
  letter-spacing: -.065em;
}
.lab-hero__copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.lab-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}
.lab-primary-button {
  border: 0;
  border-radius: 14px;
  padding: 14px 19px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 26%, transparent);
  font-weight: 850;
}
.lab-primary-button:hover { transform: translateY(-1px); }
.lab-hero__note { color: var(--muted); font-size: 13px; font-weight: 650; }
.lab-stats {
  display: flex;
  gap: 34px;
  margin-top: 38px;
}
.lab-stats div { display: grid; gap: 3px; }
.lab-stats strong { font-size: 20px; }
.lab-stats span { color: var(--muted); font-size: 12px; }

.lab-hero__visual {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}
.hero-stage-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 26px;
  padding: 14px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 30px 70px rgba(0,0,0,.22);
  transform: rotate(1.5deg);
}
.hero-stage-topline,
.hero-stage-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 4px 13px;
  color: var(--muted);
  font-size: 12px;
}
.hero-stage-topline strong { margin-left: auto; color: var(--text); }
.hero-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #32d583;
  box-shadow: 0 0 0 5px rgba(50,213,131,.12);
}
.hero-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(92,120,255,.16), transparent 34%),
    #090c12;
}
.hero-stage canvas { display: block; width: 100%; height: 100%; }
.hero-stage-footer { justify-content: center; padding: 13px 4px 3px; }
.floating-chip {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  font-size: 12px;
  font-weight: 800;
  animation: floatChip 4.6s ease-in-out infinite;
}
.chip-one { top: 22px; right: 4px; }
.chip-two { bottom: 48px; left: -10px; animation-delay: -1.4s; }
.chip-three { right: 18px; bottom: 10px; animation-delay: -2.8s; }
@keyframes floatChip { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.library-section { padding-top: 48px; }
.section-kicker {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}
.motion-library-head h2 { font-size: clamp(31px, 4vw, 46px); letter-spacing: -.045em; }
.motion-library-head p { max-width: 720px; line-height: 1.55; }
.motion-toolbar { margin: 0 0 30px; }
.motion-filter {
  min-height: 44px;
  padding: 10px 15px;
  font-weight: 700;
}
.motion-search {
  position: relative;
  display: flex;
  align-items: center;
}
.motion-search svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}
.motion-search input { min-height: 46px; padding-left: 41px; }
.motion-template-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
}
.motion-template-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.motion-template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 54px rgba(0,0,0,.18);
}
.motion-card-preview {
  aspect-ratio: 16/10;
  padding: 0;
  background: #0b0e14;
}
.motion-card-preview::before {
  content: '●  CANLI';
  top: 13px;
  left: 13px;
  color: #dffbed;
  background: rgba(10,15,22,.66);
  border-color: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}
.motion-card-preview canvas {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}
.motion-card-body { padding: 18px; }
.motion-card-body h3 {
  margin: 13px 0 7px;
  font-size: 24px;
  letter-spacing: -.035em;
}
.motion-card-body p { min-height: 48px; font-size: 14px; }
.motion-card-button { margin-top: 4px; }

.cai-footer { border-top: 1px solid var(--border); margin-top: 56px; }
.cai-footer__inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .cai-nav { gap: 15px; }
  .lab-hero { grid-template-columns: 1fr; padding: 48px 36px; }
  .lab-hero__visual { min-height: 340px; }
  .motion-template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .cai-header__inner { min-height: 66px; }
  .cai-nav { display: none; }
  .cai-actions { margin-left: auto; }
  .lab-hero { padding: 38px 24px; border-radius: 24px; }
  .lab-hero h1 { font-size: clamp(42px, 12vw, 64px); }
  .lab-hero__copy > p { font-size: 16px; }
  .lab-stats { gap: 20px; }
  .motion-template-grid { grid-template-columns: 1fr; }
  .motion-toolbar,
  .motion-library-head { flex-direction: column; align-items: stretch; }
  .motion-search input { width: 100%; }
  .motion-card-preview { aspect-ratio: 16/9; }
  .cai-footer__inner { flex-direction: column; justify-content: center; text-align: center; }
}


/* v2.2 — compact filters + refined cards + B-roll polish */
.motion-toolbar {
  gap: 14px;
  margin: 22px 0 20px;
}
.motion-filters {
  gap: 10px;
  padding: 2px 0 4px;
}
.motion-filter {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.motion-filter:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
  background: color-mix(in srgb, var(--panel) 78%, var(--accent) 5%);
}
.motion-filter.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 82%, white 6%));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 22%, transparent);
}
.motion-search input {
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 14px;
}
.motion-template-grid { gap: 20px; }
.motion-template-card {
  border-radius: 22px;
}
.motion-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 16px 16px 15px;
}
.motion-card-meta {
  margin-bottom: 10px;
}
.motion-card-meta span {
  padding: 5px 9px;
  font-size: 11px;
}
.motion-card-body h3 {
  margin: 0 0 7px;
  font-size: 23px;
  line-height: 1.05;
}
.motion-card-body p {
  margin: 0 0 14px;
  min-height: 40px;
  font-size: 13px;
  line-height: 1.48;
}
.motion-card-button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--panel-2) 74%, var(--accent) 10%);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
}
.motion-card-button::after {
  content: '→';
  opacity: .72;
  font-size: 14px;
}
.motion-card-button:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  color: var(--accent);
}
.motion-card-preview::before {
  font-size: 10px;
  padding: 5px 8px;
}
@media (max-width: 840px) {
  .motion-filters { gap: 8px; }
  .motion-filter { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .motion-card-body h3 { font-size: 21px; }
}
