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

:root {
  --bg: #0a0a12;
  --bg-2: #12121c;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --muted: #8b8b9a;
  --accent-1: #7c3aed;
  --accent-2: #ec4899;
  --accent-3: #06b6d4;
  --fb-blue: #1877f2;
  --radius: 16px;
}

html {
  overflow-x: clip;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: clip;
  line-height: 1.5;
}

/* ── Background Blobs ── */
.bg-blobs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg) 70%);
}
.blob {
  position: absolute; width: 500px; height: 500px;
  border-radius: 50%; filter: blur(100px); opacity: 0.35;
  animation: float 20s ease-in-out infinite;
}
.blob-1 { background: var(--accent-1); top: -150px; left: -100px; }
.blob-2 { background: var(--accent-2); bottom: -150px; right: -100px; animation-delay: -7s; }
.blob-3 { background: var(--accent-3); top: 40%; left: 40%; animation-delay: -14s; width: 400px; height: 400px; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -60px) scale(1.1); }
  66% { transform: translate(-40px, 60px) scale(0.9); }
}

/* ── Header ── */
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px; max-width: 1120px; width: 100%; margin: 0 auto; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; min-width: 0; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}
.logo strong { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }

.header-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-btn, .nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05); color: var(--text);
  cursor: pointer; text-decoration: none; font-family: inherit; font-size: 13px; font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-btn { padding: 0 14px; }
.nav-icon-btn { width: 40px; padding: 0; }
.nav-btn:hover, .nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.facebook-btn {
  background: var(--fb-blue);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.4);
}
.facebook-btn:hover {
  background: #166fe5;
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.55);
}
.count-badge {
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff;
}

/* ── Container ── */
.container { max-width: 960px; width: 100%; margin: 0 auto; padding: 0 24px 60px; }

/* ── Hero ── */
.hero { text-align: center; padding: 28px 0 26px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.gradient { background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 200%; animation: gradientShift 4s ease infinite; }
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.subtitle { color: var(--muted); margin-top: 12px; font-size: 15px; }

/* ── Input Card ── */
.input-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.card-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.platforms { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); color: var(--muted); font-size: 13px;
  cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  font-weight: 500; font-family: inherit;
}
.pill:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.pill.active { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4); }

/* ── Auto Paste Toggle ── */
.auto-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all 0.2s ease;
}
.auto-toggle .status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #64748b;
  transition: all 0.2s ease;
}
.auto-toggle.on {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}
.auto-toggle.on .status-dot {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
}

.input-row { display: flex; gap: 10px; align-items: stretch; }
.input-row > * { min-width: 0; }
.input-wrap { position: relative; flex: 1; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap input {
  width: 100%; height: 52px; padding: 14px 48px 14px 46px;
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 16px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
.input-wrap input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15); }
.input-wrap input::placeholder { color: var(--muted); }
.icon-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06); border: none; color: var(--text);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  font-size: 15px; transition: background-color 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

.btn-primary {
  padding: 0 28px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 15px; cursor: pointer;
  position: relative; overflow: hidden; min-width: 130px; height: 52px; flex-shrink: 0;
  transition: box-shadow 0.25s ease, filter 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  font-family: inherit;
}
.btn-primary:active { filter: brightness(0.95); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-loader {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hidden { display: none !important; }

/* ── Sample Links ── */
.sample-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px;
}
.sample-label { font-size: 12px; color: var(--muted); }
.sample-chip {
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.sample-chip:hover { color: var(--text); border-color: var(--accent-3); background: rgba(6, 182, 212, 0.12); }

/* ── Source picker ── */
.source-picker { margin-top: 16px; padding: 14px; background: rgba(124, 58, 237, 0.1); border: 1px solid rgba(124, 58, 237, 0.3); border-radius: 12px; animation: fadeInUp 0.3s ease; }
.source-picker p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.source-btn {
  padding: 10px 16px; margin-right: 8px; margin-bottom: 6px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; cursor: pointer; font-weight: 500;
  transition: all 0.2s; font-family: inherit;
}
.source-btn:hover, .source-btn.active { background: rgba(124, 58, 237, 0.28); border-color: var(--accent-1); }

/* ── Alert ── */
.alert {
  margin-top: 16px; padding: 14px 18px; border-radius: 12px;
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5; font-size: 14px; animation: fadeInUp 0.3s ease;
}

/* ── Skeleton ── */
.skeleton-wrap { margin-top: 24px; }
.skel-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; gap: 20px; }
.skel-thumb { width: 180px; height: 120px; border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skel-lines { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.skel-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Result card ── */
.result-wrap { margin-top: 24px; scroll-margin-top: 20px; }
.result-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}
.result-meta { display: flex; gap: 20px; margin-bottom: 18px; align-items: flex-start; }
.result-thumb-wrap {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; max-width: 220px; max-height: 220px;
  border-radius: 12px; border: 1px solid var(--border);
  background: transparent; overflow: hidden;
}
.result-thumb {
  display: block; width: auto; height: auto;
  max-width: 220px; max-height: 220px; object-fit: contain;
}
.result-info { flex: 1; min-width: 0; }
.meta-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.result-type-badge, .engine-badge, .files-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.result-type-badge { background: rgba(124, 58, 237, 0.22); color: #c4b5fd; }
.engine-badge { background: rgba(6, 182, 212, 0.16); color: #67e8f9; text-transform: none; }
.files-badge { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

.result-title {
  font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.35;
  overflow-wrap: anywhere; word-break: break-word;
}
.creator-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.creator-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.creator-name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.creator-handle { color: var(--muted); overflow-wrap: anywhere; }

.stats-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-chip {
  padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}

/* ── Preview Tabs & Players ── */
.preview-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.preview-tab {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.preview-tab.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.3));
  color: #fff; border-color: var(--accent-1);
}
.preview-stage { margin-bottom: 18px; }

.inline-video-stage {
  display: flex; justify-content: center; align-items: center;
  width: 100%;
}
.inline-video-box {
  position: relative; display: flex; justify-content: center; align-items: center;
  --video-max-h: min(76dvh, 660px);
  width: min(100%, calc(var(--video-max-h) * var(--video-ratio, 1.7778)));
  max-width: 100%; max-height: var(--video-max-h);
  aspect-ratio: var(--video-ratio, 1.7778);
  border-radius: 14px; border: 1px solid var(--border);
  background: #000; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.inline-video {
  display: block; width: 100%; height: 100%;
  object-fit: contain; background: #000;
}
.unmute-pill {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  max-width: calc(100% - 24px); text-align: center;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(15, 15, 25, 0.85); backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transition: background-color 0.2s;
}
.unmute-pill:hover { background: var(--accent-1); }

.inline-audio-box {
  padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px;
}
.audio-meta { display: flex; align-items: center; gap: 12px; }
.audio-disc {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-1)); font-size: 20px;
}
.audio-title { font-size: 14px; font-weight: 600; }
.audio-sub { font-size: 12px; color: var(--muted); }
.inline-audio { width: 100%; height: 40px; }

/* ── Photo Gallery & ZIP/PDF ── */
.photo-gallery {
  padding: 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}
.photo-gallery.single {
  padding: 4px 0; border: none; background: transparent;
}
.gallery-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.gallery-count { font-size: 14px; font-weight: 700; }
.gallery-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.action-chip {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background-color 0.2s, border-color 0.2s;
}
.action-chip:hover:not(:disabled) { border-color: var(--accent-3); background: rgba(6, 182, 212, 0.16); }
.action-chip.pdf-btn:hover:not(:disabled) { border-color: var(--accent-2); background: rgba(236, 72, 153, 0.16); }
.action-chip:disabled { opacity: 0.6; cursor: wait; }
.gallery-status {
  margin-bottom: 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(6, 182, 212, 0.12); border: 1px solid rgba(6, 182, 212, 0.3);
  color: #a5f3fc; font-size: 13px;
}
.gallery-status.error {
  background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5;
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 12px; align-items: start;
}
.gallery-grid.single {
  display: flex; justify-content: center;
}
.gallery-grid.single .gallery-item {
  width: fit-content; max-width: min(100%, 640px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.gallery-item {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #0d0d16;
  display: flex; flex-direction: column;
}
.gallery-media-wrap {
  position: relative; display: block;
  width: 100%; padding: 0; border: 0; appearance: none;
  background: transparent; cursor: zoom-in; overflow: hidden; min-height: 0;
}
.gallery-index {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.72); color: #fff; font-size: 11px; font-weight: 600;
  pointer-events: none;
}
.gallery-media-wrap img {
  display: block; width: 100%; height: auto;
}
.gallery-grid.single .gallery-media-wrap {
  width: auto; max-width: 100%; aspect-ratio: auto !important;
}
.gallery-grid.single .gallery-media-wrap img {
  width: auto; height: auto; max-width: 100%;
  max-height: min(76dvh, 660px); object-fit: contain;
}
.gallery-dl-one {
  padding: 9px 10px; text-align: center; text-decoration: none; font-size: 12px; font-weight: 600;
  color: var(--text); background: rgba(255,255,255,0.04); border-top: 1px solid var(--border);
  transition: background-color 0.2s;
}
.gallery-dl-one:hover { background: rgba(124, 58, 237, 0.25); }

/* ── Lightbox ── */
.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 150; padding: 18px;
  background: rgba(4, 4, 10, 0.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  overscroll-behavior: contain;
}
.lightbox-frame {
  width: 100%; max-width: 1120px; height: 100%;
  display: flex; flex-direction: column; gap: 12px;
}
.lightbox-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0;
}
.lightbox-counter { font-size: 13px; font-weight: 600; color: var(--muted); }
.lightbox-top-actions { display: flex; align-items: center; gap: 8px; }
.lightbox-dl-btn {
  padding: 8px 14px; border-radius: 10px; text-decoration: none;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff; font-size: 13px; font-weight: 600;
}
.lightbox-close-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 16px; cursor: pointer;
}
.lightbox-stage {
  position: relative; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.lightbox-img {
  display: block; width: auto; height: auto;
  max-width: calc(100% - 104px); max-height: 100%;
  border-radius: 12px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.lightbox-nav {
  width: 42px; height: 42px; border-radius: 999px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; z-index: 2;
}
.lightbox-nav:hover { background: rgba(124, 58, 237, 0.45); }

/* ── Downloads grid ── */
.format-label { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.downloads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dl-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeIn 0.28s ease;
}
.dl-btn > span:first-child { overflow-wrap: anywhere; }
.dl-btn:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(236, 72, 153, 0.2));
  border-color: var(--accent-1);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}
.dl-badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: var(--muted); flex-shrink: 0; }
.dl-btn.audio .dl-badge { background: rgba(6, 182, 212, 0.2); color: #67e8f9; }
.dl-btn.video .dl-badge { background: rgba(124, 58, 237, 0.2); color: #c4b5fd; }
.dl-btn.image .dl-badge { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }

/* ── Modals (Settings & History) ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; padding: 20px;
  background: rgba(5, 5, 12, 0.72); backdrop-filter: blur(8px);
  display: grid; place-items: center; overscroll-behavior: contain;
}
.modal-card {
  width: 100%; max-width: 520px; max-height: min(88dvh, 760px);
  background: #131320; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; overflow: hidden;
}
.modal-card.modal-wide { max-width: 680px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 16px; font-weight: 700; }
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text); cursor: pointer;
}
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.setting-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); cursor: pointer;
}
.setting-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.setting-desc { font-size: 12px; color: var(--muted); }
.switch-input {
  width: 44px; height: 24px; appearance: none; border-radius: 999px;
  background: #2b2b3d; position: relative; cursor: pointer; flex-shrink: 0;
  transition: background 0.2s;
}
.switch-input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform 0.2s;
}
.switch-input:checked { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); }
.switch-input:checked::after { transform: translateX(20px); }
.setting-select {
  padding: 8px 10px; border-radius: 8px; background: #0c0c16;
  border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 13px;
}

.danger-chip {
  padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12); color: #fca5a5;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.history-empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.history-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.history-thumb {
  width: 64px; height: 48px; border-radius: 8px; object-fit: contain; flex-shrink: 0;
  background: #000; display: grid; place-items: center;
}
.history-info { flex: 1; min-width: 0; }
.history-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.history-badge { text-transform: uppercase; color: #c4b5fd; font-weight: 700; }
.history-engine { color: #67e8f9; }
.history-actions { display: flex; gap: 6px; flex-shrink: 0; }
.history-load-btn, .history-del-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text); cursor: pointer;
}
.history-del-btn:hover { background: rgba(239, 68, 68, 0.25); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s ease; }
.fade-in-up { animation: fadeInUp 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (hover: hover) {
  .nav-btn:hover, .nav-icon-btn:hover { transform: translateY(-1px); }
  .pill:hover { transform: translateY(-1px); }
  .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5); }
  .action-chip:hover:not(:disabled) { transform: translateY(-1px); }
  .dl-btn:hover { transform: translateY(-2px); }
}

/* ── Footer ── */
.footer { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 13px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header { padding: 16px 20px; }
  .container { padding: 0 18px 48px; }
}

@media (max-width: 640px) {
  .header { padding: 14px 16px; gap: 10px; }
  .logo { font-size: 19px; gap: 10px; }
  .logo-icon { width: 34px; height: 34px; font-size: 16px; }
  .tagline, .nav-btn-label { display: none; }
  .nav-btn { padding: 0 11px; height: 38px; }
  .nav-icon-btn { width: 38px; height: 38px; }
  .container { padding: 0 14px 40px; }
  .hero { padding: 18px 0 20px; }
  .subtitle { font-size: 14px; }
  .input-card { padding: 16px; }
  .pill { padding: 7px 12px; font-size: 12px; }
  .input-row { flex-direction: column; }
  .btn-primary { width: 100%; height: 48px; }
  .input-wrap input { height: 48px; }
  .result-card { padding: 16px; }
  .result-meta { flex-direction: column; align-items: stretch; gap: 14px; }
  .result-thumb-wrap {
    width: fit-content; max-width: 100%; max-height: 260px; margin: 0 auto;
  }
  .result-thumb { max-width: 100%; max-height: 260px; }
  .result-title { font-size: 16px; }
  .inline-video-box { --video-max-h: min(74dvh, 580px); }
  .photo-gallery { padding: 12px; }
  .photo-gallery.single { padding: 4px 0; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
    gap: 10px;
  }
  .gallery-grid.single .gallery-media-wrap img { max-height: min(72dvh, 560px); }
  .downloads-grid { grid-template-columns: 1fr; }
  .skel-card { flex-direction: column; }
  .skel-thumb { width: 100%; }
  .modal-backdrop { padding: 12px; }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 14px 16px; }
  .lightbox-backdrop { padding: 10px; }
  .lightbox-img { max-width: 100%; max-height: calc(100% - 12px); }
  .lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(10, 10, 18, 0.72); width: 38px; height: 38px;
  }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

@media (max-width: 420px) {
  .header-actions { gap: 6px; }
  .gallery-actions { width: 100%; }
  .action-chip { flex: 1; text-align: center; padding: 8px 10px; font-size: 12px; }
  .setting-row { flex-direction: column; align-items: flex-start; }
  .history-item { flex-wrap: wrap; }
}
