/* ── Reset & Variables ──────────────────────────────────── */
:root {
  --bg:        #0b0e13;
  --surface:   #131820;
  --surface2:  #1c2333;
  --border:    #263044;
  --accent:    #e8522a;
  --accent-dk: #b83e1f;
  --text:      #d8dde8;
  --muted:     #637087;
  --success:   #3fb950;
  --error:     #f85149;
  --warning:   #d29922;
  --radius:    8px;
  --shadow:    0 2px 16px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 52px;
}

.logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
}

.logo-clip { color: var(--accent); }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
}

.tab {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: color .15s, background .15s;
}

.tab:hover  { color: var(--text); background: var(--surface2); }
.tab.active { color: var(--accent); background: var(--surface2); font-weight: 600; }

/* ── Content ─────────────────────────────────────────────── */
main { padding: 24px 20px; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.container { max-width: 900px; margin: 0 auto; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card h2 { font-size: 16px; margin-bottom: 16px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ── Inputs ─────────────────────────────────────────────── */
.input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}

.input:focus { border-color: var(--accent); }

.input-sm { width: 100px; }

.url-input { flex: 1; }

.select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
  cursor: pointer;
}

.select:focus { border-color: var(--accent); }

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.btn:hover    { background: var(--border); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent-dk);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover { background: var(--accent); }

.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  white-space: nowrap;
}

.badge-pending    { background: var(--surface2); color: var(--muted); }
.badge-running    { background: rgba(232,82,42,.15); color: var(--accent); }
.badge-done       { background: #0d2818; color: var(--success); }
.badge-error      { background: #2d1515; color: var(--error); }
.badge-cancelled  { background: var(--surface2); color: var(--muted); }

.btn-cancel {
  color: var(--error);
  border-color: var(--error);
}
.btn-cancel:hover { background: rgba(248,81,73,.1); }

/* ── Progress ────────────────────────────────────────────── */
.progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-bar {
  flex: 1;
  background: var(--surface2);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dk), #f07a3a);
  border-radius: 4px;
  transition: width .4s ease;
  width: 0%;
}

.progress-pct {
  font-size: 13px;
  color: var(--muted);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.current-step {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  min-height: 20px;
}

/* ── Steps log ───────────────────────────────────────────── */
.steps-log {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.log-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}

.log-row:last-child { border-bottom: none; }

.log-ts   { color: #3d4f6b; min-width: 44px; }
.log-step { color: var(--accent); min-width: 72px; font-weight: 600; }
.log-msg  { color: var(--text); }

.done-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ── History table ───────────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.history-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.history-table tr:hover td { background: var(--surface2); cursor: pointer; }

.url-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
}

.mini-bar-wrap {
  width: 80px;
  background: var(--surface2);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.mini-bar { height: 100%; background: var(--accent); }

/* ── Video groups ────────────────────────────────────────── */
.video-grid { margin-top: 4px; }

.video-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.vg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  cursor: pointer;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  user-select: none;
  gap: 12px;
}

.vg-header:hover { background: #212b3e; }

.vg-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.vg-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vg-arrow { color: var(--muted); font-size: 10px; flex-shrink: 0; }

.vg-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 9px;
  border-radius: 10px;
  flex-shrink: 0;
}

.vg-body { padding: 10px 16px 16px; }
.vg-body.collapsed { display: none; }

/* ── Run klasörleri (her oluşturma ayrı klasör) ──────────── */
.run-section {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.run-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  background: var(--surface);
  font-size: 12.5px;
  user-select: none;
  transition: background .15s;
}
.run-header:hover { background: #212b3e; }

.run-folder { flex-shrink: 0; font-size: 13px; }

.run-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.run-body { padding: 12px; }
.run-body.collapsed { display: none; }

.video-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

/* ── Video cards ─────────────────────────────────────────── */
.video-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
}

.video-card:hover { border-color: var(--accent); }

.video-card video {
  width: 100%;
  display: block;
  background: #000;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.video-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.run-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: capitalize;
  background: rgba(232,82,42,.2);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  align-self: flex-start;
}

.video-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-upload {
  display: block;
  width: 100%;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  margin-top: auto;
}

.btn-upload:hover:not(:disabled) {
  background: var(--accent-dk);
  border-color: var(--accent);
  color: #fff;
}

.btn-upload:disabled { opacity: .6; cursor: not-allowed; }
.btn-upload.done     { color: var(--success); border-color: var(--success); }
.btn-upload.error    { color: var(--error);   border-color: var(--error); }

/* ── Revize (Düzenle) ────────────────────────────────────── */
.video-actions {
  display: flex;
  gap: 6px;
}
.video-actions .btn-upload { flex: 1; width: auto; }

.btn-revize {
  flex: 1;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-revize:hover {
  background: var(--accent-dk);
  border-color: var(--accent);
  color: #fff;
}

.revize-panel {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.revize-panel.hidden { display: none; }

.revize-panel textarea {
  width: 100%;
  resize: vertical;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
}
.revize-panel textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.revize-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ── Video Editörü sayfası ───────────────────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}

.editor-player {
  position: sticky;
  top: 16px;
}

.editor-player video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: contain;
}

/* ── Timeline ─────────────────────────────────────────────── */
.tl-wrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tl-info { color: var(--accent); }

.tl-bar {
  position: relative;
  height: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}

.tl-trim, .tl-keep, .tl-cutseg {
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: none;
}
.tl-trim   { background: rgba(248, 81, 73, .25); }
.tl-keep   { background: rgba(63, 185, 80, .22); }
.tl-cutseg { background: rgba(248, 81, 73, .55); z-index: 2; }

.tl-handle {
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  margin-left: -6px;
  background: var(--accent);
  border-radius: 3px;
  cursor: ew-resize;
  z-index: 4;
  opacity: .9;
}
.tl-handle:hover { opacity: 1; }
.tl-handle::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; top: 7px; bottom: 7px;
  border-left: 1px solid rgba(255,255,255,.7);
  border-right: 1px solid rgba(255,255,255,.7);
}

.tl-playhead {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  z-index: 3;
  pointer-events: none;
}

.tl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tl-btns .btn { font-size: 11.5px; padding: 4px 8px; }

.tl-speed {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 11.5px;
}

.tl-preview { border-color: var(--accent) !important; color: var(--accent) !important; }

.tl-ticks {
  position: relative;
  height: 14px;
  font-size: 9.5px;
  color: var(--muted);
}
.tl-ticks span {
  position: absolute;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
}
.tl-ticks span:first-child { transform: none; }

.tl-cutpend {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--error, #f85149);
  z-index: 3;
  pointer-events: none;
}

.tl-cuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
}
.tl-cut-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(248, 81, 73, .15);
  border: 1px solid rgba(248, 81, 73, .4);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tl-cut-chip button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
}
.tl-cut-chip button:hover { color: #f85149; }
.tl-chip-pend { opacity: .75; border-style: dashed; }

.tl-hint {
  font-size: 10.5px;
  color: var(--muted);
  opacity: .8;
}

/* ── AI Üretici ──────────────────────────────────────────── */
.gen-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 14px;
  max-width: 640px;
}

.gen-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.gen-mode input { display: none; }

.gen-mode-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
  height: 100%;
}
.gen-mode-card:hover { border-color: var(--accent); }
.gen-mode input:checked + .gen-mode-card {
  border-color: var(--accent);
  background: rgba(88, 166, 255, .08);
}

.gen-mode-title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.gen-mode-desc  { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

#gen-topic {
  width: 100%;
  resize: vertical;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
}
#gen-topic:focus { outline: none; border-color: var(--accent); }

#gen-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .4s;
}
#gen-step { font-size: 12px; color: var(--muted); word-break: break-word; }

/* Kendi ses kaydı (teleprompter) */
.rec-info { font-size: 12.5px; color: var(--muted); }

.rec-text {
  font-size: 19px;
  line-height: 1.8;
  font-weight: 600;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 80px;
}

.rec-word { transition: color .2s; }
.rec-word.done { color: var(--accent); }

.rec-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rec-chip.rec-ok  { border-color: var(--success, #3fb950); color: var(--success, #3fb950);
                    background: rgba(63, 185, 80, .12); }
.rec-chip.rec-cur { border-width: 2px; }
.rec-chip { border-color: var(--border); background: var(--surface); }

/* Yapılacaklar özeti */
.ed-summary-panel { border-color: var(--accent); }
#ed-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ed-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(88, 166, 255, .12);
  border: 1px solid rgba(88, 166, 255, .4);
}
.ed-none { font-size: 12px; color: var(--muted); }

.editor-meta { margin-top: 10px; }
.editor-meta .video-name { font-size: 14px; font-weight: 600; }
#editor-run { font-size: 12px; color: var(--muted); margin-top: 4px; }

.editor-panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ed-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ed-panel h3 {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.ed-hint { font-size: 11px; font-weight: 400; color: var(--muted); }

.ed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ed-row label {
  font-size: 12.5px;
  color: var(--muted);
  min-width: 76px;
  flex-shrink: 0;
}

.ed-row select, .ed-row input, .ed-panel textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
  font-family: inherit;
}
.ed-row select:focus, .ed-row input:focus, .ed-panel textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ed-row input[type="number"] { width: 92px; }
#ed-music-hint { flex: 1; min-width: 140px; }
.ed-dash { color: var(--muted); }
.ed-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }

.ed-corr-row {
  display: grid;
  grid-template-columns: 1fr 1fr 84px 32px;
  gap: 6px;
}

.corr-now {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
.corr-now:hover { border-color: var(--accent); }
.ed-corr-row input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
  min-width: 0;
}

#ed-corrections { display: flex; flex-direction: column; gap: 6px; }

.ed-apply { padding: 11px; font-size: 14px; }

.ed-panel textarea { width: 100%; resize: vertical; line-height: 1.45; }

.ed-track {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
#ed-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .4s;
}
#ed-step { font-size: 12px; color: var(--muted); word-break: break-word; }

@media (max-width: 820px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-player { position: static; max-width: 300px; margin: 0 auto; }
}

/* ── Settings form ───────────────────────────────────────── */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-size: 13px; font-weight: 600; }

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

.table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--muted);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .2s, background .2s;
}

.toggle input:checked + .slider { background: var(--accent-dk); border-color: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(20px); background: #fff; }

.form-actions { display: flex; align-items: center; gap: 14px; }

.settings-msg { font-size: 13px; color: var(--success); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.btn-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover { color: var(--text); }

/* ── Job form rows ───────────────────────────────────────── */
.job-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.job-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 130px;
}

.job-select {
  flex: 1;
  max-width: 420px;
  font-size: 13px;
}

/* ── Music toggle ────────────────────────────────────────── */
.music-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.toggle-label {
  font-size: 13px;
  color: var(--text);
  min-width: 40px;
}

.range-input {
  width: 100px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── AI Agent section ────────────────────────────────────── */
.ai-agent-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
}

.ai-agent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-agent-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-agent-hint {
  font-size: 12px;
  color: var(--muted);
}

/* ── Preset chips ────────────────────────────────────────── */
.preset-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.preset-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  text-align: left;
  transition: border-color .15s, color .15s, background .15s, transform .1s;
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.3;
}

.preset-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--chip-color, var(--accent));
  background: var(--surface2);
  transform: translateY(-1px);
}

.preset-chip.active {
  border-color: var(--chip-color, var(--accent));
  color: var(--chip-color, var(--accent));
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--chip-color, var(--accent));
}

.chip-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.ai-filter-input {
  background: var(--surface);
}

/* ── Advanced panel ──────────────────────────────────────── */
.adv-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  transition: background .15s, color .15s;
}

.adv-toggle:hover { background: var(--border); color: var(--text); }

.adv-arrow { font-size: 10px; }

.adv-panel {
  display: none;
  border-left: 2px solid var(--border);
  margin-left: 6px;
  padding-left: 12px;
  margin-top: 6px;
  padding-top: 4px;
}

/* ── Utilities ───────────────────────────────────────────── */
.hidden  { display: none !important; }
.muted   { color: var(--muted); }
.small   { font-size: 12px; }
.job-url { font-size: 13px; word-break: break-all; }

.placeholder {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* ── Scrollbars ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ══════════════════ ANASAYFA ══════════════════════════════ */

/* ── Logo (tıklanabilir marka) ──────────────────────────── */
#logo-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

#logo-link .logo-word { transition: opacity .15s; }
#logo-link:hover .logo-word { opacity: .8; }
#logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.logo-mark { flex-shrink: 0; display: block; }
.logo-to   { color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────── */
.container-wide { max-width: 1040px; margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 44px;
  align-items: center;
  padding: 60px 8px 48px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
  margin-bottom: 18px;
}

.hero-em {
  color: var(--accent);
  box-shadow: inset 0 -0.14em rgba(232, 82, 42, .28);
}

.hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: var(--radius); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--muted); background: var(--surface2); }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Hero görseli: 16:9 → 9:16 dönüşümü ─────────────────── */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.frame-wide {
  width: 158px;
  height: 90px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .75;
}

.fw-play {
  width: 0;
  height: 0;
  border-left: 14px solid var(--muted);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

.morph-arrow { flex-shrink: 0; }

.frame-tall {
  width: 104px;
  height: 184px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 36px rgba(232, 82, 42, .16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 12px;
  gap: 10px;
  animation: ft-float 6s ease-in-out infinite;
}

.ft-face {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  margin-bottom: auto;
  margin-top: 26px;
}

.ft-lines { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; }

.ft-sub {
  height: 7px;
  width: 85%;
  border-radius: 4px;
  background: var(--surface2);
}

.ft-sub-accent { width: 60%; background: var(--accent-dk); }

@keyframes ft-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .frame-tall { animation: none; }
}

/* ── Nasıl çalışır ──────────────────────────────────────── */
.home-section { padding: 8px 8px 40px; }

.home-h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 18px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-no {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.step-name { font-size: 14px; font-weight: 700; }

.step-desc { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* ── Canlı sayaçlar ─────────────────────────────────────── */
.home-stats {
  display: flex;
  gap: 56px;
  padding: 26px 8px 56px;
  border-top: 1px solid var(--border);
  margin: 0 8px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ── Anasayfa responsive ────────────────────────────────── */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px 4px 32px;
    text-align: center;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:last-child { grid-column: 1 / -1; }
  .home-stats { gap: 36px; justify-content: center; }
}
