/* ============================================
   Premium Corporate Design - AI Photo Editor
   Listed-company grade visual identity
   ============================================ */

/* --- Design Tokens --- */
:root {
  --prem-navy-900: #141e2b;
  --prem-navy-800: #1a2332;
  --prem-navy-700: #1e2a3d;
  --prem-navy-600: #2d3a4d;
  --prem-navy-500: #3d4c63;
  --prem-navy-400: #526380;
  --prem-navy-300: #6b7d9e;
  --prem-gold: #3183F5;
  --prem-gold-light: #60a5fa;
  --prem-gold-dark: #2563e0;
  --prem-white: #ffffff;
  --prem-off-white: #f8fafc;
  --prem-gray-50: #f1f5f9;
  --prem-gray-100: #e2e8f0;
  --prem-gray-200: #cbd5e1;
  --prem-gray-400: #94a3b8;
  --prem-gray-500: #64748b;
  --prem-gray-600: #475569;
  --prem-gray-700: #334155;
  --prem-accent-blue: #3b82f6;
  --prem-accent-teal: #14b8a6;
  --prem-accent-purple: #8b5cf6;
  --prem-accent-rose: #f43f5e;
  --prem-accent-amber: #3183F5;
  --prem-gradient-primary: linear-gradient(135deg, #1a2332 0%, #2d3a4d 50%, #1e2a3d 100%);
  --prem-gradient-gold: linear-gradient(135deg, #3183F5, #2563e0);
  --prem-gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
  --prem-glass-bg: rgba(255, 255, 255, 0.85);
  --prem-glass-border: rgba(255, 255, 255, 0.2);
  --prem-shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
  --prem-shadow-md: 0 4px 16px rgba(10, 22, 40, 0.1);
  --prem-shadow-lg: 0 10px 40px rgba(10, 22, 40, 0.12);
  --prem-shadow-xl: 0 20px 60px rgba(10, 22, 40, 0.15);
  --prem-radius-sm: 8px;
  --prem-radius-md: 12px;
  --prem-radius-lg: 16px;
  --prem-radius-xl: 24px;
  --prem-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --prem-sidebar-width: 240px;
  --prem-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--prem-font);
  background: #fff;
  color: var(--prem-gray-700);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

/* --- Background Decorative Elements --- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* --- Main Container --- */
.container {
  margin-left: var(--prem-sidebar-width);
  margin-right: auto;
  padding: 36px 8px 40px 8px;
  position: relative;
  z-index: 1;
  width: auto;
  max-width: none;
}

.header-btn-container {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--prem-sidebar-width);
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 8px;
  background: #fff;
}

.header-right-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

@media (max-width: 1200px) {
  .header-btn-container {
    padding-right: 8px;
  }
}

@media (max-width: 768px) {
  .header-btn-container {
    left: 0;
    padding: 3px 8px;
  }
}

/* 右上角操作按钮 — 参考 koutu123HW 风格 */
.header-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
  transition: all 0.2s ease;
  text-decoration: none;
}
.header-recharge-btn {
  background: linear-gradient(135deg, #f59e0b, #f0b429);
  color: #734A28;
  border: none;
}
.header-recharge-btn:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  transform: translateY(-1px);
}
.header-records-btn {
  background: #fff;
  color: #666;
  border: 1px solid #D9D9D9;
}
.header-records-btn:hover {
  border-color: #3183F5;
  color: #3183F5;
  background: #f0f6ff;
}
#login-btn.header-login-btn {
  background: #3183F5 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  font-weight: 500 !important;
}
#login-btn.header-login-btn:hover {
  background: #2563e0 !important;
  transform: translateY(-1px);
}

.sidebar-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--prem-sidebar-width);
  height: 100vh;
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  overflow-y: auto;
  border: none;
  border-radius: 0;
}
.sidebar-nav:hover {
  box-shadow: none;
}

.nav-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 20px 20px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: #fff;
}

.nav-logo-img {
  width: 90%;
  height: auto;
  display: block;
  border: none;
  filter: none;
  pointer-events: none;
}

.nav-menu {
  list-style: none;
  padding: 12px 0;
  flex: 1;
  background: #fff;
}

.nav-menu li {
  margin: 2px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #555;
  text-decoration: none;
  border-radius: var(--prem-radius-md);
  transition: var(--prem-transition);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 24px;
  background: var(--prem-gradient-gold);
  border-radius: 0 3px 3px 0;
  transition: var(--prem-transition);
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.35);
  transition: var(--prem-transition);
}

.nav-link:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.04);
}

.nav-link:hover i {
  color: var(--prem-gold-light);
}

.nav-link:hover::before {
  transform: translateY(-50%) scaleY(1);
}

/* Active nav link - controlled by JS scroll spy */
.nav-link.active {
  color: var(--prem-gold);
  background: rgba(49, 131, 245, 0.08);
}

.nav-link.active i {
  color: var(--prem-gold);
}

.nav-link.active::before {
  transform: translateY(-50%) scaleY(1);
}

.nav-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-hint {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.3px;
}

.nav-hint i {
  margin-right: 4px;
}

/* ============================================
   Premium Header / Hero
   ============================================ */
.header {
  position: relative;
  margin-bottom: 32px;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(15, 29, 58, 0.97), rgba(26, 48, 85, 0.95));
  border-radius: var(--prem-radius-xl);
  box-shadow: var(--prem-shadow-lg);
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(240, 180, 41, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--prem-gradient-gold);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.header-left {
  flex: 1;
  min-width: 280px;
}

.header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--prem-white);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
}

/* --- Header Buttons --- */
.btn-service,
.btn-login {
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--prem-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
  width: auto;
  margin-bottom: 0;
  box-shadow: none;
}

.btn-service {
  background: rgba(255, 255, 255, 0.1);
  color: var(--prem-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-service:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-login {
  background: var(--prem-gradient-gold);
  color: var(--prem-navy-900);
}

.btn-login:hover {
  transform: translateY(-2px);
}

.btn-login.logged-in {
  background: rgb(15, 29, 58);
  color: var(--prem-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login.logged-in:hover {
  background: rgb(10, 20, 45);
  transform: translateY(-1px);
}

/* ============================================
   Premium Feature Sections
   ============================================ */
.feature-section {
  background: var(--prem-gradient-card);
  backdrop-filter: blur(10px);
  border-radius: var(--prem-radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--prem-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--prem-transition);
  position: relative;
  overflow: hidden;
}

.feature-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--prem-gold), var(--prem-accent-blue), transparent);
  opacity: 0.6;
}

.feature-section:hover {
  box-shadow: none;
  transform: none;
}

.feature-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--prem-gray-100);
}

.feature-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--prem-navy-800);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.feature-header h2 i {
  color: var(--prem-gold-dark);
  font-size: 1.2em;
}

.feature-header p {
  color: var(--prem-gray-500);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 90%;
}

/* --- Demo Area --- */
.demo-area {
  padding: 0;
  max-width: 100%;
}

.demo-container {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: nowrap;
  justify-content: space-between;
  max-width: 100%;
}

.image-container {
  flex: 0 0 calc(70% - 24px);
  min-width: 200px;
  max-width: calc(70% - 24px);
}

@media (min-width: 1400px) {
  .image-container {
    max-width: 65%;
  }
}

.image-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--prem-gray-600);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-label .image-action-btn,
.batch-image-label .image-action-btn {
  background: #059669;
  border: 1px solid #059669;
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  margin-left: 4px;
}
.image-label .image-action-btn:hover,
.batch-image-label .image-action-btn:hover {
  background: #047857;
  border-color: #047857;
  color: #fff;
  transform: translateY(-1px);
}

.original-image,
.result-image {
  position: relative;
  border-radius: var(--prem-radius-lg);
  overflow: hidden;
  background: var(--prem-gray-50);
  border: 1px solid var(--prem-gray-100);
  cursor: pointer;
  transition: var(--prem-transition);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.original-image:hover,
.result-image:hover {
  box-shadow: var(--prem-shadow-md);
  border-color: var(--prem-gray-200);
}

.original-image img,
.result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Demo Controls --- */
.demo-container .demo-controls {
  flex: 0 0 480px;
  max-width: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.control-group {
  background: var(--prem-white);
  padding: 20px;
  border-radius: var(--prem-radius-lg);
  border: 1px solid var(--prem-gray-100);
  box-shadow: var(--prem-shadow-sm);
  margin-bottom: 16px;
}

.control-btn {
  background: var(--prem-gradient-primary);
  color: var(--prem-white);
  border: none;
  padding: 12px 24px;
  border-radius: var(--prem-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--prem-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  letter-spacing: 0.3px;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 29, 58, 0.25);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.control-btn.processing {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  animation: idphoto-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
@keyframes idphoto-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; box-shadow: 0 0 30px rgba(245, 158, 11, 0.5); }
}

/* 证件照生成中遮罩 */
.idphoto-processing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 35, 50, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.idphoto-processing-spinner {
  font-size: 48px;
  color: #f59e0b;
  margin-bottom: 16px;
}
.idphoto-processing-text {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;
}

.hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--prem-gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  padding: 0;
  border-radius: 0;
}

.hint i {
  color: var(--prem-gold-dark);
}
/* ============================================
   Mode Switcher
   ============================================ */
.mode-switcher {
  margin: 0 0 24px;
}

.mode-buttons {
  display: inline-flex;
  background: var(--prem-gray-50);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid var(--prem-gray-100);
}

.btn-mode {
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--prem-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--prem-gray-600);
}

.btn-mode.active,
.btn-mode.btn-primary.active {
  background: var(--prem-gradient-primary);
  color: var(--prem-white);
  box-shadow: 0 4px 12px rgba(15, 29, 58, 0.2);
}

.btn-mode.btn-outline-primary {
  background: transparent;
  color: var(--prem-gray-600);
}

.btn-mode.btn-outline-primary:hover {
  color: var(--prem-navy-700);
  background: rgba(15, 29, 58, 0.05);
}

.mode-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--prem-gray-500);
}

/* ============================================
   Slider Controls
   ============================================ */
.slider-container {
  margin-top: 16px;
}

.slider-container label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--prem-gray-600);
  margin-bottom: 8px;
}

.slider-container input[type="range"] {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--prem-gray-100);
  border-radius: 4px;
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--prem-gold);
  cursor: pointer;
  border: 2px solid var(--prem-white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-container {
  background: var(--prem-white);
  border-radius: var(--prem-radius-md);
  padding: 16px;
  border: 1px solid var(--prem-gray-100);
  margin-top: 16px;
}

.progress {
  height: 8px;
  border-radius: 4px;
  background: var(--prem-gray-100);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--prem-gold), var(--prem-gold-dark));
  transition: width 0.4s ease;
  height: 100%;
}

.progress-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--prem-gray-500);
  text-align: center;
}

/* ============================================
   Background Options
   ============================================ */
.background-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.background-options::-webkit-scrollbar {
  width: 5px;
}
.background-options::-webkit-scrollbar-track {
  background: transparent;
}
.background-options::-webkit-scrollbar-thumb {
  background: var(--prem-gray-300);
  border-radius: 10px;
}
.background-options::-webkit-scrollbar-thumb:hover {
  background: var(--prem-gray-400);
}

.bg-option {
  cursor: pointer;
  text-align: center;
  padding: 6px;
  border-radius: var(--prem-radius-md);
  border: 2px solid transparent;
  transition: var(--prem-transition);
  background: var(--prem-gray-50);
  position: relative;
}

.bg-option:hover {
  border-color: var(--prem-gray-200);
  background: var(--prem-white);
}

.bg-option.active {
  border-color: var(--prem-gold);
  background: rgba(240, 180, 41, 0.05);
}

.bg-option img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 2px;
}

.bg-option span {
  display: block;
  font-size: 0.7rem;
  color: var(--prem-gray-600);
  font-weight: 500;
  line-height: 1.2;
}

.custom-bg-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 80px;
}

.custom-bg-option .upload-icon i {
  font-size: 1.5rem;
  color: var(--prem-gray-400);
}

/* 自定义背景删除按钮（在「自定义」分类网格中） */
.bg-library-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.bg-library-item:hover .bg-library-del-btn {
  opacity: 0.8;
}
.bg-library-del-btn:hover {
  opacity: 1 !important;
  background: rgba(220, 50, 50, 0.85);
}

/* ============================================
   Animation Areas
   ============================================ */
.animation-area {
  position: relative;
  height: 40px;
  overflow: hidden;
}

.pulse-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--prem-gold);
  margin: 0 auto;
  animation: premPulse 2s ease-in-out infinite;
}

@keyframes premPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.scan-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--prem-gold), transparent);
  width: 60%;
  margin: 14px auto 0;
  animation: premScan 2s ease-in-out infinite;
}

@keyframes premScan {
  0% { transform: translateX(-60%); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: translateX(60%); opacity: 0; }
}

.particles {
  position: relative;
  height: 100%;
}

/* ============================================
   Premium Footer
   ============================================ */
body .footer {
  text-align: center;
  padding: 15px 20px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  border-top: 1px solid #e8e8e8;
  background: #fff;
  font-size: 12px;
  border-radius: 0;
}
body .footer p {
  margin: 0;
  padding: 0;
  line-height: 1;
}

.footer .disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ============================================
   Custom Modal - Premium Style
   ============================================ */
#customConfirmModal,
#customAlertModal {
  z-index: 1070;
}

.custom-modal-content {
  border-radius: var(--prem-radius-xl);
  overflow: hidden;
  box-shadow: var(--prem-shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-header {
  background: var(--prem-gradient-primary);
  color: var(--prem-white);
  border-bottom: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.6;
}

.custom-modal-header .btn-close:hover {
  opacity: 1;
}

.custom-modal-icon {
  font-size: 1.5em;
  display: flex;
  align-items: center;
}

.custom-modal-header .modal-title {
  font-weight: 600;
  font-size: 1.1em;
  margin: 0;
}

.custom-modal-body {
  padding: 28px 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--prem-gray-700);
  text-align: center;
}

.custom-modal-footer {
  border-top: 1px solid var(--prem-gray-100);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.custom-cancel-btn {
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  background: var(--prem-gray-50);
  color: var(--prem-gray-600);
  border: 1px solid var(--prem-gray-200);
  cursor: pointer;
  transition: var(--prem-transition);
}

.custom-cancel-btn:hover {
  background: var(--prem-gray-100);
  transform: translateY(-1px);
}

.custom-confirm-btn {
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  background: var(--prem-gradient-gold) !important;
  color: var(--prem-navy-900) !important;
  border: none !important;
  cursor: pointer;
  transition: var(--prem-transition);
  box-shadow: 0 4px 12px rgba(240, 180, 41, 0.3) !important;
}

.custom-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 180, 41, 0.4) !important;
}

/* Warning/error modal variant */
.custom-alert-warning .custom-modal-header {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ============================================
   User Dropdown
   ============================================ */
.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--prem-white);
  border: 1px solid var(--prem-gray-100);
  border-radius: var(--prem-radius-lg);
  box-shadow: var(--prem-shadow-lg);
  z-index: 2147483647;
  min-width: 200px;
  padding: 8px 0;
  margin-top: 4px;
}

.dropdown-item {
  padding: 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--prem-gray-700);
  transition: var(--prem-transition);
}

.dropdown-item:hover {
  background: var(--prem-gray-50) !important;
}

.dropdown-item i {
  width: 18px;
  color: var(--prem-gray-500);
}

/* ============================================
   WeChat QR Modal
   ============================================ */
.wechat-login-modal .modal-content {
  background: var(--prem-white);
  border-radius: var(--prem-radius-xl);
  box-shadow: var(--prem-shadow-xl);
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--prem-gray-200);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--prem-gray-400);
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--prem-gradient-primary);
  z-index: 1060;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 -2px 12px rgba(10, 22, 40, 0.2);
  border-top: 2px solid var(--prem-gold);
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  min-width: 50px;
}
.mobile-nav-item i {
  font-size: 18px;
  transition: all 0.2s;
}
.mobile-nav-item.active {
  color: var(--prem-gold);
}
.mobile-nav-item.active i {
  text-shadow: 0 0 8px rgba(240,180,41,0.3);
}
.mobile-nav-item:active {
  background: rgba(255,255,255,0.1);
}

/* 移动端更多菜单 - 遮罩 */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1070;
  display: none;
}
/* 抽屉面板 */
.mobile-nav-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 1071;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  animation: premSlideUp 0.25s ease-out;
}
@keyframes premSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.mobile-nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--prem-gray-100);
  font-weight: 600;
  font-size: 16px;
  color: var(--prem-navy-800);
}
.mobile-nav-drawer-header button {
  border: none;
  background: var(--prem-gray-50);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--prem-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-drawer-body {
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav-item-lg {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--prem-gray-700);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s;
}
.mobile-nav-item-lg i {
  width: 20px;
  text-align: center;
  color: var(--prem-navy-500);
  font-size: 18px;
}
.mobile-nav-item-lg:active {
  background: var(--prem-gray-50);
}
.mobile-nav-item-lg.active {
  color: var(--prem-gold-dark);
  background: rgba(240,180,41,0.06);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
  .container {
    margin-left: var(--prem-sidebar-width);
    padding: 32px 8px 32px 8px;
    max-width: none;
  }

  .bg-option {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Upload buttons in feature header */
.feature-header .upload-buttons-container {
  display: inline;
  margin-left: 8px;
  white-space: nowrap;
}

.feature-header .upload-buttons-container .image-action-btn {
  background: rgba(240, 180, 41, 0.1);
  border: 1px solid var(--prem-gold);
  color: var(--prem-navy-700);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--prem-transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  margin-left: 4px;
}

.feature-header .upload-buttons-container .image-action-btn:hover {
  background: var(--prem-gold);
  color: var(--prem-navy-900);
  transform: translateY(-1px);
}

@media (max-width: 992px) {
  :root {
    --prem-sidebar-width: 200px;
  }

  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .header-right {
    justify-content: flex-start;
  }

  .demo-container {
    flex-direction: column;
    align-items: center;
  }

  .demo-container .image-container {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100%;
  }

  .demo-container .demo-controls {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100%;
  }

  .batch-image-display {
    flex-direction: column;
  }

  .batch-image-container {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100%;
  }

  .batch-controls-simplified {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100%;
  }

  .feature-header p {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --prem-sidebar-width: 0px;
  }

  .sidebar-nav {
    display: none;
  }

  .container {
    margin-left: 0;
    max-width: none;
  }

  /* 移动端底部导航 */
  .mobile-bottom-nav {
    display: flex;
  }
  .mobile-nav-overlay {
    display: none;
  }

  .container {
    margin-left: 0;
    max-width: 100%;
    padding: 32px 8px 72px;
  }

  .header {
    padding: 24px 20px;
    border-radius: var(--prem-radius-lg);
  }

  .logo {
    font-size: 1.6rem;
  }

  .feature-section {
    padding: 20px;
    border-radius: var(--prem-radius-lg);
  }

  .feature-header h2 {
    font-size: 1.15rem;
  }

  .background-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .batch-image-container {
    max-width: 100%;
    min-width: 100%;
  }

  .batch-controls-simplified {
    max-width: 100%;
    min-width: 100%;
  }

  .batch-actions {
    flex-direction: column;
  }

  .batch-process-btn,
  .batch-download-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .batch-thumbnails-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .batch-thumbnails-title,
  .batch-thumbnails-stats {
    text-align: center;
  }

  .refresh-warning-content {
    flex-direction: column;
    text-align: center;
  }

  .refresh-warning-actions {
    justify-content: center;
  }
}

/* ===== ZIP 下载等待提示 ===== */
.nbp-zip-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nbp-zip-loading-content {
  background: #fff;
  padding: 40px 60px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.nbp-zip-loading-content i { color: var(--prem-gold, #3183F5); }
.nbp-zip-loading-content p { margin-top: 16px; font-size: 16px; color: #333; }

