* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: #0f0f23;
  color: #e0e0e0;
  overflow: hidden;
  height: 100vh;
}

body.light-mode {
  background: #f0f2f5;
  color: #1a1a2e;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.light-mode ::-webkit-scrollbar-thumb { background: #bbb; }
.light-mode ::-webkit-scrollbar-thumb:hover { background: #999; }

.glass-panel {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(127, 90, 240, 0.1);
}

.light-mode .glass-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes borderPulse {
  0%, 100% { border-color: rgba(127, 90, 240, 0.3); }
  50% { border-color: rgba(127, 90, 240, 0.8); }
}

.bob-anim { animation: bob 2.5s ease-in-out infinite; }
.pulse-anim { animation: pulse-dot 1.5s ease-in-out infinite; }
.shimmer-bar {
  background: linear-gradient(90deg, transparent, rgba(127,90,240,0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.fade-in-up { animation: fadeInUp 0.4s ease-out forwards; }
.border-pulse { animation: borderPulse 1.5s ease-in-out infinite; }

.drop-zone-active {
  border-color: #7f5af0 !important;
  background: rgba(127, 90, 240, 0.08) !important;
  box-shadow: 0 0 40px rgba(127, 90, 240, 0.15);
}

.slider-track {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #333;
  outline: none;
}
.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7f5af0;
  cursor: pointer;
  border: 2px solid #0f0f23;
}

.light-mode .slider-track { background: #ccc; }
.light-mode .slider-track::-webkit-slider-thumb { border-color: #fff; }

.template-card {
  transition: all 0.2s ease;
}
.template-card:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 12px rgba(127, 90, 240, 0.15);
}

.photo-card {
  transition: all 0.25s ease;
}
.photo-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Filtered photo glow */
.filtered-photo {
  box-shadow: 0 0 0 1px rgba(127, 90, 240, 0.3), 0 0 12px rgba(127, 90, 240, 0.1);
}
.filtered-photo:hover {
  box-shadow: 0 0 0 1px rgba(127, 90, 240, 0.5), 0 8px 24px rgba(127, 90, 240, 0.2);
}

.tab-active {
  border-bottom: 2px solid #7f5af0;
  color: #7f5af0;
}

input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

@keyframes aiPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 90, 240, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(127, 90, 240, 0.15); }
}
.ai-pulse { animation: aiPulse 2s ease-in-out infinite; }

@keyframes spinLoader {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin-loader { animation: spinLoader 1s linear infinite; }

.confidence-bar {
  transition: width 0.6s ease-out;
}

@media (max-width: 1024px) {
  .three-panel { flex-direction: column !important; }
}