/* ============================================================================
   PasFotoku — Custom Styles
   ============================================================================ */

:root {
  --bg-primary: #070913;
  --bg-card: #0B0F19;
  --border: rgba(148, 163, 184, 0.1);
  --purple: #a855f7;
  --pink: #ec4899;
  --rose: #f43f5e;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Glows */
.bg-glow-1 {
  position: fixed; top: -200px; left: 30%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
  animation: float 8s ease-in-out infinite;
}
.bg-glow-2 {
  position: fixed; bottom: 10%; right: 15%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(236,72,153,0.06) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
}

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

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(168,85,247,0.3);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: rgba(168,85,247,0.7);
  background: rgba(168,85,247,0.05);
  transform: scale(1.01);
}
.upload-zone.has-image {
  border-style: solid;
  border-color: rgba(168,85,247,0.4);
}

/* Preview Image */
.preview-container {
  position: relative;
  width: 200px; height: 267px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(168,85,247,0.2);
}
.preview-container img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Color Selector */
.color-option {
  width: 44px; height: 44px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 3px solid transparent;
  position: relative;
}
.color-option:hover { transform: scale(1.1); }
.color-option.active {
  border-color: #a855f7;
  box-shadow: 0 0 16px rgba(168,85,247,0.5);
}
.color-option.active::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: bold; color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(168,85,247,0.15);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #a855f7, #ec4899, #f43f5e);
  transition: width 0.5s ease-out;
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute; right: 0; top: -2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px rgba(168,85,247,0.8);
}

/* Result Image */
.result-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(168,85,247,0.25);
  border: 2px solid rgba(168,85,247,0.2);
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(168,85,247,0.4);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(168,85,247,0.1);
  color: #a855f7;
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
}
.btn-secondary:hover {
  background: rgba(168,85,247,0.2);
  border-color: rgba(168,85,247,0.4);
}

/* Glass Card */
.glass-card {
  background: rgba(11,15,25,0.6);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

/* Spinning animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

/* Pulse animation */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168,85,247,0.4); }
  50% { box-shadow: 0 0 20px 5px rgba(168,85,247,0.2); }
}
.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

/* Toast */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  padding: 16px 20px; border-radius: 16px;
  backdrop-filter: blur(12px);
  z-index: 1000;
  max-width: 400px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius: 3px; }

/* Mobile responsive */
@media (max-width: 640px) {
  .preview-container { width: 160px; height: 213px; }
  .color-option { width: 36px; height: 36px; }
}
