/* ═══════════════════════════════════════════════════════════════════════════
   PhotoSplit Studio — style.css
   Full design system with dark mode, glassmorphism, animations, responsive
═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800;900&display=swap");

/* ── CSS Custom Properties (Design Tokens) ───────────────────────────────── */
:root {
  /* ── TikTok Noir Palette — Light Mode ──────────────────────────────────── */
  --bg-base: #f0f0f2;
  --bg-surface: #ffffff;
  --bg-surface-2: #f5f5f7;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-border: rgba(255, 255, 255, 0.95);
  --border: rgba(254, 44, 85, 0.12);
  --border-strong: rgba(254, 44, 85, 0.25);

  --accent: #fe2c55; /* TikTok hot-pink/red */
  --accent-2: #00c4be; /* TikTok cyan (muted for light) */
  --accent-grad: linear-gradient(135deg, #fe2c55 0%, #ff375f 60%, #ff6b35 100%);
  --accent-grad-dual: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
  --accent-glow: rgba(254, 44, 85, 0.22);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #25f4ee;

  --text-primary: #0d0d0d;
  --text-secondary: #555566;
  --text-muted: #999aaa;
  --text-on-accent: #ffffff;

  /* Sizing */
  --sidebar-w: 300px;
  --header-h: 64px;
  --ad-top-h: 90px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md:
    0 6px 20px rgba(254, 44, 85, 0.15), 0 4px 10px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 16px 48px rgba(254, 44, 85, 0.2), 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 8px 32px rgba(254, 44, 85, 0.12);

  /* Motion */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-slow: 400ms;
}

/* ── TikTok Noir — Dark Mode Tokens ───────────────────────────────────── */
[data-theme="dark"] {
  --bg-base: #010101;
  --bg-surface: #09090b;
  --bg-surface-2: #1a1a1a;
  --bg-glass: rgba(13, 13, 13, 0.55);
  --bg-glass-border: rgba(254, 44, 85, 0.18);
  --border: rgba(254, 44, 85, 0.12);
  --border-strong: rgba(254, 44, 85, 0.3);

  --accent-2: #25f4ee; /* Full cyan in dark mode */
  --accent-glow: rgba(254, 44, 85, 0.32);

  --text-primary: #f8f8f8;
  --text-secondary: #b0b0b8;
  --text-muted: #606068;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(254, 44, 85, 0.15);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(254, 44, 85, 0.2);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background var(--dur-slow) var(--ease-smooth),
    color var(--dur-slow) var(--ease-smooth);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 2px solid var(--bg-base);
}

/* ── Layout Shell ─────────────────────────────────────────────────────────── */
#app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Ad — Top Leaderboard ─────────────────────────────────────────────────── */
#ad-leaderboard {
  width: 100%;
  min-height: var(--ad-top-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
#site-header {
  height: var(--header-h);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 16px;
  margin: 0 auto 32px auto;
  max-width: 1200px;
  border-radius: 99px;
  z-index: 300;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.logo {
  font-family: "Outfit", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fe2c55 0%, #ff375f 40%, #25f4ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: filter var(--dur-fast);
}

.nav-icon,
.logo-img,
.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-grad);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 20px;
}

.main-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
  /* white-space: nowrap removed */
  padding: 6px 12px;
  border-radius: 99px;
}

.main-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

.main-nav a.active {
  color: var(--text-primary);
  background: rgba(254, 44, 85, 0.15); /* TikTok pink subtle tint */
  border: 1px solid rgba(254, 44, 85, 0.4);
  box-shadow: 0 0 10px rgba(254, 44, 85, 0.2);
}

@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
}

#sidebar-toggle {
  display: none;
  margin-right: 16px;
}

@media (max-width: 1024px) {
  #sidebar-toggle {
    display: flex;
  }
}

.header-spacer {
  flex: 1;
}

/* Privacy Badge */
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.03em;
  /* white-space: nowrap removed */
}

.privacy-badge svg {
  flex-shrink: 0;
}

/* Dark Mode Toggle */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease-smooth);
  flex-shrink: 0;
}
.icon-btn:active {
  transform: scale(0.95);
}

/* ── Main Body ────────────────────────────────────────────────────────────── */
#main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all var(--dur-normal) var(--ease-smooth);
  z-index: 200;
}

#sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease-smooth);
}

.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Upload Zone ──────────────────────────────────────────────────────────── */
#upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-smooth);
  background: var(--bg-surface-2);
  position: relative;
  overflow: hidden;
}

#upload-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-smooth);
}
#upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-smooth);
  background: var(--bg-surface-2);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

#upload-zone.drag-over::before {
  opacity: 0.05;
}

#upload-zone .upload-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
  position: relative;
  transition: transform var(--dur-normal) var(--ease-spring);
}

#upload-zone .upload-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

#upload-zone .upload-text strong {
  color: var(--accent);
  font-weight: 700;
}

#upload-zone .upload-formats {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  position: relative;
}

#file-input {
  display: none;
}

/* ── File List ────────────────────────────────────────────────────────────── */
#file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth);
  animation: slideIn var(--dur-normal) var(--ease-spring);
}
.file-chip.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.07);
}

.file-chip-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.file-chip-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: normal;
  word-break: break-word;
  flex: 1;
}
.file-chip-remove {
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--dur-fast);
  border: none;
  background: none;
  flex-shrink: 0;
}

/* ── Output Settings ──────────────────────────────────────────────────────── */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  transition: border-color var(--dur-fast);
  outline: none;
  margin-bottom: 10px;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-control {
  cursor: pointer;
}

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

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: var(--border-strong);
  height: 6px;
  border-radius: 99px;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(254, 44, 85, 0.4);
  transition: transform var(--dur-fast);
}
input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.range-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 28px;
  text-align: right;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.toggle-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--dur-normal) var(--ease-smooth);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition:
    transform var(--dur-normal) var(--ease-spring),
    width var(--dur-fast);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.toggle input:active + .toggle-slider::before {
  width: 22px;
}
.toggle input:checked + .toggle-slider {
  background: var(--accent);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Detection Settings ───────────────────────────────────────────────────── */
.threshold-section .form-label {
  display: block;
  margin-bottom: 4px;
}

/* ── Ad — Sidebar Rectangle ──────────────────────────────────────────────── */
#ad-sidebar {
  margin: 16px;
  min-height: 250px;
  background: var(--bg-surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Main Canvas Area ─────────────────────────────────────────────────────── */
#canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-base);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Toolbar */
#canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 52px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.toolbar-spacer {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-normal) var(--ease-spring);
  /* white-space: nowrap removed */
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 0 24px rgba(254, 44, 85, 0.5), 0 4px 12px rgba(254, 44, 85, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.btn-secondary {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Canvas zone icons */
.btn .btn-icon {
  font-size: 1em;
}

/* ── Canvas Wrapper & Scroll ──────────────────────────────────────────────── */
#canvas-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  position: relative;
}

#canvas-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-md);
  overflow: visible;
  box-shadow: var(--shadow-lg);
  cursor: crosshair;
}

#main-canvas {
  display: block;
  max-width: none;
  border-radius: var(--radius-md);
}

/* Empty state */
#empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  padding: 48px;
  text-align: center;
}
#empty-state .empty-icon {
  font-size: 4rem;
  opacity: 0.4;
}
#empty-state h2 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 600;
}
#empty-state p {
  font-size: 0.85rem;
  max-width: 300px;
  line-height: 1.6;
}

/* ── Progress Bar ─────────────────────────────────────────────────────────── */
#progress-container {
  padding: 8px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: none;
}
#progress-container.active {
  display: block;
}

#progress-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}

#progress-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: 99px;
  transition: width 200ms var(--ease-smooth);
  width: 0%;
}

#progress-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Splits Strip ─────────────────────────────────────────────────────────── */
#splits-panel {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: none;
  flex-direction: column;
}

#splits-panel.visible {
  display: flex;
}

#splits-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#splits-header h3 {
  font-size: 0.82rem;
  font-weight: 700;
  flex: 1;
}
#splits-count {
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

#splits-strip {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 110px;
  max-height: 130px;
  align-items: center;
}

.split-thumb {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all var(--dur-fast) var(--ease-smooth);
  animation: slideIn var(--dur-normal) var(--ease-spring);
}
.split-thumb.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.split-thumb canvas {
  display: block;
  height: 80px;
  width: auto;
}

.split-thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  padding: 6px 5px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.split-thumb-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
}

.split-thumb-actions {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.split-action-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #fff;
  transition: background var(--dur-fast);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Rotation indicator */
.split-rotation-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  display: none;
}
.split-rotation-badge.visible {
  display: block;
}

/* ── Bounding Box Overlays ────────────────────────────────────────────────── */
#overlay-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.bbox-rect {
  pointer-events: all;
  fill: rgba(99, 102, 241, 0.06);
  stroke: var(--accent);
  stroke-width: 2;
  /* rx: 3; */
  cursor: move;
  transition: fill var(--dur-fast);
  vector-effect: non-scaling-stroke;
}
.bbox-rect.selected {
  stroke: #a855f7;
  stroke-width: 2.5;
  fill: rgba(168, 85, 247, 0.09);
}
.bbox-rect.crop-mode {
  stroke: var(--warning);
  fill: rgba(245, 158, 11, 0.08);
}

.bbox-handle {
  pointer-events: all;
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 1.5;
  cursor: nwse-resize;
  transition: r var(--dur-fast);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.bbox-label {
  pointer-events: none;
  fill: var(--accent);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--bg-surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* Draw cursor */
#canvas-wrapper.drawing {
  cursor: crosshair;
}
#canvas-wrapper.moving {
  cursor: move;
}

/* ── Modal / Preview ─────────────────────────────────────────────────────── */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease-smooth);
}
#modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

#modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--dur-normal) var(--ease-spring);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#modal-backdrop.open #modal-box {
  transform: scale(1) translateY(0);
}

#modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
#modal-title {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}

#modal-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 200px;
}
#modal-preview-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

#modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--dur-normal) var(--ease-spring) forwards;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  max-width: 320px;
}

.toast-success {
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
}
.toast-error {
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
}
.toast-info {
  background: rgba(99, 102, 241, 0.95);
  color: #fff;
}
.toast-warning {
  background: rgba(245, 158, 11, 0.95);
  color: #fff;
}

.toast.removing {
  animation: toastOut var(--dur-normal) var(--ease-smooth) forwards;
}

/* ── Keyboard Shortcut Hint ───────────────────────────────────────────────── */
#kbd-hint {
  padding: 8px 16px;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
kbd {
  display: inline-block;
  padding: 1px 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.65rem;
  color: var(--text-secondary);
  box-shadow: 0 1px 0 var(--border-strong);
}

/* ── Zoom Controls ────────────────────────────────────────────────────────── */
#zoom-controls {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  margin: 1rem auto;
  width: fit-content;
}
#zoom-controls.visible {
  display: flex;
}
#zoom-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 44px;
  text-align: center;
}

/* ── Sensitivity Controls ─────────────────────────────────────────────────── */
.detect-settings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

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

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.spinning {
  animation: spin 0.8s linear infinite;
}

/* Detect button pulse while processing */
.processing-pulse {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ── Draw-crop overlay ────────────────────────────────────────────────────── */
#draw-overlay {
  position: absolute;
  inset: 0;
  display: none;
  cursor: crosshair;
}
#draw-overlay.active {
  display: block;
}

#draw-preview-rect {
  position: absolute;
  border: 2px dashed var(--warning);
  background: rgba(245, 158, 11, 0.1);
  border-radius: 2px;
  pointer-events: none;
  display: none;
}

/* ── Fullscreen Spinner ───────────────────────────────────────────────────── */
#global-spinner {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}
#global-spinner.active {
  display: flex;
}
#global-spinner .spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── SEO Section & Footer ─────────────────────────────────────────────────── */
.seo-wrapper {
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border);
  padding: 80px 20px;
}
.seo-container {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}
.seo-container h1 {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.seo-container .seo-main-heading {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.seo-container h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 40px 0 16px;
  font-weight: 700;
}
.seo-container p {
  margin-bottom: 16px;
}
.seo-container ol,
.seo-container ul {
  margin: 0 0 24px 24px;
}
.seo-container li {
  margin-bottom: 8px;
}
.seo-container strong {
  color: var(--accent);
  font-weight: 600;
}

.site-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-copy {
  color: var(--border-strong);
  font-size: 0.75rem;
}

/* ── Generic Text Modals ──────────────────────────────────────────────────── */
.text-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
}
.text-modal-backdrop.open {
  display: flex;
  animation: slideIn 0.2s;
}
.text-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.text-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.text-modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.text-modal-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.text-modal-content p,
.text-modal-content ul {
  margin-bottom: 16px;
}
.text-modal-content ul {
  margin-left: 24px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --sidebar-w: 260px;
  }
}

@media (max-width: 720px) {
  #main-body {
    flex-direction: column;
  }
  /* Old sidebar rule removed to avoid conflict with new collapsible sidebar */
  #ad-sidebar {
    display: none;
  }
  #zoom-controls {
    left: 16px;
  }
  .privacy-badge span {
    display: none;
  }
  #kbd-hint {
    display: none;
  }
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.gap-2 {
  gap: 8px;
}

/* Selection highlight in strip */
.split-thumb.highlighted {
  border-color: var(--warning);
}

/* Drop indicator */
.drop-active {
  outline: 3px dashed var(--accent);
  outline-offset: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   SOCIAL MEDIA SUITE
══════════════════════════════════════════════════════════════════════════ */

/* ── Social Export Elements ─────────────────────────────────────────────────── */
/* Ensure native share button behaves like primary */
.social-modal-actions .btn-primary {
  order: 1;
}
.social-modal-actions #social-btn-share {
  order: 2;
}

/* ── Landing Page Navigation ──────────────────────────────────────────────── */
.landing-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
  gap: 16px;
}

.landing-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.landing-nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s;
}

/* Feature Cards & Steps */
.feature-card-new {
  display: block;
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--dur-fast) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.feature-card-new h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.feature-card-new p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.feature-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  position: relative;
}

.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: 10px;
  right: 20px;
}

.step-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.step-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Feedback Wall Fixes */
.feedback-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.feedback-card strong {
  color: var(--text-primary);
}
.feedback-card p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (max-width: 600px) {
  .landing-nav {
    justify-content: center;
    padding: 12px 16px;
  }
  .landing-nav-links {
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* ── Social Export Modal ─────────────────────────────────────────────────── */
#social-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease-smooth);
}
#social-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

#social-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: min(96vw, 820px);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--dur-normal) var(--ease-spring);
  display: flex;
  flex-direction: column;
}
#social-modal-backdrop.open #social-modal-box {
  transform: scale(1) translateY(0);
}

.social-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.social-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1;
}

.social-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

@media (max-width: 620px) {
  .social-modal-body {
    grid-template-columns: 1fr;
  }
}

/* Platform selector pane */
.social-platform-pane {
  padding: 16px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.social-pane-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth);
  font-family: inherit;
  text-align: center;
}
.platform-btn.active {
  border-color: var(--accent);
  background: rgba(254, 44, 85, 0.1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.platform-btn-icon {
  font-size: 1.4rem;
}
.platform-btn-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}
.platform-btn-dims {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.platform-btn.active .platform-btn-name {
  color: var(--accent);
}

/* Preview + controls pane */
.social-preview-pane {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-preview-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  min-height: 160px;
  max-height: 260px;
  overflow: hidden;
  position: relative;
}
.social-preview-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}
.social-dim-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Controls inside preview pane */
.social-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-control-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
}
.social-control-row input[type="color"] {
  width: 36px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  cursor: pointer;
  flex-shrink: 0;
}
.social-control-row .form-control {
  margin: 0;
  flex: 1;
  padding: 6px 8px;
  font-size: 0.78rem;
}
.social-control-row select.form-control {
  flex: 1;
  margin: 0;
  padding: 6px 8px;
}

/* Action buttons */
.social-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Carousel / Grid Splitter Modal ──────────────────────────────────────── */
#carousel-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal) var(--ease-smooth);
}
#carousel-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

#carousel-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: min(92vw, 480px);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--dur-normal) var(--ease-spring);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#carousel-modal-backdrop.open #carousel-modal-box {
  transform: scale(1) translateY(0);
}

.carousel-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.carousel-modal-header h2 {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}

.grid-preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.grid-preset-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
}
.grid-preset-btn.active {
  border-color: var(--accent);
  background: rgba(254, 44, 85, 0.1);
  color: var(--accent);
}

.grid-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
#grid-preview-canvas {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ── Toolbar ZIP button ───────────────────────────────────────────────────── */
.btn-zip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-pdf {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ── Share This Tool Bar ─────────────────────────────────────────────────── */
#share-tool-bar {
  background: linear-gradient(
    135deg,
    rgba(254, 44, 85, 0.05),
    rgba(37, 244, 238, 0.05)
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
}
.share-tool-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-tool-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.share-tool-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.share-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--dur-fast) var(--ease-smooth);
  text-decoration: none;
}
.share-tool-btn:active {
  transform: scale(0.95);
}

.share-btn-twitter {
  background: #1da1f2;
  color: #fff;
}
.share-btn-facebook {
  background: #1877f2;
  color: #fff;
}
.share-btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.share-btn-pinterest {
  background: #e60023;
  color: #fff;
}
.share-btn-copy {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

/* ── Seo h3 ──────────────────────────────────────────────────────────────── */
.seo-container h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 28px 0 10px;
  font-weight: 700;
}

/* ── Dropdown Menu ───────────────────────────────────────────────────────── */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 180px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--dur-fast) var(--ease-spring);
}

.dropdown-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Landing Hero — TikTok Noir ─────────────────────────────────────────── */
#landing-hero {
  background: #010101;
  color: #fff;
  padding: 72px 24px;
  position: relative;
  overflow: hidden;
}
#landing-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 55%;
  height: 200%;
  background: radial-gradient(
    ellipse,
    rgba(254, 44, 85, 0.16) 0%,
    transparent 70%
  );
  pointer-events: none;
}
#landing-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -5%;
  width: 45%;
  height: 160%;
  background: radial-gradient(
    ellipse,
    rgba(37, 244, 238, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}
#landing-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
#landing-hero-text {
  flex: 1;
}
#landing-hero-text h1 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin: 0 0 18px;
  line-height: 1.08;
  background: linear-gradient(135deg, #ffffff 0%, #fe2c55 55%, #25f4ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#landing-hero-text p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 26px;
  line-height: 1.65;
}
#landing-hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}
#landing-hero-bullets li {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
}
#landing-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
#landing-hero-actions .btn {
  font-size: 0.98rem;
  padding: 12px 28px;
  border-radius: 99px;
}
#landing-hero-actions .btn-primary {
  background: linear-gradient(135deg, #fe2c55, #ff375f);
  color: #fff;
  box-shadow: 0 4px 22px rgba(254, 44, 85, 0.45);
  border: none;
}
#landing-hero-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#landing-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-width: 300px;
}
.hero-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.25s,
    transform 0.25s;
}
.hero-stat::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #fe2c55, #25f4ee);
  opacity: 0;
  transition: opacity 0.25s;
}
.hero-stat-num {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fe2c55, #25f4ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.hero-stat-label small {
  display: block;
  font-size: 0.67rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  font-weight: 400;
}

@media (max-width: 900px) {
  #landing-hero-inner {
    flex-direction: column;
  }
  #landing-hero-stats {
    width: 100%;
  }
}

/* ── GDPR Cookie Consent Banner ─────────────────────────────────────────── */
#cookie-consent {
  position: static;
  background: var(--surface-light);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  z-index: 1000;
  margin-top: 2rem;
}
#cookie-consent.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
#cookie-consent-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
#cookie-consent-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}
#cookie-consent-text span {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}
#cookie-consent-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
#cookie-consent-text strong {
  color: var(--text-primary);
}
#cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth);
  text-decoration: none;
  border: 1.5px solid transparent;
  /* white-space: nowrap removed */
}
.cookie-btn-link {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
}
.cookie-btn-decline {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.cookie-btn-accept {
  background: linear-gradient(135deg, #fe2c55, #ff375f);
  color: #fff;
  box-shadow: 0 2px 12px rgba(254, 44, 85, 0.35);
}

/* ── RESPONSIVENESS (Global / App) ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  /* Sidebar Mobile Logic */
  #sidebar {
    position: fixed !important;
    top: calc(var(--header-h) + var(--ad-top-h)) !important;
    bottom: 0 !important;
    left: calc(-1 * var(--sidebar-w)) !important;
    width: var(--sidebar-w) !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: var(--shadow-lg) !important;
  }
  #sidebar.open {
    left: 0 !important;
  }
  #sidebar.open + #sidebar-overlay {
    opacity: 1;
    pointer-events: all;
  }

  /* Ensure the workspace takes full space when sidebar is collapsed */
  #workspace {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  #sidebar {
    top: var(--header-h) !important;
  }

  /* Landing Navigation Stacking */
  .landing-nav-links {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
  }
  .landing-nav-links a {
    width: 100%;
    text-align: center;
    padding: 8px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
  }

  /* Modals sizing */
  #social-modal-box,
  #carousel-modal-box,
  .text-modal-box {
    width: 95vw;
    max-height: 90vh;
    padding: 20px;
  }

  /* Strip thumbnails size */
  .split-thumb {
    width: 60px;
    height: 60px;
  }

  /* Workspace toolbar wrapping */
  .toolbar-group {
    gap: 8px;
  }

  .btn-icon-text span {
    display: none;
  }
  .btn-icon-text {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  /* Footer links stacking */
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Ad leaderboard height adjustment */
  #ad-leaderboard {
    min-height: 60px;
    font-size: 0.65rem;
  }

  /* Modal action buttons wrapping */
  .social-modal-actions {
    justify-content: center;
  }
}

/* ═══ Premium Features ══════════════════════════════════════════════════ */
.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(254, 44, 85, 0.1);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(254, 44, 85, 0.2);
  margin-bottom: 16px;
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(254, 44, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 44, 85, 0);
  }
}

.scissor-cursor {
  cursor:
    url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNiIgY3k9IjciIHI9IjMiLz48Y2lyY2xlIGN4PSI2IiBjeT0iMTciIHI9IjMiLz48cGF0aCBkPSJNOSAxMmw0IDRNOSAxMmw0LTQiLz48cGF0aCBkPSJNMTQuOCAxMC4ybDcgNyIvPjxwYXRoIGQ9Ik0xNC44IDEzLjhsNy03Ii8+PC9zdmc+"),
    auto !important;
}

/* ═══ Global Status Bar (Is It Dark Outside + Visitors) ═══════════════════ */
.site-status-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 16px;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}
.status-label {
  font-weight: 600;
  opacity: 0.7;
}
.status-value {
  color: var(--accent);
  font-weight: 900;
  background: rgba(254, 44, 85, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.visitor-badge {
  height: 20px;
  border-radius: 3px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

@media (max-width: 600px) {
  .site-status-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* %% Extracted Inline Styles from app.html %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
.logo-img {
  width: 32px;
  height: 32px;
}
.btn-voice-toggle {
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.hidden-file-input {
  display: none;
}
.film-mode-container {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.film-mode-label {
  display: block;
  margin-bottom: 5px;
}
.undo-scrubber {
  width: 80px;
  cursor: pointer;
  accent-color: var(--accent);
}
.canvas-wrapper-hidden {
  display: none;
}
.modal-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title-text {
  margin: 0;
  font-size: 1.2rem;
}
.modal-body-padded {
  padding: 16px;
  background: var(--bg-surface-2);
}
.curtain-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.preview-img-before {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.4;
  filter: grayscale(1);
}
.curtain-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 0 0 50%);
  transition: none;
}
.preview-img-after {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.curtain-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent);
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}
.curtain-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg);
  border: 2px solid white;
}
.modal-drag-help {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 8px;
}
.modal-actions-centered {
  padding: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  border-top: 1px solid var(--border);
}
.mb-12 {
  margin-bottom: 12px;
}
.w-full {
  width: 100%;
}
.feedback-success-view {
  display: none;
  text-align: center;
}

/* ─── Amazon Affiliate Product Cards (site-wide) ─────────────────────────── */
.product-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border: 1px solid var(--border-strong);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 24px 20px;
  margin: 30px 0;
  background: var(--bg-surface);
  align-items: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-smooth);
}
.product-card img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 10px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}
.product-info {
  flex: 1;
  min-width: 200px;
}
.product-info p {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}
.product-title {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-right: 90px;
}
.buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: linear-gradient(135deg, #ffa700 0%, #ff8800 100%);
  color: #fff !important;
  font-weight: 800;
  padding: 11px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(255, 136, 0, 0.25);
  transition: all 0.2s ease;
}
.buy-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(255, 136, 0, 0.2);
}
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-grad);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(254, 44, 85, 0.25);
}
.affiliate-disclosure {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* -- Ad Banner & Social Share Styling --------------------------------------- */
.ad-container {
  width: 100%;
  max-width: 960px;
  margin: 28px auto;
  text-align: center;
}

.glass-ad-panel {
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-glow-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(254,44,85,0.15) 0%, rgba(37,244,238,0.1) 50%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  animation: pulseBlob 8s infinite alternate ease-in-out;
}

@keyframes pulseBlob {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.btn {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease !important;
}
.ad-banner-top {
  margin-top: 32px;
  margin-bottom: 32px;
}
.ad-banner-bottom {
  margin-top: 48px;
  margin-bottom: 24px;
}
.ad-desktop {
  display: block;
}
.ad-mobile {
  display: none;
}
@media (max-width: 768px) {
  .ad-desktop {
    display: none !important;
  }
  .ad-mobile {
    display: block !important;
  }
}
.ad-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.social-share-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px auto;
  padding: 12px;
  max-width: 600px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.social-share-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-body);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

@media (max-width: 600px) {
  .product-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-card img {
    width: 100%;
    height: 180px;
  }
  .product-title {
    padding-right: 0;
  }
  .product-badge {
    position: static;
    margin-bottom: 8px;
  }
}

.gear-section {
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border);
  padding: 56px 24px 48px;
}
.gear-section-inner {
  max-width: 1120px;
  margin: 0 auto;
}
.gear-section-title {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.gear-section-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto 32px;
}
/* 3-column responsive grid — collapses to 2 then 1 col on smaller screens */
.gear-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.gear-cards-grid .product-card {
  margin: 0;
  flex-direction: column;
  align-items: flex-start;
}
.gear-cards-grid .product-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 4px;
}
.gear-cards-grid .product-title {
  padding-right: 60px;
  font-size: 1rem;
}
.affiliate-disclosure {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 24px;
}

/* -- Tool Page Utilities -- */
.hero-indigo {
  background: linear-gradient(135deg, #1a1d23 0%, #4f46e5 100%);
}
.hero-red {
  background: linear-gradient(135deg, #1a1d23 0%, #fe2c55 100%);
}
.hero-amber {
  background: linear-gradient(135deg, #1a1d23 0%, #f59e0b 100%);
}
.mt-0 {
  margin-top: 0;
}
.mt-20 {
  margin-top: 20px;
}
.lh-6 {
  line-height: 1.6;
}
.pl-20 {
  padding-left: 20px;
}
.convert-article {
  max-width: 860px;
  margin: 20px auto 40px;
  padding: 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.drop-icon {
  font-size: 2.5rem;
}
.drop-text {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-top: 8px;
}

/* -- Ad Utility Classes -- */
.ad-app-wrapper {
  max-width: 960px;
  margin: 32px auto 0;
  padding: 0 24px;
}
/* -- Sidebar Ad Layout ------------------------------------------------------ */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-sidebar {
  display: none;
}
.ad-sidebar-sticky {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.ad-sidebar-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-align: center;
}
@media (min-width: 1024px) {
  .page-with-sidebar {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
  .page-sidebar {
    display: block;
  }
}

/* -- Game Strip -------------------------------------------------------------- */
.game-strip-container {
  max-width: 1400px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.game-strip-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.game-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
}
.game-strip-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-strip-shuffle {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  background: var(--accent-grad);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
}
.game-strip-frame-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: var(--bg-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-strip-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.game-strip-footer {
  padding: 8px 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border);
}
.ad-wrap-bottom {
  position: relative;
  width: 100%;
  z-index: 900;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  padding: 8px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
}
@media (max-width: 640px) {
  .game-strip-frame-wrap {
    height: 320px;
  }
}


/* --- UI STANDARDIZATION --- */
.main-content, .tool-container, main {
  margin: 0 auto !important;
  max-width: 1200px !important;
}
.hero, .empty-state, .split-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}


#amazon-widget-grid, .amazon-widget-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}
