/* ====================================================
   YüzGizle - Production Stylesheet
   Domain: ilkto.com
   ==================================================== */

:root {
  --primary: #1a1a1a;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --pink: #ec4899;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-soft: #475569;
  --text-dim: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --x-black: #000000;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* === OFFLINE BANNER === */
.offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--danger);
  color: white;
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  display: none;
}
.offline-banner.show { display: block; }

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

/* === LANGUAGE === */
.lang-wrap { position: relative; }

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lang-flag { font-size: 16px; }
.lang-arrow { font-size: 10px; color: var(--text-dim); }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 170px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}
.lang-menu.show { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.lang-option:hover { background: var(--bg-soft); }
.lang-option.active { background: var(--bg-soft); color: var(--accent); }

/* === HERO === */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 20px 30px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto;
}

/* === APP SECTION === */
.app-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.boot-loader {
  display: none;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 13px;
  color: #92400e;
  font-weight: 600;
}
.boot-loader.show { display: block; }

/* === UPLOAD === */
.upload-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 50px 24px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.02);
}

.upload-icon-wrap {
  width: 72px;
  height: 72px;
  background: var(--bg-soft);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.upload-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.upload-subtitle { font-size: 14px; color: var(--text-soft); margin-bottom: 20px; }

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.upload-btn:hover { background: var(--accent); transform: translateY(-1px); }

#fileInput { display: none; }

/* === EDITOR === */
.editor { display: none; }
.editor.active { display: block; }

.canvas-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.canvas-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

canvas { max-width: 100%; height: auto; display: block; }

/* === LAYER OVERLAY === */
.layer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  z-index: 5;
  padding: 24px;
}

.layer-spinner {
  width: 56px;
  height: 56px;
  position: relative;
}

.layer-spinner::before,
.layer-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.layer-spinner::before {
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: spin 1.2s linear infinite;
}

.layer-spinner::after {
  border-bottom-color: var(--accent-2);
  border-left-color: var(--accent-2);
  animation: spin 0.9s linear infinite reverse;
  inset: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.layer-status { text-align: center; max-width: 340px; }
.layer-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

.layer-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.layer-message {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  min-height: 22px;
  transition: opacity 0.3s;
}

.layer-security {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
  background: var(--bg-soft);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.layer-security strong { color: var(--text); font-weight: 700; }

/* === INFO BAR === */
.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.info-item { display: flex; align-items: center; gap: 8px; }
.info-item strong { color: var(--text); font-weight: 700; }
.info-item span { color: var(--text-soft); }

.face-count-badge {
  background: var(--text);
  color: white;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}

/* === SMART SUGGESTION === */
.smart-suggest {
  display: none;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  cursor: pointer;
  align-items: center;
  gap: 10px;
}
.smart-suggest.show { display: flex; }
.smart-suggest .icon { font-size: 24px; }
.smart-suggest .text { flex: 1; font-weight: 600; color: var(--text); }
.smart-suggest .text small { display: block; color: var(--text-soft); font-weight: 500; font-size: 12px; margin-top: 2px; }

/* === PANEL === */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title .panel-action {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

/* === SHAPE TOGGLE === */
.shape-toggle {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 10px;
}

.shape-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.2s;
}

.shape-btn.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === STYLE CATEGORIES === */
.style-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.style-category:first-of-type { margin-top: 0; }
.style-category .pill {
  background: var(--bg-soft);
  border-radius: 100px;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--text-soft);
}

/* === STYLES GRID === */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 480px) { .styles-grid { gap: 8px; } }

.style-card {
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 6px;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 84px;
  position: relative;
}

.style-card:hover { background: #f1f5f9; }
.style-card.active {
  background: var(--bg-card);
  border-color: var(--text);
  box-shadow: var(--shadow);
}

.style-emoji { font-size: 26px; line-height: 1; }
.style-label { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.2; }

.style-card .badge-new {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--pink);
  color: white;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.style-card .badge-today {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--warning);
  color: white;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 100px;
}

/* === SLIDER === */
.slider-wrap { display: flex; align-items: center; gap: 14px; }

.slider-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  outline: none;
}

.slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: var(--shadow);
}

.slider-wrap input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
}

.slider-value {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  background: var(--bg-soft);
  padding: 4px 8px;
  border-radius: 8px;
}

/* === COLOR PICKER === */
.color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--border);
  transition: all 0.15s;
  position: relative;
}

.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { box-shadow: 0 0 0 3px var(--text); }

.color-swatch.custom {
  background: conic-gradient(from 0deg, #f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f472b6, #f87171);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.color-swatch input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* === PER-FACE PANEL === */
.faces-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.face-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.face-chip:hover { background: #f1f5f9; }
.face-chip.active { border-color: var(--text); background: white; }
.face-chip .face-num {
  width: 20px;
  height: 20px;
  background: var(--text);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

/* === PRESETS === */
.presets-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-chip:hover { background: var(--text); color: white; }
.preset-chip .x { 
  background: rgba(0,0,0,0.1); 
  width: 16px; 
  height: 16px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 10px;
}
.preset-chip:hover .x { background: rgba(255,255,255,0.2); }

/* === ACTIONS === */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--text); color: white; }
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-soft); }

/* === X BIG BUTTON === */
.x-share-card {
  background: var(--x-black);
  color: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.x-share-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.x-share-card .x-icon {
  width: 50px;
  height: 50px;
  background: white;
  color: black;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  font-family: serif;
  flex-shrink: 0;
}

.x-share-card .x-text { flex: 1; }
.x-share-card .x-title { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.x-share-card .x-subtitle { font-size: 12px; color: rgba(255,255,255,0.7); font-weight: 500; }
.x-share-card .x-arrow { font-size: 20px; color: rgba(255,255,255,0.5); }

/* === SHARE BUTTONS === */
.share-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.share-btn {
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.share-btn:hover { background: var(--text); color: white; transform: translateY(-1px); }
.share-btn .icon { font-size: 18px; }

/* === EXPORT FORMAT === */
.format-row {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 10px;
}

.format-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  transition: all 0.2s;
}
.format-btn.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === DELETE BAR === */
.delete-bar {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.delete-bar.deleted {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.delete-bar-text { color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.delete-bar.deleted .delete-bar-text { color: #991b1b; }

.delete-server-btn {
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
}
.delete-server-btn:hover { background: #fef2f2; }
.delete-server-btn.done {
  background: #f1f5f9;
  color: var(--text-dim);
  border-color: var(--border);
  pointer-events: none;
}

/* === FEATURES === */
.features {
  max-width: 1100px;
  margin: 30px auto;
  padding: 30px 20px;
}

.features-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.features-subtitle {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 32px;
  font-size: 15px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature p { color: var(--text-soft); font-size: 14px; }

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
}

footer .footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

footer a { color: var(--text-soft); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--text); }

.hidden { display: none !important; }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s;
  max-width: 90%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@media (max-width: 640px) {
  .hero { padding: 30px 20px 20px; }
  .upload-zone { padding: 36px 20px; }
}

/* ====================================================
   SOCIAL TAGS PANEL
   ==================================================== */

.social-tags-panel { margin-bottom: 16px; }

.social-tags-hint {
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  line-height: 1.5;
}

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

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.ig-icon { background: linear-gradient(135deg, #fff5ed 0%, #ffeaef 100%); border-color: #fce7f3; }
.x-icon-svg { background: #000; }
.tg-icon { background: #e0f2fe; border-color: #bae6fd; }
.tt-icon { background: #f1f5f9; border-color: #e2e8f0; }

.social-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s;
}

.social-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.social-input.invalid {
  border-color: var(--danger);
  background: #fef2f2;
}

.social-position {
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  min-width: 110px;
  font-weight: 600;
  color: var(--text-soft);
}

.social-position:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 480px) {
  .social-input-row { flex-wrap: wrap; }
  .social-input { flex-basis: 100%; min-width: 0; order: 2; }
  .social-icon { order: 1; }
  .social-position { order: 3; flex: 1; min-width: 0; }
}

/* === STYLE GRID === */
.social-style-wrap { margin-top: 16px; }

.social-style-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-style-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .social-style-grid { grid-template-columns: repeat(3, 1fr); }
}

.social-style-btn {
  padding: 10px 6px;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  cursor: pointer;
}

.social-style-btn:hover { background: #f1f5f9; }

.social-style-btn.active {
  background: white;
  border-color: var(--text);
  box-shadow: var(--shadow);
}

.preview-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.preview-glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-dark {
  background: rgba(0,0,0,0.75);
  color: white;
}

.preview-light {
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  border: 1px solid #e5e7eb;
}

.preview-gradient {
  background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
  color: white;
}

.preview-minimal {
  background: transparent;
  color: #1a1a1a;
  border-bottom: 2px solid #1a1a1a;
  border-radius: 0;
  padding: 2px 4px;
}

.style-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
}

/* ====================================================
   EDIT TOOLBAR (auto-blur, undo/redo, regions, compare)
   ==================================================== */
.edit-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.tool-btn:hover:not(:disabled) { background: #eef2f7; }
.tool-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tool-btn.active {
  background: var(--text);
  color: #fff;
}
.tool-btn.tool-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
}
.tool-btn.tool-primary:hover:not(:disabled) { filter: brightness(1.08); }
.tool-ico { font-size: 15px; line-height: 1; }
.tool-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 2px 2px;
}

.edit-hint {
  display: none;
  font-size: 12.5px;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
  padding: 9px 13px;
  margin-bottom: 14px;
  font-weight: 600;
}
.edit-hint.show { display: block; }

/* Compare slider */
.compare-slider-wrap {
  display: none;
  margin-bottom: 16px;
}
.compare-slider-wrap.show { display: block; }
.compare-slider-wrap input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--text-dim), var(--accent));
  outline: none;
}
.compare-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
  cursor: ew-resize;
}
.compare-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

@media (max-width: 600px) {
  .tool-btn span:not(.tool-ico) { display: none; } /* icons only on mobile */
  .tool-btn { padding: 10px; }
}

/* ====================================================
   RTL SUPPORT (Arabic)
   ==================================================== */
body.rtl { direction: rtl; }
body.rtl .nav-inner,
body.rtl .info-bar,
body.rtl .delete-bar,
body.rtl .edit-toolbar,
body.rtl .action-buttons,
body.rtl .social-input-row { direction: rtl; }

body.rtl .lang-menu { right: auto; left: 0; }
body.rtl .panel-title { text-align: right; }
body.rtl .upload-zone,
body.rtl .hero { text-align: center; }

/* Sliders & ranges stay LTR (numeric scales read better) */
body.rtl input[type="range"] { direction: ltr; }

/* Username inputs keep LTR (handles are latin) */
body.rtl .social-input,
body.rtl #compareSlider { direction: ltr; text-align: left; }

/* Flip toggle groups */
body.rtl .shape-toggle,
body.rtl .format-row { flex-direction: row-reverse; }

/* Arabic-friendly font stack */
body.rtl {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
}

/* ====================================================
   PRIVACY ALERT MODAL
   ==================================================== */
.alert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.alert-modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }

.alert-modal {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-modal-icon { font-size: 44px; margin-bottom: 12px; }
.alert-modal-title { font-size: 18px; font-weight: 800; color: var(--text); margin: 0 0 8px; }
.alert-modal-body { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin: 0 0 22px; }
.alert-modal-actions { display: flex; gap: 10px; }
.alert-modal-actions .btn { flex: 1; justify-content: center; }

body.rtl .alert-modal { text-align: right; }
