@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #ffffff;
}

.font-geist-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: -0.025em;
}

/* Loading spinner */
#loading-spinner {
  background-image: url('loading-spinner.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Image preview */
#preview-image {
  max-height: 400px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
}

#preview-image:hover {
  transform: scale(1.02);
}

/* Progress bar animations */
@keyframes fillProgress {
  from { width: 0; }
  to { width: var(--percentage); }
}

.progress-animate {
  animation: fillProgress 1.2s ease-out forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #111111;
}

::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Transitions */
.transition-all {
  transition-property: all;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradients */
.pink-gradient {
  background: linear-gradient(225deg, rgba(255,56,151,0.2) 0%, rgba(120,40,200,0.1) 100%);
}

/* Card hover effects */
.bg-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.bg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px -5px rgba(255, 56, 151, 0.1);
}

/* Button effects */
button {
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.98);
}

/* Upload container hover effects */
#upload-container {
  transition: all 0.3s ease;
}

#upload-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(255, 56, 151, 0.1);
}

/* Animations for results loading */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.fade-in-delay-1 {
  animation: fadeIn 0.5s ease-out 0.1s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.5s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 0.5s ease-out 0.3s forwards;
  opacity: 0;
}

/* Pulsate effect for sparkly elements */
@keyframes pulsate {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.pulsate {
  animation: pulsate 2s ease-in-out infinite;
}

/* Flashy effects for special text */
.flash-once {
  animation: flash 2s ease-out forwards;
}

@keyframes flash {
  0% { color: #ffffff; }
  20% { color: #ff3897; }
  100% { color: #ffffff; }
}

/* Glass morphism effects */
.glass {
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Highlight text animation */
@keyframes highlight {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.highlight-text {
  background: linear-gradient(to right, transparent 0%, rgba(255, 56, 151, 0.2) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: highlight 2s ease-in-out infinite;
}

/* Modern tooltip style */
.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  z-index: 10;
}

/* Special features highlight */
.feature-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 0%, rgba(255, 56, 151, 0.05) 50%, transparent 100%);
  animation: sweep 3s ease-in-out infinite alternate;
  pointer-events: none;
  border-radius: inherit;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Touch device enhancements */
@media (hover: none) {
  .bg-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  button:hover {
    opacity: 1;
  }
}
