/* Base styles and reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #ff5722;
  --secondary-color: #03a9f4;
  --accent-color: #ffc107;
  --text-light: #f8f9fa;
  --text-dark: #212529;
  --background: #121212;
  --background-light: #1e1e1e;
  --card-background: #252525;
  --border-color: #333;
}

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--background);
  background-image: linear-gradient(45deg, #121212 25%, #0f0f0f 25%, #0f0f0f 50%, #121212 50%, #121212 75%, #0f0f0f 75%, #0f0f0f 100%);
  background-size: 20px 20px;
}

/* Accessibility - visually hidden elements */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Game container */
#canvas-container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Game description styles */
#game-description {
  padding: 2rem 0;
  background-color: var(--background-light);
  position: relative;
  z-index: 1;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
}

.description-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
  font-weight: 900;
  letter-spacing: 2px;
}

h2 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

p {
  margin-bottom: 1.5rem;
}

strong {
  color: var(--accent-color);
}

/* Lists styling */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.features-list li, .controls-list li {
  margin-bottom: 0.75rem;
  position: relative;
  list-style-type: none;
  padding-left: 1.5rem;
}

.features-list li::before {
  content: "🏎️";
  position: absolute;
  left: 0;
}

.controls-list li::before {
  content: "🎮";
  position: absolute;
  left: 0;
}

/* Footer styles */
footer {
  padding: 2rem 0;
  background-color: var(--background);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-links li {
  margin: 0 1rem;
}

.footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
  }
  
  .footer-links li {
    margin: 0.5rem 0;
  }
}

/* Game sections highlight effects */
section {
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  background-color: var(--card-background);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Button styles */
.cta-button {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color), #ff8a50);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  margin: 15px 0;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 87, 34, 0.5);
}

/* Car gallery */
.car-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.car-card {
  background-color: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.car-card:hover {
  transform: translateY(-5px);
}

/* Track highlight */
.track-highlight {
  background-color: rgba(3, 169, 244, 0.1);
  border-left: 4px solid var(--secondary-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

/* Speedometer effect for headings */
.speedometer {
  position: relative;
  display: inline-block;
  margin-right: 10px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Game mode badges */
.game-mode {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin: 5px 5px 5px 0;
  font-weight: bold;
  text-transform: uppercase;
}