/* ==========================================================================
   LUI CUTOUT AI — BACKGROUND REMOVER & PRODUCT STUDIO
   Cyberpunk & Glassmorphism Theme (luifierey.my.id)
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-surface: #0e1422;
  --bg-surface-glass: rgba(14, 20, 34, 0.85);
  --bg-surface-elevated: #131b2e;

  --neon-cyan: #00f0ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.35);
  --neon-orange: #f59e0b;
  --neon-orange-glow: rgba(245, 158, 11, 0.25);
  --neon-green: #10b981;
  --neon-green-glow: rgba(16, 185, 129, 0.25);
  --neon-purple: #818cf8;
  --neon-purple-glow: rgba(129, 140, 248, 0.25);
  --neon-pink: #f43f5e;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow-cyan: rgba(0, 240, 255, 0.35);

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-hud: 'Plus Jakarta Sans', sans-serif;
  --font-logo: 'Orbitron', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Global Reset & Hidden Scrollbar */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html, body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

main, .studio-wrapper {
  flex: 1 0 auto;
}

/* Background Effects with 60FPS Ambient Animation */
.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  z-index: 0;
  animation: cyberGridDrift 90s linear infinite;
}

@keyframes cyberGridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 38px 38px; }
}

.bg-glow-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
}

.bg-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.22) 0%, rgba(0, 136, 255, 0.08) 45%, transparent 70%);
  top: -120px;
  left: -80px;
}

.bg-orb-2 {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(176, 38, 255, 0.20) 0%, rgba(99, 102, 241, 0.07) 45%, transparent 70%);
  bottom: -100px;
  right: -80px;
}

.bg-orb-3 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.16) 0%, rgba(0, 240, 255, 0.05) 45%, transparent 70%);
  top: 38%;
  right: 25%;
}

@media (max-width: 768px) {
  .hud-nav, .glassmorphism, .hud-bottom-bar, .app-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(14, 16, 26, 0.95) !important;
  }
}

@keyframes floatOrb1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(80px, 60px, 0) scale(1.15);
    opacity: 0.48;
  }
  100% {
    transform: translate3d(-40px, 100px, 0) scale(0.95);
    opacity: 0.32;
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.30;
  }
  50% {
    transform: translate3d(-90px, -70px, 0) scale(1.18);
    opacity: 0.44;
  }
  100% {
    transform: translate3d(40px, -110px, 0) scale(0.92);
    opacity: 0.28;
  }
}

@keyframes floatOrb3 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.22;
  }
  50% {
    transform: translate3d(-70px, 50px, 0) scale(1.22);
    opacity: 0.34;
  }
  100% {
    transform: translate3d(60px, -40px, 0) scale(0.92);
    opacity: 0.20;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow-orb, .bg-grid-overlay {
    animation: none !important;
  }
}

.container, .main-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Glassmorphism */
.glassmorphism {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

/* HUD Navigation */
.hud-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  padding: 0;
}
.nav-container {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
}
.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.75));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.95));
}
.logo-circle-glow {
  display: contents;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-family: var(--font-logo, 'Orbitron', sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  display: block;
  white-space: nowrap;
  color: #ffffff;
  line-height: 1.2;
}

.text-gradient {
  color: var(--neon-cyan, #00f0ff);
  background: none;
  -webkit-text-fill-color: initial;
  font-weight: 900;
}
.brand-sub {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--neon-cyan, #00f0ff);
  display: block;
  white-space: nowrap;
  margin-top: 2px;
}
.brand-sub-author {
  color: #ffffff;
}

.hud-status-center {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-pill, .privacy-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-pill { color: var(--neon-cyan); border-color: rgba(0,240,255,0.3); }
.privacy-pill { color: var(--neon-green); border-color: rgba(0,255,136,0.3); }

/* Tool Dropdown Menu */
.tool-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.tool-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 13, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0f4fc;
  padding: 6px 14px;
  border-radius: 10px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 38px;
}
.tool-dropdown-btn:hover, .tool-dropdown-wrap.open .tool-dropdown-btn {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  color: #fff;
}
.tool-dropdown-btn .dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.25s ease;
}
.tool-dropdown-wrap.open .dropdown-arrow {
  transform: rotate(180deg);
}
.tool-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: rgba(10, 13, 24, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.15);
  z-index: 1000;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tool-dropdown-wrap.open .tool-dropdown-menu {
  display: block;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
  padding: 6px 12px 8px;
  font-size: 0.65rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 800;
  color: var(--text-dim, #8e9bb8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #f0f4fc;
  transition: all 0.18s ease;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
  color: #fff;
}
.dropdown-item.active {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
}
.dropdown-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--neon-cyan) !important;
}
.dropdown-item-title {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.dropdown-item-desc {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.68rem;
  color: #8e9bb8;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-sawer-nav, .btn-support-nav, .hud-btn-support {
  height: 38px;
  background: rgba(0, 240, 255, 0.08);
  border: 1.5px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  text-decoration: none;
}
.btn-sawer-nav i, .btn-support-nav i, .hud-btn-support i {
  color: var(--neon-cyan) !important;
  transition: color 0.2s ease;
}
.btn-sawer-nav:hover, .btn-support-nav:hover, .hud-btn-support:hover {
  background: var(--neon-cyan);
  color: #07090e;
  box-shadow: 0 0 18px var(--neon-cyan-glow);
  transform: translateY(-1px);
}
.btn-sawer-nav:hover i, .btn-support-nav:hover i, .hud-btn-support:hover i {
  color: #07090e !important;
}
.btn-back-main, .btn-nav-back, .hud-back-btn {
  height: 38px;
  width: 38px;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1.5px solid var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn-back-main:hover, .btn-nav-back:hover, .hud-back-btn:hover {
  background: var(--neon-cyan);
  color: #07090e;
  box-shadow: 0 0 18px var(--neon-cyan-glow);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  padding: 30px 0 20px;
  text-align: center;
}
.hero-badge, .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-hud);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 40%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 25px;
  font-size: 0.92rem;
}

/* Upload Dropzone */
.file-input-hidden {
  display: none !important;
}

.dropzone-section {
  width: 100%;
}

.dropzone-wrapper, .dropzone-card {
  max-width: 860px;
  margin: 0 auto 30px;
  padding: 48px 24px;
  border: 2px dashed rgba(0, 240, 255, 0.35);
  border-radius: 24px;
  background: rgba(10, 13, 24, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.dropzone-wrapper:hover, .dropzone-wrapper.dragover, .dropzone-card:hover, .dropzone-card.dragover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}
.dropzone-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(176, 38, 255, 0.2));
  border: 1px solid rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.dropzone-title {
  font-family: var(--font-hud);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.dropzone-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.kbd-hint {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  vertical-align: middle;
}
.dropzone-btn, .btn-select-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  background: linear-gradient(135deg, #00f0ff, #0088ff);
  color: #020617;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: all 0.25s ease;
}
.dropzone-btn:hover, .btn-select-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}
.dropzone-samples, .sample-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.sample-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.sample-pill {
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sample-pill:hover {
  background: rgba(0, 240, 255, 0.15);
  color: #fff;
  border-color: var(--neon-cyan);
}

/* Editor Workspace Container */
.editor-workspace {
  display: none;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 40px;
}
@media (max-width: 960px) {
  .editor-workspace {
    grid-template-columns: 1fr;
  }
}

/* Stage & Split Comparison Slider */
.stage-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stage-card {
  position: relative;
  background: #090c16;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkerboard transparent pattern */
.checkerboard-pattern {
  background-color: #0f1322;
  background-image: 
    linear-gradient(45deg, #161c32 25%, transparent 25%), 
    linear-gradient(-45deg, #161c32 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #161c32 75%), 
    linear-gradient(-45deg, transparent 75%, #161c32 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.canvas-container {
  position: relative;
  width: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  user-select: none;
  overflow: hidden;
}
.canvas-container.panning {
  cursor: grabbing !important;
}
.canvas-container.pan-ready {
  cursor: grab !important;
}

/* Modern Clip-Path Split Comparison Slider */
.comparison-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 520px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  user-select: none;
  touch-action: none;
  --split-pos: 50%;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

#resultCanvas {
  display: block;
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  cursor: crosshair;
}

.comparison-before-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  clip-path: polygon(0 0, var(--split-pos, 50%) 0, var(--split-pos, 50%) 100%, 0 100%);
  z-index: 10;
}

#beforeCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split-pos, 50%);
  width: 3px;
  transform: translateX(-50%);
  background: var(--neon-cyan);
  cursor: ew-resize;
  z-index: 25;
  box-shadow: 0 0 14px var(--neon-cyan);
}
.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #020617;
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.7);
}

/* Dynamic Interactive Brush Cursor */
.brush-cursor {
  position: absolute;
  pointer-events: none;
  border: 2px solid #00f0ff;
  background: rgba(0, 240, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 35;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* Auto AI Status Badge */
.auto-ai-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 0.73rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

/* PhotoRoom Style Bottom Quick Actions */
.photoroom-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(10, 13, 24, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.pr-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f4fc;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 38px;
}
.pr-action-btn:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
}
.pr-action-btn.pr-btn-primary {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #07090e;
  font-weight: 800;
  box-shadow: 0 4px 15px var(--neon-cyan-glow);
}
.pr-action-btn.pr-btn-primary:hover {
  background: #33f3ff;
  color: #000;
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

/* Brush Retouch Tools Panel */
.brush-tools-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.brush-actions-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.brush-tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0f4fc;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.brush-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.brush-tool-btn.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.text-rose { color: #fb7185 !important; }
.text-green { color: #34d399 !important; }

/* AI Processing Holographic HUD Overlay (Fullscreen Modal) */
.ai-processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ai-processing-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ai-loader-card {
  max-width: 440px;
  width: 100%;
  background: rgba(13, 18, 36, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 22px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 240, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* Futuristic Scanner Visual */
.ai-scanner-visual {
  width: 86px;
  height: 86px;
  position: relative;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.2);
}
.ai-scanner-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f0ff, transparent);
  box-shadow: 0 0 16px #00f0ff, 0 0 6px #fff;
  will-change: transform, opacity;
  animation: scanbeam 1.2s ease-in-out infinite alternate;
}
@keyframes scanbeam {
  0% { transform: translate3d(0, 0, 0); opacity: 0.3; }
  50% { opacity: 1; }
  100% { transform: translate3d(0, 82px, 0); opacity: 0.3; }
}

/* Centering Dropdown Menu */
.center-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.micro-arrow {
  font-size: 0.62rem;
  margin-left: 2px;
  transition: transform 0.2s ease;
}
.center-dropdown-wrap.open .micro-arrow {
  transform: rotate(180deg);
}
.center-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: rgba(10, 13, 24, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}
.center-dropdown-wrap.open .center-dropdown-menu {
  display: flex;
}
.center-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}
.center-menu-item:hover {
  background: rgba(0, 240, 255, 0.12);
  color: #fff;
}
.center-menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.center-menu-item .menu-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.center-menu-item .menu-desc {
  font-size: 0.66rem;
  color: var(--text-muted);
}
.menu-subdivider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}
.ai-scanner-icon {
  font-size: 2.2rem;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.7));
  animation: pulse-icon 2s ease-in-out infinite;
}
@keyframes pulse-icon {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 18px var(--neon-cyan)); }
}

.ai-badge-engine {
  margin-bottom: 12px;
}

.ai-progress-title {
  font-family: var(--font-hud);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.ai-progress-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

.ai-progress-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.ai-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.ai-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  box-shadow: 0 0 12px var(--neon-cyan);
  transition: width 0.3s ease;
  border-radius: 20px;
}
.ai-progress-percent {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--neon-cyan);
  min-width: 42px;
  text-align: right;
}

/* Stage Bottom Toolbar */
.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 13, 24, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  flex-wrap: wrap;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.toolbar-btn:hover, .toolbar-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: #fff;
  border-color: var(--neon-cyan);
}

/* Studio Simplified Tabbed Sidebar */
.studio-sidebar {
  display: flex;
  flex-direction: column;
}
.sidebar-main-card {
  background: rgba(10, 13, 24, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Sidebar Top 3 Tabs */
.sidebar-tabs-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}
.side-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.side-tab-btn i {
  font-size: 0.95rem;
}
.side-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.side-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: rgba(0, 240, 255, 0.4);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Tab Content Panels */
.tab-content-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tab-content-panel.hidden {
  display: none !important;
}
.tab-help-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

/* Info Pill Box */
.info-pill-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  font-size: 0.75rem;
  color: #e2e8f0;
  line-height: 1.4;
}

/* Advanced Edge Collapsible Details */
.advanced-edge-details {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
}
.advanced-edge-details summary {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  outline: none;
}
.advanced-edge-details summary:hover {
  color: #fff;
}
.advanced-edge-details[open] summary {
  margin-bottom: 8px;
  color: var(--neon-cyan);
}

/* Canvas Aspect Ratio Selector */
.ratio-section {
  margin-bottom: 4px;
}
.section-micro-header {
  font-size: 0.72rem;
  font-family: var(--font-hud);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ratio-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ratio-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ratio-chip i {
  font-size: 0.85rem;
}
.ratio-chip:hover {
  background: rgba(0, 240, 255, 0.1);
  color: #ffffff;
  border-color: rgba(0, 240, 255, 0.35);
}
.ratio-chip.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

/* Interactive Zoom & Pan Controls in Retouch Tab */
.zoom-controls-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.zoom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.zoom-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-cyan);
  font-weight: 700;
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.zoom-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.zoom-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}
.zoom-slider-input {
  flex: 1;
  cursor: pointer;
}
.zoom-btn-reset {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.zoom-btn-reset:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.zoom-pan-hint {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom-pan-hint b {
  color: var(--text-muted);
}

/* Brush Action Buttons (Kuas Hapus, Kuas Pulihkan, Undo, Redo) */
.brush-actions-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.brush-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.brush-tool-btn:hover {
  background: rgba(0, 240, 255, 0.12);
  color: #fff;
  border-color: rgba(0, 240, 255, 0.35);
}
.brush-tool-btn.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}
.brush-tool-btn.disabled,
.brush-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Fixed Export Card in Sidebar */
.sidebar-export-card {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}
.btn-download-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--neon-cyan);
  color: #07090e;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  transition: all 0.2s ease;
}
.btn-download-main:hover {
  background: #33f3ff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.6);
}
.sub-export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-sub-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sub-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Background Mode Switcher Tabs */
.bg-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}
.bg-tab-btn {
  padding: 6px 4px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.bg-tab-btn.active {
  background: rgba(0, 240, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Solid Color Swatches */
.swatches-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.color-swatch:hover, .color-swatch.active {
  transform: scale(1.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  z-index: 2;
}

/* Preset Studio Background Cards */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.preset-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}
.preset-card:hover, .preset-card.active {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transform: scale(1.04);
}
.preset-card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preset-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
  font-weight: 600;
}

/* Object Effects (Shadow & Glow) */
.effect-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.effect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}
.effect-slider {
  width: 100%;
  accent-color: var(--neon-cyan);
  height: 5px;
  cursor: pointer;
}

/* Export Actions */
.export-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-export-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f0ff, #0077ff);
  color: #020617;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 900;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  transition: all 0.25s;
}
.btn-export-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.6);
}
.btn-export-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #f0f4fc;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-export-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(10, 13, 24, 0.95);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS — MOBILE ERGONOMICS & THUMB ZONE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hud-status-center {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Navbar Mobile Layout */
  .hud-nav {
    min-height: 60px;
  }
  .nav-container {
    padding: 0 14px;
    gap: 8px;
  }
  .brand-logo-img {
    width: 28px;
    height: 28px;
  }
  .brand-title {
    font-size: 0.88rem;
    letter-spacing: 0.5px;
  }
  .brand-sub {
    font-size: 0.6rem;
  }
  .nav-actions {
    gap: 6px;
  }
  .tool-dropdown-btn {
    padding: 6px 9px;
    font-size: 0.74rem;
    border-radius: 8px;
  }
  .dropdown-btn-label {
    display: none; /* Icon + arrow only on mobile */
  }
  .tool-dropdown-menu {
    width: 260px;
    max-width: calc(100vw - 28px);
    right: 0;
  }
  .hud-btn-support {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .support-label {
    display: none; /* Compact icon button on mobile */
  }
  .hud-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  /* Hero Section */
  .hero-section {
    padding: 20px 0 14px;
  }
  .hero-title {
    font-size: 1.45rem;
    letter-spacing: 1px;
    line-height: 1.25;
    margin-bottom: 6px;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0 8px;
  }

  /* Dropzone Section */
  .dropzone-card {
    padding: 26px 14px;
    border-radius: 16px;
  }
  .dropzone-icon-wrap {
    width: 58px;
    height: 58px;
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
  .dropzone-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  .dropzone-desc {
    font-size: 0.78rem;
    margin-bottom: 14px;
  }
  .dropzone-desc .kbd-hint {
    display: none; /* Hide keyboard shortcut on phones */
  }
  .btn-select-file {
    width: 100%;
    height: 48px;
    font-size: 0.84rem;
    font-weight: 800;
    justify-content: center;
    border-radius: 12px;
  }

  /* Editor Workspace */
  .editor-workspace {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  /* Stage & Split Comparison Viewer */
  .stage-card {
    min-height: 260px;
    max-height: 380px;
    border-radius: 16px;
  }
  .canvas-container {
    min-height: 260px;
    max-height: 380px;
    padding: 6px;
  }
  .comparison-wrapper {
    max-height: 360px;
    width: auto;
    max-width: 100%;
    border-radius: 10px;
  }
  #resultCanvas, #beforeCanvas {
    max-height: 360px;
    max-width: 100%;
    object-fit: contain;
  }
  .comparison-handle {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }

  /* PhotoRoom Quick Actions Bar */
  .photoroom-actions-bar {
    padding: 6px 8px;
    gap: 6px;
    border-radius: 12px;
    width: 100%;
    justify-content: space-between;
  }
  .pr-action-btn {
    flex: 1 1 auto;
    padding: 7px 8px;
    font-size: 0.72rem;
    justify-content: center;
    min-height: 36px;
    border-radius: 8px;
  }

  /* Stage Bottom Toolbar */
  .stage-toolbar {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
  }
  .toolbar-group {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .toolbar-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.72rem;
    justify-content: center;
    border-radius: 8px;
  }
  .center-dropdown-menu {
    min-width: 180px;
    max-width: calc(100vw - 32px);
    left: auto;
    right: 0;
  }

  /* Studio Sidebar Controls */
  .sidebar-main-card {
    padding: 14px 12px;
    border-radius: 16px;
    gap: 12px;
  }
  .sidebar-tabs-nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
  }
  .side-tab-btn {
    padding: 6px 2px;
    font-size: 0.68rem;
    gap: 2px;
  }
  .side-tab-btn i {
    font-size: 0.85rem;
  }
  .ratio-chips-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .ratio-chip {
    padding: 6px 2px;
    font-size: 0.65rem;
  }
  .bg-mode-tabs {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    padding: 3px;
  }
  .bg-tab-btn {
    padding: 6px 2px;
    font-size: 0.68rem;
  }
  .swatches-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }
  .presets-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .brush-actions-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .brush-tool-btn {
    padding: 8px 6px;
    font-size: 0.72rem;
  }
  .btn-download-main {
    width: 100%;
    min-height: 48px;
    font-size: 0.84rem;
    border-radius: 12px;
  }
  .sub-export-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .btn-sub-action {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 0.72rem;
  }

  /* AI Holographic Modal */
  .ai-loader-card {
    padding: 24px 16px;
    border-radius: 18px;
    max-width: 90vw;
  }
  .ai-scanner-visual {
    width: 72px;
    height: 72px;
  }
  .ai-progress-title {
    font-size: 1rem;
  }
  .ai-progress-desc {
    font-size: 0.76rem;
  }
}

@media (max-width: 380px) {
  /* Extra narrow screens */
  .brand-title {
    font-size: 0.82rem;
  }
  .brand-sub {
    display: none;
  }
  .pr-action-btn span {
    font-size: 0.66rem;
  }
  .toolbar-btn span {
    font-size: 0.66rem;
  }
}

/* ==========================================================================
   UNIFIED HUD BOTTOM BAR (SUITE FOOTER)
   ========================================================================== */
.hud-bottom-bar {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 16px 16px 0 0;
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  position: relative;
  z-index: 50;
}
.bottom-bar-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.bottom-bar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.bottom-bar-brand strong {
  color: #ffffff;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-divider {
  color: var(--text-dim);
}
.brand-suite {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  color: var(--neon-green, #00ff88);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 6px;
}
.bottom-bar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bottom-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.bottom-link:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}
.bottom-link.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}
@media (max-width: 860px) {
  .bottom-bar-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 12px 14px;
  }
  .bottom-bar-links {
    justify-content: center;
  }
}

