/* ============================================
   EtiketDönüştür – Premium Dark UI
   ============================================ */

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

:root {
  --bg:        #0a0b0f;
  --surface:   #111218;
  --surface-2: #1a1c27;
  --surface-3: #22253a;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);

  --orange:    #ff6b2b;
  --orange-2:  #ff8c5a;
  --purple:    #8b5cf6;
  --purple-2:  #a78bfa;
  --green:     #10b981;
  --green-2:   #34d399;

  --text:      #f0f2ff;
  --text-2:    #9496b0;
  --text-3:    #5a5d7a;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 24px 64px rgba(0,0,0,0.5);
  --glow-o:    0 0 32px rgba(255,107,43,0.25);
  --glow-p:    0 0 32px rgba(139,92,246,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}

/* ── Background orbs ─────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #ff6b2b, transparent 70%);
  top: -200px; left: -200px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: -150px; right: -150px;
  animation: drift2 22s ease-in-out infinite alternate;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: drift3 15s ease-in-out infinite alternate;
}

@keyframes drift1 { from { transform: translate(0,0); } to { transform: translate(60px, 40px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-40px, -60px); } }
@keyframes drift3 { from { transform: translate(-50%,-50%) scale(1); } to { transform: translate(-50%,-50%) scale(1.3); } }

/* ── Container ───────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
}

/* ── Header ──────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 0 4px;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--orange), var(--purple));
  border-radius: 12px;
  display: grid; place-items: center;
  color: white;
  box-shadow: var(--glow-o);
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-title { display: block; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; }
.logo-sub   { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); }

.header-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 50px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Main Card ───────────────────────────── */
.main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

/* ── Section visibility ───────────────────  */
.section { display: none; padding: 36px; }
.section.active { display: block; animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section Header ──────────────────────── */
.section-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 28px;
}
.step-badge {
  min-width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--orange), #c84b0f);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: white;
  box-shadow: var(--glow-o);
  flex-shrink: 0;
}
.step-badge.success {
  background: linear-gradient(135deg, var(--green), #059669);
  box-shadow: 0 0 24px rgba(16,185,129,0.3);
  font-size: 18px;
}
.section-title { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.3; }
.section-desc  { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ── Drop Zone ───────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.015);
  position: relative;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--orange);
  background: rgba(255,107,43,0.05);
  box-shadow: var(--glow-o);
  transform: scale(1.01);
}
.drop-icon {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  color: var(--orange);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.drop-zone:hover .drop-icon { opacity: 1; }
.drop-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.drop-sub   { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.drop-hint  { font-size: 12px; color: var(--text-3); margin-top: 14px; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.25s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), #c84b0f);
  color: white;
  box-shadow: 0 4px 16px rgba(255,107,43,0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(255,107,43,0.55);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }
.btn-download {
  background: linear-gradient(135deg, var(--orange), var(--purple));
  color: white;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
  flex: 1;
  justify-content: center;
  padding: 14px 32px;
  font-size: 15px;
}
.btn-download:hover {
  box-shadow: 0 8px 32px rgba(139,92,246,0.5);
  transform: translateY(-2px);
}

/* ── Info Cards ──────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.info-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s;
}
.info-card:hover { border-color: var(--border-2); }
.info-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
}
.info-icon.orange { background: rgba(255,107,43,0.15); color: var(--orange); }
.info-icon.purple { background: rgba(139,92,246,0.15); color: var(--purple-2); }
.info-icon.green  { background: rgba(16,185,129,0.15);  color: var(--green-2); }
.info-title { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.info-val   { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* ── Processing ──────────────────────────── */
.processing-wrapper {
  padding: 60px 24px;
  text-align: center;
}
.spinner-ring {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--orange);
  border-right-color: var(--purple);
  animation: spin 1.2s linear infinite;
  margin: 0 auto 24px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-icon { position: absolute; color: var(--text-2); }
.processing-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.processing-sub   { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.progress-bar-wrap {
  width: 280px; height: 6px;
  background: var(--surface-3);
  border-radius: 10px;
  margin: 0 auto;
  overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--purple));
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ── Preview ─────────────────────────────── */
.preview-area {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.preview-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.page-count-badge,
.page-count {
  font-size: 11px; padding: 3px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 50px; color: var(--text-2);
}
.canvas-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
  min-height: 200px;
  justify-content: center;
  max-height: 480px;
  overflow-y: auto;
}
.canvas-scroll::-webkit-scrollbar { width: 6px; }
.canvas-scroll::-webkit-scrollbar-track { background: var(--surface-2); }
.canvas-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.canvas-scroll canvas {
  border: 1px solid var(--border-2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: white; /* label bg */
}
.canvas-scroll canvas:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

/* ── Settings Panel ──────────────────────── */
.settings-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.settings-title {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setting-item {}
.setting-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.toggle-group { display: flex; gap: 6px; }
.toggle-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-2);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s ease;
}
.toggle-btn:hover { border-color: var(--orange); color: var(--text); }
.toggle-btn.active {
  background: linear-gradient(135deg, var(--orange), #c84b0f);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 2px 12px rgba(255,107,43,0.3);
}

/* ── Action Row ──────────────────────────── */
.action-row {
  display: flex; gap: 12px; align-items: center;
}

/* ── Footer ──────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-3);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 560px) {
  .section { padding: 24px 18px; }
  .info-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .btn-download { width: 100%; }
  .header-badge { display: none; }
}
