/* Hot Wheels Collection Tracker - Custom Styles */

/* Body background with subtle pattern */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 25%, transparent 25%),
              linear-gradient(225deg, #0a0a0a 25%, transparent 25%),
              linear-gradient(45deg, #0a0a0a 25%, transparent 25%),
              linear-gradient(315deg, #0a0a0a 25%, #000000 25%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0;
}

/* Flame gradient utility class */
.flame-gradient {
  background: linear-gradient(90deg, #FF6600 0%, #FF9933 50%, #FF6600 100%);
}

/* Chrome/metallic text effect */
.chrome-text {
  background: linear-gradient(180deg, #888 0%, #fff 30%, #fff 70%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Speed lines animation for loading states */
@keyframes speedLines {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.speed-lines {
  animation: speedLines 1.5s infinite;
}

/* Car card hover effects - make cards "rev up" */
.car-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              filter 0.3s ease;
  will-change: transform;
}

.car-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 102, 0, 0.5),
              0 0 20px rgba(255, 102, 0, 0.3);
  filter: brightness(1.1);
}

.car-card:active {
  transform: translateY(-4px) scale(1.01);
  transition-duration: 0.1s;
}

/* Quantity badge styling */
.quantity-badge {
  background: linear-gradient(135deg, #FF6600 0%, #FF8800 100%);
  color: white;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Modal backdrop blur effect */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.2s ease;
}

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

/* Checkered pattern for empty states */
.checkered-bg {
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
}

/* Floating action button pulse animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(255, 102, 0, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 102, 0, 0.8);
  }
}

.fab-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 4px 20px rgba(255, 102, 0, 0.5);
}

.fab-pulse:hover {
  animation: none;
  transform: scale(1.1) rotate(90deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Racing stripes accent */
.racing-stripes {
  position: relative;
  overflow: hidden;
}

.racing-stripes::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #FF6600 0px,
    #FF6600 20px,
    #0066FF 20px,
    #0066FF 40px
  );
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF6600 0%, #FF8800 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FF8800 0%, #FFAA00 100%);
}

/* Swiper carousel customization */
.swiper-button-prev,
.swiper-button-next {
  color: #FF6600 !important;
  background: rgba(0, 0, 0, 0.7);
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.swiper-button-prev:after,
.swiper-button-next:after {
  font-size: 20px !important;
  font-weight: bold;
}

.swiper-pagination-bullet {
  background: #666 !important;
  opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
  background: #FF6600 !important;
  opacity: 1 !important;
}

/* Smooth transitions for all interactive elements */
button, a, input, select {
  transition: all 0.2s ease;
}

button:hover, a:hover {
  filter: brightness(1.1);
}

button:active, a:active {
  filter: brightness(0.9);
  transform: scale(0.98);
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #FF6600;
  outline-offset: 2px;
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  border: 3px solid rgba(255, 102, 0, 0.2);
  border-top-color: #FF6600;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

/* Image preview grid improvements */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .car-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .fab-pulse {
    width: 56px !important;
    height: 56px !important;
  }
}

/* Print styles (for future print feature) */
@media print {
  body {
    background: white;
  }

  .fab-pulse,
  button,
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }
}
