:root {
  --bg: #0b1020;
  --bg2: #11182f;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --ink: #131a2b;
  --muted: #6b7689;
  --line: #e7eaf1;
  --accent: #6d5cf6;
  --accent-2: #9b8bff;
  --accent-ink: #ffffff;
  --ok: #18a563;
  --danger: #e0466b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 28, 60, 0.08), 0 2px 8px rgba(20, 28, 60, 0.05);
  --shadow-hover: 0 16px 40px rgba(20, 28, 60, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #eceaff 0%, transparent 55%),
    radial-gradient(1000px 500px at 110% 0%, #e6f4ff 0%, transparent 50%),
    var(--surface-2);
  min-height: 100vh;
}

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), #00b3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar nav { display: flex; align-items: center; gap: 14px; }
.credits {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(24, 165, 99, 0.1); color: var(--ok);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.credits .unlimited { color: var(--ok); }
.email { color: var(--muted); font-size: 13px; }
.btn-link { text-decoration: none; color: var(--accent); font-weight: 600; font-size: 14px; }
.btn-link:hover { text-decoration: underline; }

.container { max-width: 1060px; margin: 28px auto 60px; padding: 0 18px; }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.lead { color: var(--muted); margin: 0 0 4px; font-size: 14.5px; line-height: 1.5; }

/* Numaralı bölüm başlığı */
h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; margin: 28px 0 12px; letter-spacing: -0.01em;
}
h2:first-of-type { margin-top: 22px; }
h2 .n {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 13px; font-weight: 700;
}
.section-sub { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }

/* ---------- Form ---------- */
label { display: block; font-size: 13.5px; font-weight: 600; margin: 12px 0; }
.hint { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 4px; }
.req { color: var(--danger); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.opt { color: var(--muted); font-weight: 500; font-size: 11px; }

textarea {
  display: block; width: 100%; margin-top: 7px;
  padding: 11px 13px; font-size: 14.5px; font-family: inherit; font-weight: 400;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109,92,246,.14); }

input[type="text"], input[type="email"], input[type="password"], select {
  display: block; width: 100%; margin-top: 7px;
  padding: 11px 13px; font-size: 15px; font-weight: 400;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(109, 92, 246, 0.14);
}
select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7689' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option:disabled { color: #b9c0cf; }
.mini { margin-top: 7px; font-size: 13px; padding: 8px 30px 8px 11px; }

.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; }

/* ---------- Sürükle-bırak yükleme ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.ref-cell { display: flex; flex-direction: column; }
.ref-url { margin-top: 8px; font-size: 12.5px; padding: 8px 10px; }
.ref-url::placeholder { color: #aab2c2; }
.dropzone {
  position: relative; display: block; cursor: pointer;
  border: 2px dashed #d4d9e6; border-radius: var(--radius-sm);
  background: var(--surface-2); min-height: 150px;
  transition: border-color .15s, background .15s, transform .1s;
  overflow: hidden; margin: 0;
}
.dropzone:hover { border-color: var(--accent-2); background: #f3f1ff; }
.dropzone.dragover { border-color: var(--accent); background: #efeaff; transform: scale(1.01); }
.dz-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; height: 150px; padding: 12px; gap: 4px;
}
.dz-icon { font-size: 26px; }
.dz-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.dz-sub { font-size: 11.5px; color: var(--muted); }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dz-preview { position: absolute; inset: 0; }
.dz-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dz-remove {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(11, 16, 32, 0.7); color: #fff; font-size: 16px; line-height: 1;
}
.dz-remove:hover { background: var(--danger); }

/* ---------- Çekim çipleri ---------- */
#shot-list { display: flex; flex-wrap: wrap; gap: 10px; }
.shot-opt {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
  background: var(--surface); transition: all .12s;
}
.shot-opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.shot-opt.checked { border-color: var(--accent); background: #f1eeff; color: var(--accent); }
.shot-opt.disabled { opacity: .5; cursor: not-allowed; background: var(--surface-2); }
.reason { color: var(--muted); font-size: 11.5px; font-weight: 400; }

.enhance-row, .mode-row {
  display: flex; align-items: center; gap: 8px; margin: 22px 0 6px;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #faf9ff, #f4f8ff); font-weight: 600;
}
.enhance-row input, .mode-row input { accent-color: var(--accent); width: 17px; height: 17px; }
.mode-row { margin-top: 0; background: linear-gradient(90deg, #fff7ed, #fef2f2); border-color: #f3d9c0; }

.mode-video { background: linear-gradient(90deg, #f3f0ff, #eef6ff); border-color: #d9d2f5; }
.cost-badge {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; margin-left: 2px;
}
.cost-estimate { color: var(--accent); font-weight: 600; font-size: 13.5px; margin: 14px 0 0; }

/* Basit/Video mod: studio alanlarını gizle, simple alanlarını göster */
.simple-only { display: none; }
.lbl-simple { display: none; }
form.simple-mode .studio-only, form.video-mode .studio-only { display: none !important; }
form.simple-mode .simple-only, form.video-mode .simple-only { display: block; }
form.simple-mode .lbl-studio, form.video-mode .lbl-studio { display: none; }
form.simple-mode .lbl-simple, form.video-mode .lbl-simple { display: inline; }
/* Video modunda görsel-kalite (2K/4K) anlamsız: gizle */
form.video-mode .no-video { display: none !important; }

/* Galeri video oynatıcı */
.set-grid .vid, .gallery .vid {
  width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block;
  border-radius: var(--radius-sm); background: #000; box-shadow: var(--shadow);
}

/* ---------- Butonlar ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  background: linear-gradient(135deg, var(--accent), #00b3ff);
  color: var(--accent-ink); border: none; border-radius: var(--radius-sm);
  padding: 14px 26px; font-size: 15.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px rgba(109, 92, 246, 0.32); transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-primary:disabled { background: #c7cdda; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- Flash ---------- */
.flashes { margin-bottom: 16px; }
.flash {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px;
  font-size: 14px; box-shadow: var(--shadow);
}

/* ---------- Galeri ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.gallery img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
  transition: transform .25s;
}
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption { font-size: 12.5px; margin-top: 8px; line-height: 1.4; }

/* ---------- Setler ---------- */
.set {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 18px; background: var(--surface-2);
}
.set-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.set-head strong { font-size: 15px; }
.set-head .muted { font-size: 12.5px; }
.rev-badge {
  background: rgba(109, 92, 246, 0.12); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.set-grid figure { margin: 0; position: relative; }
.set-grid a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.set-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform .25s; }
.set-grid a:hover img { transform: scale(1.04); }
.set-grid figcaption { font-size: 12px; margin-top: 7px; line-height: 1.35; }

/* Seçim kutusu (revize için) */
.pick {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(255,255,255,0.92); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer;
}
.pick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Sağ üstte araç çubuğu: indir + düzenle yan yana */
.dl, .edit-btn {
  position: absolute; top: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.94); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; font-size: 15px;
  text-decoration: none; color: var(--ink);
  transition: background .15s, color .15s;
}
.edit-btn { right: 8px; }
.dl { right: 46px; }
.dl:hover { background: var(--accent); color: #fff; }
.edit-btn:hover { background: #f1eeff; }

/* Düzenleme editörü */
.editor {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(8,12,22,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.editor[hidden] { display: none; }
.editor-box {
  background: #fff; border-radius: 16px; padding: 20px;
  max-width: 720px; width: 100%; max-height: 94vh; overflow: auto;
  box-shadow: var(--shadow-hover);
}
.editor-head { margin-bottom: 12px; }
.editor-head strong { font-size: 17px; }
.editor-head .muted { display: block; font-size: 13px; margin-top: 2px; }
.editor-stage {
  position: relative; display: inline-block; width: 100%; text-align: center;
  background: #f1f3f8; border-radius: 10px; overflow: hidden;
}
#edit-img { display: block; max-height: 56vh; width: auto; max-width: 100%; margin: 0 auto; }
#edit-canvas {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  height: 100%; cursor: crosshair; touch-action: none;
}
.editor-tools {
  display: flex; align-items: center; gap: 16px; margin: 14px 0 10px; flex-wrap: wrap;
}
.editor-tools label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.editor-tools input[type="color"] { width: 36px; height: 30px; padding: 0; border: none; background: none; cursor: pointer; }
.editor-tools .btn-secondary { padding: 8px 14px; }
.editor-foot { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.editor-foot select { flex: 1; }
.set-grid figure:has(.pick-box:checked) a { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.set-foot { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; }
.rev-actions { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.rev-quality { padding: 9px 30px 9px 11px; font-size: 13px; }
.rev-actions .btn-secondary { width: 100%; }
.rev-notes {
  flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; resize: vertical;
}
.rev-notes:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109,92,246,.14); }
.btn-secondary {
  background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm); padding: 11px 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: background .12s;
}
.btn-secondary:hover { background: #f1eeff; }

/* ---------- Galeri-içi iskelet (üretim sürerken) ---------- */
.skel-card {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #eef0f6 25%, #e1e5f0 37%, #eef0f6 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: #8b95a8; font-size: 12.5px; font-weight: 600;
}
.spinner-sm {
  width: 30px; height: 30px;
  border: 3px solid #dfe3ee; border-top-color: var(--accent);
  border-radius: 50%; animation: spin .9s linear infinite;
}
.gallery figure.pending { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* ---------- Lightbox (sayfa içi büyük görüntüleyici) ---------- */
.lb {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(8, 12, 22, 0.9); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.lb[hidden] { display: none; }
.lb-img {
  max-width: 88vw; max-height: 86vh; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); object-fit: contain;
}
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff;
  border: none; cursor: pointer; backdrop-filter: blur(6px);
  display: grid; place-items: center; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; font-size: 32px; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-cap {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
@media (max-width: 640px) {
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 26px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* ---------- Toast bildirimleri ---------- */
#toast-wrap {
  position: fixed; bottom: 22px; right: 22px; z-index: 1100;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: #131a2b; color: #fff; padding: 13px 18px; border-radius: 12px;
  font-size: 14px; max-width: 360px; box-shadow: var(--shadow-hover);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: var(--danger); }

/* ---------- Yükleniyor katmanı ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 16, 32, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.overlay[hidden] { display: none; }
.overlay-box {
  background: #fff; border-radius: 18px; padding: 32px 36px; text-align: center;
  max-width: 540px; box-shadow: var(--shadow-hover);
}
.overlay-title { font-size: 19px; font-weight: 800; margin: 16px 0 4px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto;
  border: 4px solid #ece9fb; border-top-color: var(--accent);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeletons { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.skel {
  width: 116px; height: 116px; border-radius: 12px;
  background: linear-gradient(90deg, #eef0f6 25%, #e1e5f0 37%, #eef0f6 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px; color: #8b95a8; font-size: 11px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Giriş / kayıt ---------- */
.auth-card { max-width: 400px; margin: 70px auto; }
.muted { color: var(--muted); font-size: 14px; }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--muted); padding: 0; }
