/* Custom styles to complement Tailwind CSS */

body {
  background-image: radial-gradient(circle at 1% 1%, #111827 0%, #0f172a 100%);
}

.campaign-card {
  transition: all 0.3s ease;
}

.campaign-card:hover {
  transform: translateY(-5px);
}

.content-card {
  overflow: hidden;
  transition: all 0.3s ease;
}

.content-card:hover {
  transform: scale(1.02);
}

.social-preview {
  position: relative;
  overflow: hidden;
}

.social-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

/* Custom scrollbar for the content preview */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}

/* Hashtag styling */
.hashtag {
  color: #0ea5e9;
  font-weight: 500;
}

/* Content type badges */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.instagram-badge {
  background-color: rgba(193, 53, 132, 0.2);
  color: #c13584;
}

.facebook-badge {
  background-color: rgba(66, 103, 178, 0.2);
  color: #4267B2;
}

.twitter-badge {
  background-color: rgba(29, 161, 242, 0.2);
  color: #1DA1F2;
}

.linkedin-badge {
  background-color: rgba(10, 102, 194, 0.2);
  color: #0A66C2;
}

/* Social Media Buttons */
.social-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.twitter-follow {
  background-color: rgba(29, 161, 242, 0.1);
  color: #1DA1F2;
  border: 1px solid rgba(29, 161, 242, 0.3);
}

.twitter-follow:hover {
  background-color: rgba(29, 161, 242, 0.2);
}

.facebook-follow {
  background-color: rgba(66, 103, 178, 0.1);
  color: #4267B2;
  border: 1px solid rgba(66, 103, 178, 0.3);
}

.facebook-follow:hover {
  background-color: rgba(66, 103, 178, 0.2);
}

.instagram-follow {
  background-color: rgba(193, 53, 132, 0.1);
  color: #c13584;
  border: 1px solid rgba(193, 53, 132, 0.3);
}

.instagram-follow:hover {
  background-color: rgba(193, 53, 132, 0.2);
}

/* Shimmer loading effect */
.shimmer {
  background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Image Generator Enhanced Styles */
.template-btn.active {
  border-color: #0ea5e9;
  background-color: rgba(14, 165, 233, 0.1);
}

#image-canvas {
  object-fit: contain;
  max-width: 100%;
  max-height: 380px;
}

/* Custom color picker styling */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: none;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 0.5rem;
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 0.5rem;
}

/* Enhanced interface for image generation */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.effect-preview {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 1/1;
  transition: transform 0.2s ease;
}

.effect-preview:hover {
  transform: scale(1.05);
}

.effect-preview.active {
  box-shadow: 0 0 0 2px #0ea5e9, 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Enhanced template overlays */
.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

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

.pattern-dots {
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

.pattern-lines {
  background-image: linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
                   linear-gradient(to right, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

.pattern-diagonal {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.15), rgba(255,255,255,0.15) 1px, transparent 1px, transparent 20px);
}

.pattern-crosshatch {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.15), rgba(255,255,255,0.15) 1px, transparent 1px, transparent 20px),
                   repeating-linear-gradient(-45deg, rgba(255,255,255,0.15), rgba(255,255,255,0.15) 1px, transparent 1px, transparent 20px);
}

.pattern-triangles {
  background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%),
                   linear-gradient(-45deg, rgba(255,255,255,0.15) 25%, transparent 25%);
  background-size: 30px 30px;
}

.pattern-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.15;
}

/* Custom range slider styling */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
}

/* Loading animation for image generation */
.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Image preview overlay effects */
.template-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.geometric-overlay {
  background-image: linear-gradient(120deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2)), 
                   repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 2px, transparent 2px, transparent 4px);
}

.blueprint-overlay {
  background-color: rgba(30, 64, 175, 0.3);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.tech-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(14, 165, 233, 0.2) 100%);
}

.gradient-overlay {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
}

.topographic-overlay {
  background-image: 
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 4px);
}

.contour-overlay {
  background-image: radial-gradient(circle at 50% 50%, transparent 0%, transparent 80%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0.1) 82%, transparent 82%), 
                    radial-gradient(circle at 50% 50%, transparent 0%, transparent 65%, rgba(255, 255, 255, 0.07) 65%, rgba(255, 255, 255, 0.07) 67%, transparent 67%),
                    radial-gradient(circle at 50% 50%, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 52%, transparent 52%);
  background-size: 100% 100%;
}