/*!****************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/[locale]/generate/components/ImageLibraryModal.css ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************/
/* ===== Image Library Modal - 圖片庫彈窗 ===== */

.library-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.library-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Header ===== */
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.library-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.library-title svg {
  color: #6366f1;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* ===== Tabs ===== */
.library-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.library-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.library-tab:hover {
  background: #f3f4f6;
  color: #374151;
}

.library-tab.active {
  background: #6366f1;
  color: #fff;
}

.library-tab.active svg {
  color: #fff;
}

/* ===== Toolbar ===== */
.library-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.search-box svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: #374151;
}

.search-box input::-moz-placeholder {
  color: #9ca3af;
}

.search-box input::placeholder {
  color: #9ca3af;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.toolbar-btn.refresh {
  color: #6366f1;
}

.toolbar-btn.refresh:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

/* ===== Content ===== */
.library-content {
  flex: 1;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

/* ===== Asset Grid ===== */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.875rem;
}

.asset-card {
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.asset-card:hover {
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.asset-card.selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.asset-image {
  aspect-ratio: 1;
  background: #f3f4f6;
  overflow: hidden;
}

.asset-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.2s;
}

.asset-card:hover .asset-image img {
  transform: scale(1.05);
}

.asset-info {
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.asset-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-size {
  font-size: 0.65rem;
  color: #9ca3af;
}

.selected-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

/* ===== Loading ===== */
.library-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: #6b7280;
  gap: 1rem;
}

.library-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  text-align: center;
  color: #6b7280;
  gap: 0.75rem;
}

.library-empty svg {
  color: #d1d5db;
}

.library-empty p {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  margin: 0;
}

.library-empty span {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ===== Preview ===== */
.library-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #f0f0f0;
}

.library-preview img {
  width: 48px;
  height: 48px;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.preview-info strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.preview-info span {
  font-size: 0.75rem;
  color: #6b7280;
}

/* ===== Footer ===== */
.library-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #f0f0f0;
}

.cancel-btn {
  padding: 0.625rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.confirm-btn {
  padding: 0.625rem 1.5rem;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.confirm-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

.confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .library-modal {
    max-height: 90vh;
    border-radius: 12px;
  }

  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .library-preview {
    flex-direction: column;
    align-items: flex-start;
  }
}

/*!****************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/[locale]/studio/studio.css ***!
  \****************************************************************************************************************************************************************************************************************************************************************************/
/* ===== Studio Layout - 現代簡潔設計 ===== */

.studio-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  padding: 1.5rem;
  gap: 1rem;
}

.studio-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1rem;
}

/* ===== Tab Bar - 簡潔的分頁切換 ===== */
.studio-tab-bar {
  display: inline-flex;
  background-color: #f3f4f6;
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.25rem;
  align-self: flex-start;
}

.studio-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 8px;
  background-color: transparent;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.5);
  color: #374151;
}

.studio-tab-btn.active {
  background-color: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.studio-tab-btn svg {
  flex-shrink: 0;
}

.studio-content-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  animation: fadeInContent 0.3s ease-out;
}

/* Tab 過渡載入動畫 */
.tab-transition-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.transition-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Generator Layout - 左右兩欄 ===== */
.generator-layout {
  display: flex;
  gap: 1.5rem;
  height: 100%;
}

/* ===== Generator Sidebar - 控制面板 ===== */
.generator-sidebar {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  padding: 1.5rem;
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== Mode Switch ===== */
.mode-switch {
  display: flex;
  background-color: #f3f4f6;
  border-radius: 10px;
  padding: 0.25rem;
}

.mode-tab {
  flex: 1;
  border: none;
  border-radius: 8px;
  background-color: transparent;
  padding: 0.625rem 0.75rem;
  font-weight: 500;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.mode-tab.active {
  background-color: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== Form Sections ===== */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  margin: 0;
}

.form-textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.875rem;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s ease;
  background-color: #fafafa;
  line-height: 1.5;
}

.form-textarea:hover {
  border-color: #d1d5db;
  background-color: #fff;
}

.form-textarea:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
  background-color: #fff;
}

.form-textarea::-moz-placeholder {
  color: #9ca3af;
}

.form-textarea::placeholder {
  color: #9ca3af;
}

/* ===== Upload Area - 現代感設計 ===== */
.upload-area {
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  cursor: pointer;
  transition: all 0.25s ease;
}

.upload-area:hover {
  background: linear-gradient(180deg, #f5f5f5 0%, #eeeeee 100%);
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.hidden-input {
  display: none;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  color: #9ca3af;
}

.upload-placeholder svg {
  color: #94a3b8;
}

.upload-placeholder p {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin: 0;
}

.upload-placeholder span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.upload-preview {
  position: relative;
}

.upload-preview img {
  max-height: 150px;
  border-radius: 10px;
  -o-object-fit: cover;
     object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clear-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: 2px solid #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.clear-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* ===== Form Grid ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-field label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.form-input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background-color: #fafafa;
}

.form-input:hover {
  border-color: #d1d5db;
  background-color: #fff;
}

.form-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
  background-color: #fff;
}

.form-input::-moz-placeholder {
  color: #9ca3af;
}

.form-input::placeholder {
  color: #9ca3af;
}

/* ===== Generate Button ===== */
.generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.15);
}

.generate-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== Error Message ===== */
.error-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  color: #dc2626;
  font-size: 0.875rem;
}

/* ===== Generator Preview - 預覽區域 ===== */
.generator-preview {
  flex: 1;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
}

.preview-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 0;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-height: 0;
}

.preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-image {
  flex: 1;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  overflow: hidden;
  min-height: 0;
}

.preview-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

/* ===== Preview Actions ===== */
.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.save-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Empty State - 空狀態設計 ===== */
.preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: 12px;
  margin: 1.5rem;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-icon svg {
  color: #94a3b8;
}

.preview-empty h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

.preview-empty p {
  font-size: 0.875rem;
  color: #64748b;
  max-width: 280px;
  margin: 0;
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .generator-layout {
    flex-direction: column;
  }

  .generator-sidebar {
    width: 100%;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  background: #f8fafc;
  color: #475569;
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inline-list span {
  background: rgba(148, 163, 184, 0.18);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* ===== Dressing Room Layout - A/B 對比設計 ===== */
.dressing-room-layout {
  display: flex;
  gap: 1.5rem;
  height: 100%;
  min-height: 500px;
}

.dressing-sidebar {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
}

.dressing-sidebar .sidebar-wrapper {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dressing-sidebar .section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: none;
  padding-bottom: 0;
}

.step-badge {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ===== Model Grid ===== */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.model-card {
  position: relative;
  aspect-ratio: 3/4;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f9fafb;
  padding: 0;
}

.model-card:hover {
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.model-card.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.model-card img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.model-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.model-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.25rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: 0.65rem;
  text-align: center;
}

.check-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: #6366f1;
  border-radius: 50%;
  color: #fff;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.empty-models {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px dashed #e5e7eb;
  color: #6b7280;
}

.empty-models p {
  margin: 0;
  font-weight: 500;
}

.empty-models span {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ===== Garment Upload ===== */
.garment-upload-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.garment-preview-box {
  width: 100%;
  aspect-ratio: 4/3;
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.garment-preview-box .hidden-input {
  display: none;
}

.garment-upload-trigger {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  transition: all 0.2s ease;
}

.garment-upload-trigger:hover {
  background: linear-gradient(180deg, #f5f5f5 0%, #eeeeee 100%);
  color: #6b7280;
}

.garment-upload-trigger span {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Library Button for Dressing Room */
.library-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6366f1;
  cursor: pointer;
  transition: all 0.2s;
}

.library-btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

.library-btn svg {
  flex-shrink: 0;
}

.garment-preview {
  width: 100%;
  height: 100%;
  position: relative;
}

.garment-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.clear-garment {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.clear-garment:hover {
  background: #ef4444;
}

.garment-description {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.625rem;
  font-size: 0.8rem;
  resize: none;
  background: #fafafa;
  transition: all 0.2s;
}

.garment-description:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
}

/* ===== Style Grid ===== */
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.style-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.style-card:hover {
  border-color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.03);
}

.style-card.active {
  border-color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.08);
}

.style-color {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

.style-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.show-more-styles {
  margin-top: 0.5rem;
  padding: 0.5rem;
  width: 100%;
  background: transparent;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.show-more-styles:hover {
  border-color: #6366f1;
  color: #6366f1;
}

/* ===== Dressing Preview - A/B 對比區 ===== */
.dressing-preview {
  flex: 1;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.preview-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.compare-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:hover {
  color: #374151;
}

.toggle-btn.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.dressing-preview .preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1rem;
  overflow: hidden;
}

/* ===== A/B Compare View ===== */
.ab-compare {
  flex: 1;
  display: flex;
  gap: 1.5rem;
  min-height: 0;
  position: relative;
}

.ab-compare.overlay {
  position: relative;
}

.ab-compare.overlay .compare-panel.after {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  z-index: 1;
}

.compare-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.label-badge {
  width: 22px;
  height: 22px;
  background: #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}

.label-badge.highlight {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.panel-image {
  flex: 1;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.panel-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.placeholder-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
}

.placeholder-image span {
  font-size: 0.8rem;
}

.placeholder-image.success {
  color: #22c55e;
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, #d1d5db, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

/* ===== Result Thumbnails ===== */
.result-thumbnails {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.thumbnails-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  white-space: nowrap;
}

.thumbnails-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.thumbnail {
  width: 48px;
  height: 64px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  background: none;
  transition: all 0.2s;
}

.thumbnail:hover {
  border-color: #d1d5db;
}

.thumbnail.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

/* ===== Result Actions ===== */
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn.secondary {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.action-btn.secondary:hover {
  background: #e5e7eb;
}

.action-btn.primary {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border: none;
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.action-btn.primary:hover {
  background: linear-gradient(180deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
}

/* ===== Empty A/B Preview ===== */
.empty-ab-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ab-placeholder {
  flex: 1;
  display: flex;
  gap: 1rem;
  min-height: 0;
}

.placeholder-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.placeholder-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 2px dashed #e2e8f0;
  color: #94a3b8;
  gap: 0.75rem;
  min-height: 200px;
}

.placeholder-content img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 10px;
}

.placeholder-content span {
  font-size: 0.8rem;
}

.placeholder-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
}

.placeholder-divider span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
}

.empty-hint {
  text-align: center;
  color: #64748b;
}

.empty-hint p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.empty-hint p:first-child {
  font-weight: 500;
  color: #475569;
}

/* ===== Dressing Room Responsive ===== */
@media (max-width: 900px) {
  .dressing-room-layout {
    flex-direction: column;
  }

  .dressing-sidebar {
    width: 100%;
  }

  .ab-compare {
    flex-direction: column;
  }

  .ab-placeholder {
    flex-direction: column;
  }

  .placeholder-divider {
    width: 100%;
    height: 40px;
  }
}

