:root {
  --bg-primary: #0A0D14;
  --bg-surface: rgba(20, 24, 36, 0.75);
  --bg-card: rgba(28, 34, 52, 0.9);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-active: #EE4D2D;
  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;
  --shopee-orange: #EE4D2D;
  --shopee-orange-hover: #D73C1E;
  --success-emerald: #10B981;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #05070B;
  font-family: var(--font-family);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* App Container Stage */
#live-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  #live-stage {
    height: 94vh;
    max-height: 880px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 12px #111520;
  }
}

/* 1. Full-Screen Mirror Viewport */
.mirror-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  z-index: 1;
}

.mirror-video,
.live-mirror-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  transform-origin: center center;
}

.mirror-video {
  z-index: 2;
}

.live-mirror-canvas {
  z-index: 3;
}

/* Before / After Comparison Slider */
.slider-comparison-box {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000000;
  overflow: hidden;
  --slider-pos: 50%;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  pointer-events: none;
}

.img-before {
  z-index: 1;
}

.img-after {
  z-index: 2;
  clip-path: polygon(0 0, var(--slider-pos, 50%) 0, var(--slider-pos, 50%) 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, var(--slider-pos, 50%) 0, var(--slider-pos, 50%) 100%, 0 100%);
}

.slider-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 5;
  cursor: ew-resize;
}

.slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  z-index: 3;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #0A0D14;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  z-index: 4;
  pointer-events: none;
}

.slider-badge {
  position: absolute;
  top: 76px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.badge-before {
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #CBD5E1;
}

.badge-after {
  left: 14px;
  background: var(--shopee-orange);
  color: #FFFFFF;
}

/* 2. Top Navigation Bar */
.top-nav-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand-badge-group {
  display: flex;
  flex-direction: column;
}

.brand-logo {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.brand-logo span {
  color: var(--shopee-orange);
}

.creator-badge {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-pose-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid var(--border-glass);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-pose-btn:active {
  transform: scale(0.94);
}

.nav-icon-btn {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-glass);
  color: #FFFFFF;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  cursor: pointer;
}

/* 3. Floating Garment Card (Slim & Ultra-Compact) */
.floating-outfit-card {
  position: absolute;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  left: 10px;
  right: 10px;
  z-index: 26;
  background: rgba(18, 22, 34, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

.outfit-thumb-container {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.floating-outfit-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.outfit-thumb-container:active .floating-outfit-thumb {
  transform: scale(1.1);
}

.thumb-zoom-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  font-size: 0.52rem;
  line-height: 1;
  padding: 1px 2px;
  border-top-left-radius: 4px;
}

.floating-outfit-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.floating-outfit-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.floating-outfit-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.floating-outfit-price {
  font-size: 0.74rem;
  font-weight: 800;
  color: #F8FAFC;
}

.aff-secure-badge {
  font-size: 0.54rem;
  color: var(--success-emerald);
  font-weight: 600;
  white-space: nowrap;
}

.floating-outfit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-render-action {
  background: linear-gradient(135deg, #EE4D2D 0%, #FF6536 100%);
  color: #FFFFFF;
  border: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.35);
  transition: transform 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-render-action:active {
  transform: scale(0.95);
}

.btn-save-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn-save-action:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.22);
}

.btn-buy-shopee {
  background: var(--shopee-orange);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.35);
  transition: transform 0.15s ease;
}

.btn-buy-shopee:active {
  transform: scale(0.95);
}

/* 3B. Result Floating Bar (Bottom Sheet with Expand / Collapse Gesture) */
.result-floating-bar {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 35;
  background: rgba(16, 20, 32, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75);
  animation: slide-up-fade 0.25s ease-out;
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Pull / Swipe Handle Header */
.result-drag-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 2px 0 6px;
  width: 100%;
}

.result-drag-handle-pill {
  width: 40px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  margin-bottom: 6px;
  transition: background 0.2s ease, width 0.2s ease;
}

.result-drag-header:hover .result-drag-handle-pill,
.result-drag-header:active .result-drag-handle-pill {
  background: var(--shopee-orange);
  width: 48px;
}

.result-minimized-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2px 4px;
}

.min-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.min-badge {
  font-size: 0.52rem;
  font-weight: 900;
  background: rgba(238, 77, 45, 0.2);
  color: var(--shopee-orange);
  border: 1px solid rgba(238, 77, 45, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.min-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-toggle-sheet {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-toggle-sheet:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.18);
}

.sheet-chevron-icon {
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* Collapsed State: Turun ke bawah, menyisakan header handle ramping */
.result-floating-bar.collapsed {
  transform: translateY(calc(100% - 46px));
  background: rgba(12, 16, 26, 0.88);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.result-floating-bar.collapsed .sheet-chevron-icon {
  transform: rotate(180deg);
}

.result-floating-bar.collapsed .result-sheet-content {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
}

.result-sheet-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  transition: opacity 0.2s ease, max-height 0.3s ease;
}

@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-info-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.result-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.result-tag {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--shopee-orange);
  letter-spacing: 0.5px;
}

.result-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-price {
  font-size: 0.86rem;
  font-weight: 800;
  color: #F8FAFC;
  flex-shrink: 0;
}

.result-actions-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-primary-save {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary-save:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.2);
}

.btn-primary-shopee {
  background: linear-gradient(135deg, #EE4D2D 0%, #FF6536 100%);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.4);
  transition: transform 0.15s ease;
}

.btn-primary-shopee:active {
  transform: scale(0.96);
}

.result-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
}

.btn-sub-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-sub-action:active {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* 4. Bottom Filter Carousel */
.bottom-carousel-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.carousel-container {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 28px 4px 6px;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  flex: 0 0 54px;
  flex-shrink: 0;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  outline: none;
  transition: transform 0.15s ease;
}

.carousel-item:active {
  transform: scale(0.92);
}

.carousel-item-img {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background: #111520;
  display: block;
  flex-shrink: 0;
}

.carousel-item.active .carousel-item-img {
  border-color: var(--shopee-orange);
  box-shadow: 0 0 0 2.5px rgba(238, 77, 45, 0.45);
  transform: scale(1.05);
}

.carousel-item .item-name {
  font-size: 0.58rem;
  color: var(--text-muted);
  width: 52px;
  max-width: 52px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: block;
  font-weight: 600;
}

.carousel-item.active .item-name {
  color: #FFFFFF;
  font-weight: 700;
}

.btn-paste-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.paste-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(238, 77, 45, 0.18);
  border: 2px dashed var(--shopee-orange);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  color: var(--shopee-orange);
}

/* 5. Slide-Up Bottom Sheet */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sheet-card {
  background: #141824;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  align-self: center;
  margin-bottom: 4px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
}

.sheet-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sheet-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.sheet-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  color: #FFFFFF;
  font-size: 0.85rem;
  outline: none;
}

.sheet-input:focus {
  border-color: var(--shopee-orange);
}

.btn-sheet-submit {
  width: 100%;
  background: var(--shopee-orange);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.sheet-footer-info {
  font-size: 0.68rem;
  color: var(--success-emerald);
  text-align: center;
}

/* Modals */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-card {
  position: relative;
  background: #141824;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.modal-close-corner {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.modal-close-corner:hover {
  color: #FFFFFF;
}

.modal-icon {
  font-size: 2.2rem;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
}

.modal-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-modal-checkout {
  background: var(--shopee-orange);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-sm);
  display: block;
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: none;
  font-size: 0.8rem;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Loading Card */
.loading-card {
  align-items: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--shopee-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Enhanced Progressive Step Loader */
.loading-icon-pulse {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--shopee-orange);
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.loading-icon-emoji {
  font-size: 26px;
  animation: bounce-subtle 1.8s ease-in-out infinite;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.stepper-progress-container {
  width: 100%;
  max-width: 250px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0 10px;
}

.stepper-bar-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #EE4D2D 0%, #FF8A00 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(238, 77, 45, 0.5);
}

.active-step-text {
  font-weight: 700 !important;
  color: #FFFFFF !important;
  font-size: 0.85rem !important;
  min-height: 22px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.loading-steps-pills {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.65rem;
  color: #64748B;
  transition: all 0.3s ease;
}

.step-pill .step-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748B;
  transition: all 0.3s ease;
}

.step-pill.active {
  background: rgba(238, 77, 45, 0.15);
  border-color: rgba(238, 77, 45, 0.4);
  color: #FF8A00;
  font-weight: 700;
}

.step-pill.active .step-dot {
  background: #EE4D2D;
  box-shadow: 0 0 6px #EE4D2D;
}

.step-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
}

.step-pill.completed .step-dot {
  background: #10B981;
}

.loading-eta-tag {
  font-size: 0.68rem;
  color: #94A3B8;
  margin-top: 10px;
}

/* ====================================================
   Recommendation Avatar Circles (Komisi XTRA)
   ==================================================== */
.recom-avatar-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.recom-xtra-pill {
  position: absolute;
  top: -4px;
  right: -6px;
  background: linear-gradient(135deg, #EE4D2D 0%, #FF2E2E 100%);
  color: #FFFFFF;
  font-size: 0.50rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.6);
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

/* Result Bar Recommendation Section */
.result-recom-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recom-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}

.recom-badge-tag {
  font-size: 0.62rem;
  font-weight: 800;
  color: #FFA500;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.recom-sub-hint {
  font-size: 0.58rem;
  color: #94A3B8;
}

.recom-avatars-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
}

.recom-avatars-row::-webkit-scrollbar {
  display: none;
}

.recom-circle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
  transition: transform 0.15s ease;
}

.recom-circle-btn:active {
  transform: scale(0.92);
}

.recom-circle-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(238, 77, 45, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(238, 77, 45, 0.25);
  background: #111520;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.recom-circle-btn:hover .recom-circle-img {
  border-color: #FF6536;
  box-shadow: 0 0 12px rgba(238, 77, 45, 0.6);
}

.recom-circle-label {
  font-size: 0.56rem;
  color: #E2E8F0;
  font-weight: 600;
  max-width: 54px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* ====================================================
   Camera Shutter, Viewfinder & Flash FX
   ==================================================== */

/* Screen Flash when Shutter Pressed */
.camera-flash {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 45;
  transition: opacity 0.04s ease-out;
}

.camera-flash.flash-active {
  opacity: 0.85;
  transition: none;
}

/* Viewfinder Framing Guide */
.camera-viewfinder-guide {
  position: absolute;
  inset: 54px 16px 90px 16px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.viewfinder-tips-banner {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  color: #F8FAFC;
  width: calc(100% - 32px);
  max-width: 340px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  text-align: center;
  pointer-events: none;
}

.viewfinder-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(255, 255, 255, 0.4);
  border-style: solid;
}

.viewfinder-corner.top-left {
  top: 0;
  left: 0;
  border-width: 2.5px 0 0 2.5px;
  border-top-left-radius: 6px;
}

.viewfinder-corner.top-right {
  top: 0;
  right: 0;
  border-width: 2.5px 2.5px 0 0;
  border-top-right-radius: 6px;
}

.viewfinder-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 2.5px 2.5px;
  border-bottom-left-radius: 6px;
}

.viewfinder-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 2.5px 2.5px 0;
  border-bottom-right-radius: 6px;
}

.viewfinder-hint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--shopee-orange);
  animation: hint-pulse 1.8s infinite ease-in-out;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Camera Shutter Bar (Centered ergonomically in Camera Mode) */
.camera-shutter-bar {
  position: absolute;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  z-index: 24;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.camera-shutter-bar > * {
  pointer-events: auto;
}

/* Shutter Button (Native Style) */
.camera-shutter-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.camera-shutter-btn:active {
  transform: scale(0.91);
}

.shutter-outer-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.92);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), inset 0 0 10px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.22);
}

.shutter-inner-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.08s ease, background-color 0.1s ease;
}

.camera-shutter-btn:active .shutter-inner-disc {
  transform: scale(0.88);
  background: #E2E8F0;
}

/* Auxiliary Camera Buttons (Flip, Retake, Gallery) */
.cam-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.cam-action-btn:active {
  transform: scale(0.92);
  background: rgba(30, 41, 59, 0.85);
}

.cam-retake-btn {
  background: rgba(238, 77, 45, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}

.cam-btn-label {
  font-size: 0.52rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 1px;
  letter-spacing: 0.2px;
}

/* ====================================================
   Garment Zoom & Detail Modal
   ==================================================== */
.garment-zoom-card {
  max-width: 360px;
  padding: 18px 16px;
  text-align: left;
  gap: 12px;
}

.garment-zoom-image-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0B0E17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.garment-zoom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.garment-zoom-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.garment-zoom-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.garment-zoom-title {
  font-size: 1rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  margin-top: 2px;
}

.garment-zoom-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.garment-zoom-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--shopee-orange);
}

.garment-zoom-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.garment-zoom-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.btn-zoom-tryon {
  width: 100%;
  background: linear-gradient(135deg, #EE4D2D 0%, #FF6536 100%);
  color: #FFFFFF;
  border: none;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(238, 77, 45, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease;
}

.btn-zoom-tryon:active {
  transform: scale(0.96);
}

.btn-zoom-shopee {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.15s ease;
}

.btn-zoom-shopee:active {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------------------------------------------------- */
/* 9. Virtual Fitting Room Queue Modal                  */
/* ---------------------------------------------------- */
.queue-card {
  text-align: center;
  max-width: 340px;
  border: 1px solid rgba(238, 77, 45, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(238, 77, 45, 0.2);
}

.queue-icon-circle {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.queue-spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(238, 77, 45, 0.2);
  border-top-color: var(--shopee-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.queue-booth-emoji {
  font-size: 28px;
  z-index: 1;
}

.queue-status-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  margin: 14px 0 12px;
}

.queue-meta-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.queue-meta-label {
  font-size: 0.70rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.queue-meta-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
}

.queue-meta-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.queue-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.queue-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #EE4D2D, #FFA07A, #EE4D2D);
  background-size: 200% 100%;
  border-radius: 999px;
  animation: shimmerProgress 1.8s ease-in-out infinite;
}

@keyframes shimmerProgress {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.queue-foot-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 14px;
}

.btn-cancel-queue {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-queue:hover, .btn-cancel-queue:active {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
