/* Complete Parkour Games Styles */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  background-color: white;
  color: #0f172a;
}

/* CSS Variables for theming */
:root {
  --background: 255 255 255;
  --foreground: 15 23 42;
  --card: 248 250 252;
  --card-foreground: 51 65 85;
  --primary: 220 38 38;
  --primary-foreground: 255 255 255;
  --secondary: 236 72 153;
  --secondary-foreground: 255 255 255;
  --muted: 241 245 249;
  --muted-foreground: 100 116 139;
  --accent: 139 92 246;
  --accent-foreground: 255 255 255;
  --border: 226 232 240;
  --input: 255 255 255;
  --ring: 220 38 38;
  --chart-1: 139 92 246;
  --chart-2: 239 68 68;
  --chart-3: 245 158 11;
  --chart-4: 59 130 246;
  --chart-5: 16 185 129;
  --emerald-glow: 16 185 129;
  --green-bright: 34 197 94;
  --teal-vibrant: 20 184 166;
}

/* Dark theme variables */
.dark, .bg-dark-900, .bg-dark-800 {
  --background: 15 23 42;
  --foreground: 248 250 252;
  --card: 30 41 59;
  --card-foreground: 226 232 240;
  --primary: 239 68 68;
  --primary-foreground: 255 255 255;
  --secondary: 168 85 247;
  --secondary-foreground: 255 255 255;
  --muted: 51 65 85;
  --muted-foreground: 148 163 184;
  --accent: 168 85 247;
  --accent-foreground: 255 255 255;
  --border: 51 65 85;
  --input: 30 41 59;
  --ring: 239 68 68;
}

/* Layout utilities */
.min-h-screen { min-height: 100vh; }
.container { 
  width: 100%; 
  margin: 0 auto; 
  padding: 0 1rem;
  max-width: 1280px;
}

/* Custom max-width for narrower content */
.max-w-6xl {
  max-width: 72rem; /* 1152px */
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .max-w-6xl {
    max-width: 90%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 768px) {
  .max-w-6xl {
    max-width: 95%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.left-3 { left: 0.75rem; }
.top-1\/2 { top: 50%; }
.top-2 { top: 0.5rem; }
.left-2 { left: 0.5rem; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.transform { transform: translateZ(0); }
.-translate-y-1\/2 { transform: translateY(-50%); }

/* Spacing */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-8 { gap: 2rem; }
.p-3 { padding: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-4 { padding-right: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-8 { margin-top: 2rem; }
.pt-8 { padding-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-8 { margin-left: 2rem; margin-right: 2rem; }

/* Sizing */
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-5 { width: 1.25rem; }
.w-4 { width: 1rem; }
.w-3 { width: 0.75rem; }
.h-8 { height: 2rem; }
.h-5 { height: 1.25rem; }
.h-4 { height: 1rem; }
.h-3 { height: 0.75rem; }
.h-32 { height: 8rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.flex-1 { flex: 1 1 0%; }

/* Colors and backgrounds */
.bg-background { background-color: rgb(var(--background)); }
.bg-card { background-color: rgb(var(--card)); }
.bg-primary { background-color: rgb(var(--primary)); }
.bg-secondary { background-color: rgb(var(--secondary)); }
.bg-transparent { background-color: transparent; }
.text-foreground { color: rgb(var(--foreground)); }
.text-card-foreground { color: rgb(var(--card-foreground)); }
.text-primary { color: rgb(var(--primary)); }
.text-primary-foreground { color: rgb(var(--primary-foreground)); }
.text-secondary { color: rgb(var(--secondary)); }
.text-secondary-foreground { color: rgb(var(--secondary-foreground)); }
.text-muted-foreground { color: rgb(var(--muted-foreground)); }
.text-yellow-400 { color: #facc15; }
.fill-yellow-400 { fill: #facc15; }
.text-chart-1 { color: rgb(var(--chart-1)); }

/* Background with opacity */
.bg-card\/50 { background-color: rgb(var(--card) / 0.5); }
.bg-primary\/5 { background-color: rgb(var(--primary) / 0.05); }
.bg-primary\/10 { background-color: rgb(var(--primary) / 0.1); }
.bg-primary\/90 { background-color: rgb(var(--primary) / 0.9); }

/* Hover states */
.hover\:bg-primary:hover { background-color: rgb(var(--primary)); }
.hover\:bg-primary\/90:hover { background-color: rgb(var(--primary) / 0.9); }
.hover\:bg-secondary:hover { background-color: rgb(var(--secondary)); }
.hover\:text-primary:hover { color: rgb(var(--primary)); }
.hover\:text-primary-foreground:hover { color: rgb(var(--primary-foreground)); }
.hover\:text-secondary-foreground:hover { color: rgb(var(--secondary-foreground)); }

/* Typography */
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Borders and radius */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-border { border-color: rgb(var(--border)); }
.border-primary { border-color: rgb(var(--primary)); }
.border-secondary { border-color: rgb(var(--secondary)); }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }

/* Grid layouts */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Transitions and effects */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-all { transition-property: all; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.cursor-pointer { cursor: pointer; }
.object-cover { object-fit: cover; }

/* Focus styles */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgb(var(--ring) / 0.5); }
.focus\:ring-primary\/50:focus { box-shadow: 0 0 0 2px rgb(var(--primary) / 0.5); }

/* Text utilities */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.text-pretty { text-wrap: pretty; }
.text-balance { text-wrap: balance; }

/* Dark theme background colors */
.bg-dark-900 { 
  background-color: rgb(15 23 42);
  color: rgb(248 250 252);
}
.bg-dark-800 { 
  background-color: rgb(30 41 59);
  color: rgb(226 232 240);
}
.bg-dark-800\/50 { 
  background-color: rgb(30 41 59 / 0.5);
}

/* Text colors for dark theme */
.text-white { color: rgb(255 255 255); }
.text-gray-400 { color: rgb(156 163 175); }
.text-gray-500 { color: rgb(107 114 128); }
.text-gray-600 { color: rgb(75 85 99); }
.text-red-500 { color: rgb(239 68 68); }

/* Border colors for dark theme */
.border-gray-800 { border-color: rgb(31 41 55); }
.border-gray-700 { border-color: rgb(55 65 81); }

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 150ms ease;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.btn-primary {
  background-color: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: rgb(var(--primary) / 0.9);
}

.btn-outline {
  border: 1px solid rgb(var(--border));
  background-color: transparent;
  color: rgb(var(--foreground));
}

.btn-outline:hover {
  background-color: rgb(var(--accent));
  color: rgb(var(--accent-foreground));
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
}

/* Hero gradient */
.gradient-hero {
  background: linear-gradient(
    135deg,
    rgb(var(--primary) / 0.1) 0%,
    rgb(var(--secondary) / 0.05) 35%,
    rgb(var(--accent) / 0.1) 100%
  );
}

/* Game card styles */
.game-card {
  background-color: rgb(var(--card));
  border: 1px solid rgb(var(--border));
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.game-card:hover .game-image {
  transform: scale(1.05);
}

.game-image {
  transition: transform 0.3s ease;
}

/* Game detail page specific styles */
.game-iframe {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-info-card {
  background-color: rgb(var(--card));
  border: 1px solid rgb(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: rgb(var(--muted) / 0.3);
  border-radius: 0.5rem;
}

.rating-stars {
  display: flex;
  gap: 0.125rem;
}

/* Button size utilities */
.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* Color utilities */
.text-blue-400 { color: rgb(96 165 250); }
.text-green-400 { color: rgb(74 222 128); }
.text-purple-400 { color: rgb(196 181 253); }

/* Hover effects for screenshots */
.hue-rotate-30 {
  filter: hue-rotate(30deg);
}

.hue-rotate-60 {
  filter: hue-rotate(60deg);
}

/* Background utilities */
.bg-size-200 {
  background-size: 200% 100%;
}

.bg-pos-0 {
  background-position: 0% 50%;
}

.bg-pos-100 {
  background-position: 100% 50%;
}

/* Game preview enhancements */
#gamePreview {
    transition: all 0.5s ease;
    position: relative;
}

#gamePreview .hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Game preview card styles */
.game-preview-card {
    backdrop-filter: blur(10px);
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Enhanced play button with gradient animation */
.btn-play-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    position: relative;
    overflow: hidden;
}

.btn-play-gradient:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-play-gradient:hover:before {
    left: 100%;
}

/* Screenshot gallery hover effects */
.screenshot-thumb {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.screenshot-thumb img {
    transition: transform 0.3s ease;
}

.screenshot-thumb:hover img {
    transform: scale(1.1);
}

/* Game stats pill styles */
.game-stat-pill {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s ease;
}

.game-stat-pill:hover {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Gradient background animations */
.bg-gradient-animated {
    background: linear-gradient(-45deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating animation for play button */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse effect for important elements */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.6); }
}

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

/* Start button enhancements */
.btn-primary.btn-lg, .btn-primary.btn-xl {
  font-size: 1.125rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--secondary)) 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary.btn-xl {
  font-size: 1.25rem;
  padding: 1rem 3rem;
}

.btn-primary.btn-lg::before, .btn-primary.btn-xl::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.btn-primary.btn-lg:hover::before, .btn-primary.btn-xl:hover::before {
  left: 100%;
}

/* Game info badges */
.game-info-badge {
  background-color: rgba(var(--card), 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--border), 0.3);
}

/* Drop shadow utilities */
.drop-shadow-lg {
  filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
}

.drop-shadow-2xl {
  filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15));
}

/* Transform utilities */
.transform {
  transform: translateZ(0);
}

.hover\:-translate-y-1:hover {
  transform: translateY(-0.25rem);
}

.hover\:-translate-y-2:hover {
  transform: translateY(-0.5rem);
}

.hover\:rotate-12:hover {
  transform: rotate(12deg);
}

.hover\:scale-125:hover {
  transform: scale(1.25);
}

/* Screenshot gallery styles */
.screenshot-gallery {
  position: relative;
}

.screenshot-gallery img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-gallery:hover img {
  transform: scale(1.1);
}

/* Shadow utilities */
.shadow-primary\/25 {
  box-shadow: 0 25px 50px -12px rgba(var(--primary), 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .game-iframe {
    height: 300px;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  #gamePreview {
    height: 400px !important;
  }
  
  .btn-primary.btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }
  
  .btn-primary.btn-xl {
    font-size: 1.125rem;
    padding: 0.875rem 2rem;
  }
  
  /* Stack screenshots vertically on mobile */
  #gamePreview .flex {
    flex-direction: column;
  }
  
  #gamePreview .flex-1 {
    flex: none;
    height: 33.333%;
  }
}

/* Media queries for responsive design */
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .text-5xl { font-size: 2.5rem; line-height: 1; }
  .text-xl { font-size: 1.125rem; line-height: 1.75rem; }
  .px-4 { padding-left: 0.5rem; padding-right: 0.5rem; }
  .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
  .mx-8 { margin-left: 1rem; margin-right: 1rem; }
  
  /* Responsive button adjustments */
  #startGameBtn {
    padding: 2rem 1.5rem !important;
    font-size: 1.25rem !important;
  }
  
  #startGameBtn span {
    font-size: 1.25rem !important;
  }
  
  #startGameBtn .w-16 {
    width: 3rem !important;
    height: 3rem !important;
  }
  
  #startGameBtn .w-10 {
    width: 2rem !important;
    height: 2rem !important;
  }
}

/* Enhanced Play Button Styles */
#startGameBtn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgb(16, 185, 129), 
    rgb(34, 197, 94), 
    rgb(20, 184, 166)
  ) !important;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  box-shadow: 
    0 0 30px rgba(16, 185, 129, 0.4),
    0 20px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  border: 4px solid rgba(255, 255, 255, 0.2) !important;
}

#startGameBtn:hover {
  transform: translateY(-6px) scale(1.05) !important;
  box-shadow: 
    0 0 50px rgba(16, 185, 129, 0.7),
    0 30px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  background-size: 100% 100%;
  animation: gradientShift 1.5s ease infinite;
}

#startGameBtn:active {
  transform: translateY(-4px) scale(1.02) !important;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes buttonPulse {
  0%, 100% { 
    box-shadow: 
      0 0 30px rgba(16, 185, 129, 0.4),
      0 20px 40px rgba(0, 0, 0, 0.2);
  }
  50% { 
    box-shadow: 
      0 0 50px rgba(16, 185, 129, 0.6),
      0 25px 50px rgba(0, 0, 0, 0.25);
  }
}

/* Button text enhancement */
#startGameBtn span {
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(255, 255, 255, 0.3) !important;
  letter-spacing: 0.05em;
}

/* Play icon enhancement */
#startGameBtn i {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
}

/* Game Cover Hover Enhancement */
.group:hover img {
  filter: brightness(1.1) !important;
}
