/* F1Push Custom Styles */

/* CSS Variables for F1 Theme */
:root {
  --f1-red: #DC2626;
  --f1-black: #000000;
  --f1-silver: #6B7280;
  --f1-white: #FFFFFF;
  --f1-dark-gray: #18181B;
  --f1-light-gray: #3F3F46;
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: var(--f1-black);
  color: var(--f1-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: -0.05em;
}

/* Container */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 2rem;
  padding-left: 2rem;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}

/* F1 Skewed Button */
.f1-skew-btn {
  position: relative;
  transform: skewX(-12deg);
  overflow: hidden;
  background-color: var(--f1-red);
  padding: 0.75rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  font-style: italic;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.f1-skew-btn:hover {
  background-color: #B91C1C;
  transform: skewX(-12deg) scale(1.05);
}

.f1-skew-btn:active {
  transform: skewX(-12deg) scale(0.95);
}

.f1-skew-btn > span {
  display: inline-block;
  transform: skewX(12deg);
}

/* F1 Card */
.f1-card {
  border-left: 4px solid var(--f1-red);
  background-color: var(--f1-dark-gray);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.5rem;
}

.f1-card:hover {
  background-color: var(--f1-light-gray);
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

/* Racing Grid Pattern */
.racing-grid {
  background-image: 
    linear-gradient(rgba(220, 38, 38, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* F1 Divider */
.f1-divider {
  margin: 1rem auto;
  height: 0.25rem;
  width: 6rem;
  transform: skewX(-12deg);
  background-color: var(--f1-red);
}

/* Speed Line Effect */
.speed-line {
  position: relative;
}

.speed-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0.25rem;
  width: 100%;
  background: linear-gradient(to right, var(--f1-red), transparent);
}

/* Checkered Pattern */
.checkered-pattern {
  background-image: 
    linear-gradient(45deg, #000 25%, transparent 25%),
    linear-gradient(-45deg, #000 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000 75%),
    linear-gradient(-45deg, transparent 75%, #000 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.05;
}

/* Primary Color Override */
.text-primary {
  color: var(--f1-red) !important;
}

.bg-primary {
  background-color: var(--f1-red) !important;
}

.border-primary {
  border-color: var(--f1-red) !important;
}

/* Hero Title */
.hero-title {
  font-weight: 900;
}

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

::-webkit-scrollbar-track {
  background-color: var(--f1-black);
}

::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background-color: var(--f1-red);
}

::-webkit-scrollbar-thumb:hover {
  background-color: #B91C1C;
}

/* Selection Color */
::selection {
  background-color: var(--f1-red);
  color: white;
}

::-moz-selection {
  background-color: var(--f1-red);
  color: white;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Animation Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Intersection Observer Animation States */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s ease-out;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Menu Styles */
#mobile-menu {
  max-width: 100vw;
  overflow: hidden;
}

#mobile-menu a,
#mobile-menu button {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ */
  -khtml-user-select: none; /* KHTML */
  user-select: none; /* Standard syntax */
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
  -webkit-tap-highlight-color: rgba(0,0,0,0); /* Alternative for older devices */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Screenshot Gallery Styles */
#screenshot-container {
  scrollbar-width: thin;
  scrollbar-color: var(--f1-red) var(--f1-black);
}

#screenshot-container::-webkit-scrollbar {
  height: 6px;
}

#screenshot-container::-webkit-scrollbar-track {
  background-color: var(--f1-black);
}

#screenshot-container::-webkit-scrollbar-thumb {
  background-color: var(--f1-red);
  border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }
  
  .f1-skew-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .f1-card {
    padding: 1rem;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--f1-red);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Focus States for Accessibility */
.f1-skew-btn:focus,
button:focus,
a:focus {
  outline: 2px solid var(--f1-red);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .f1-card {
    border-width: 2px;
  }
  
  .f1-divider {
    height: 0.5rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: white !important;
    color: black !important;
  }
  
  .f1-skew-btn,
  #mobile-menu-btn,
  footer {
    display: none !important;
  }
  
  .f1-card {
    border: 1px solid black;
    background-color: white;
  }
}