@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --cream: #F5E6D3;
  --teal: #4ECDC4;
  --coral: #FF6B6B;
  --brown: #2C1810;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--cream);
}

.bg-cream {
  background-color: var(--cream);
}

.text-brown {
  color: var(--brown);
}

.text-coral {
  color: var(--coral);
}

.border-teal {
  border-color: var(--teal);
}

.font-playfair {
  font-family: 'Playfair Display', serif;
}

.font-pacifico {
  font-family: 'Pacifico', cursive;
}

.vintage-texture {
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03' /%3E%3C/svg%3E");
  background-color: var(--cream);
}

.shadow-vintage {
  box-shadow: 
    0 4px 6px rgba(44, 24, 16, 0.1),
    0 10px 20px rgba(44, 24, 16, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.upload-zone {
  border: 4px dashed var(--teal);
  border-radius: 16px;
  padding: 4rem 2rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 6px rgba(44, 24, 16, 0.1),
    0 10px 20px rgba(44, 24, 16, 0.05);
}

.upload-zone:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 8px rgba(44, 24, 16, 0.15),
    0 15px 25px rgba(44, 24, 16, 0.1);
}

.upload-zone.dragging {
  border-color: var(--coral);
  background: #FFF9F5;
  transform: scale(1.02);
}

.shutter-button {
  background: var(--coral);
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 6px rgba(255, 107, 107, 0.3),
    0 8px 15px rgba(255, 107, 107, 0.2);
}

.shutter-button:hover {
  background: #ff5252;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 6px 8px rgba(255, 107, 107, 0.4),
    0 12px 20px rgba(255, 107, 107, 0.3);
}

.shutter-button:active {
  transform: translateY(0) scale(1);
}

.vintage-button {
  background: white;
  color: var(--brown);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--brown);
  cursor: pointer;
  transition: all 0.3s ease;
}

.vintage-button:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.vintage-button-active {
  background: var(--teal);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--teal);
  cursor: pointer;
}

.download-button {
  background: var(--teal);
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 6px rgba(78, 205, 196, 0.3),
    0 8px 15px rgba(78, 205, 196, 0.2);
}

.download-button:hover {
  background: #3db8b0;
  transform: translateY(-2px);
}

.polaroid {
  background: white;
  padding: 1rem;
  padding-bottom: 3rem;
  border-radius: 4px;
  box-shadow: 
    0 4px 6px rgba(44, 24, 16, 0.1),
    0 10px 20px rgba(44, 24, 16, 0.08);
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.polaroid:nth-child(even) {
  transform: rotate(2deg);
}

.polaroid:hover {
  transform: rotate(0deg) translateY(-4px);
}

.film-reel {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 4px solid var(--brown);
  border-radius: 50%;
  position: relative;
  animation: spin 2s linear infinite;
}

.film-reel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: var(--brown);
  border-radius: 50%;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.film-strip-progress {
  width: 100%;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    var(--brown) 0px,
    var(--brown) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 2px solid var(--brown);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.film-strip-bar {
  height: 100%;
  background: var(--teal);
  animation: progress 3s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.comparison-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 
    0 8px 16px rgba(44, 24, 16, 0.2),
    0 16px 32px rgba(44, 24, 16, 0.1);
  user-select: none;
}

.comparison-image {
  width: 100%;
  height: auto;
  display: block;
}

.comparison-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: white;
  border: 3px solid var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--teal);
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.comparison-label {
  position: absolute;
  bottom: 20px;
  background: rgba(44, 24, 16, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  pointer-events: none;
}

.comparison-label.left {
  left: 20px;
}

.comparison-label.right {
  right: 20px;
}

.newspaper-panel {
  background: white;
  border: 3px solid var(--brown);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 
    0 4px 6px rgba(44, 24, 16, 0.1),
    0 10px 20px rgba(44, 24, 16, 0.05);
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 30px,
      rgba(44, 24, 16, 0.03) 30px,
      rgba(44, 24, 16, 0.03) 31px
    );
}

@media (max-width: 768px) {
  .upload-zone {
    padding: 2rem 1rem;
  }

  .polaroid {
    transform: rotate(0deg);
  }

  .comparison-label {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}