@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Inter:wght@300;400;600;800&display=swap');

:root {
  --bg-dark: #030303;
  --bg-panel: rgba(15, 15, 20, 0.7);
  --text-main: #f0f0f0;
  --text-muted: #8a8d91;
  --accent-blue: #00f3ff;
  --accent-red: #ff003c;
  --metallic: #2a2d34;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 243, 255, 0.3);
  
  --font-heading: 'Michroma', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Selection */
::selection {
  background: var(--accent-red);
  color: #fff;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
}

h1 { font-size: 4rem; line-height: 1.2; letter-spacing: 2px; }
h2 { font-size: 2.5rem; letter-spacing: 1px; }

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }
}

/* Custom Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: screen;
  box-shadow: 0 0 10px var(--accent-blue);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor.hovered {
  width: 50px;
  height: 50px;
  background-color: transparent;
  border: 1px solid var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red), inset 0 0 10px var(--accent-red);
}

/* Loading Screen (Engine Start) */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease-out;
}

.loader-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-muted);
  letter-spacing: 10px;
  margin-bottom: 2rem;
  position: relative;
}

.loader-text::after {
  content: 'APEX';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-red);
  width: 0%;
  overflow: hidden;
  animation: revEngine 2s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

.loader-bar {
  width: 300px;
  height: 2px;
  background: #222;
  position: relative;
  overflow: hidden;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue);
  animation: revEngine 2s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

@keyframes revEngine {
  0% { width: 0%; }
  40% { width: 30%; }
  60% { width: 35%; }
  80% { width: 80%; }
  100% { width: 100%; }
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(3,3,3,0.9), transparent);
  transition: all 0.3s ease;
}

nav.nav-scrolled {
  background: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 4rem;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand span {
  color: var(--accent-red);
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent-blue);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  z-index: 102;
}

.hamburger span {
  width: 30px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
}

@media (max-width: 992px) {
  nav { padding: 1rem 2rem; }
  nav.nav-scrolled { padding: 1rem 2rem; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(3, 3, 3, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.5s ease-in-out;
    z-index: 101;
  }
  .nav-links.active { right: 0; }
  .nav-links a { font-size: 1.2rem; }
  .hamburger { display: flex; }
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--accent-red); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--accent-red); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  background: transparent;
  color: #fff;
  border: 1px solid var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.1), inset 0 0 10px rgba(0, 243, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

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

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), inset 0 0 15px rgba(0, 243, 255, 0.2);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

.btn-red {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(255, 0, 60, 0.1), inset 0 0 10px rgba(255, 0, 60, 0.05);
}
.btn-red::before {
  background: linear-gradient(90deg, transparent, rgba(255, 0, 60, 0.3), transparent);
}
.btn-red:hover {
  background: rgba(255, 0, 60, 0.1);
  box-shadow: 0 0 20px rgba(255, 0, 60, 0.4), inset 0 0 15px rgba(255, 0, 60, 0.2);
  text-shadow: 0 0 8px rgba(255, 0, 60, 0.8);
}

/* Three.js Canvas */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-pad {
  padding: 8rem 0;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: -2;
  filter: contrast(1.2) saturate(1.5);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-subtitle {
  color: var(--accent-blue);
  font-family: var(--font-heading);
  letter-spacing: 5px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  max-width: 500px;
}

/* Cyber Panels */
.cyber-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  position: relative;
  border-left: 3px solid var(--accent-blue);
}

.cyber-panel::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--accent-blue);
  border-right: 2px solid var(--accent-blue);
}

/* Vehicle Grid (Fleet) */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
}

@media (max-width: 480px) {
  .fleet-grid { grid-template-columns: 1fr; }
}

.vehicle-card {
  position: relative;
  background: #0a0a0c;
  border: 1px solid #1a1a20;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
}

.vehicle-card:hover {
  border-color: var(--accent-red);
  box-shadow: 0 10px 30px rgba(255, 0, 60, 0.15);
  transform: translateY(-10px);
}

.vehicle-img-wrap {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

.vehicle-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.vehicle-card:hover .vehicle-img-wrap img {
  transform: scale(1.1);
}

.vehicle-card-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  opacity: 0.8;
}

.vehicle-info {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.v-category {
  color: var(--accent-red);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.v-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.v-specs {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  border-top: 1px solid #1a1a20;
  padding-top: 1rem;
}

.v-price {
  font-family: var(--font-heading);
  color: #fff;
}
.v-price span { color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-body); }

/* Marquee */
.marquee-container {
  width: 100%;
  background: #000;
  padding: 1.5rem 0;
  border-top: 1px solid #1a1a20;
  border-bottom: 1px solid #1a1a20;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-muted);
  animation: marquee 20s linear infinite;
  letter-spacing: 3px;
}

.marquee-content span {
  margin: 0 4rem;
  color: #fff;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Footer */
footer {
  background: #000;
  border-top: 1px solid var(--accent-blue);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 300px; height: 1px;
  box-shadow: 0 0 20px 5px var(--accent-blue);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}

.f-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.f-col ul {
  list-style: none;
}
.f-col li { margin-bottom: 1rem; }
.f-col a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.f-col a:hover { color: var(--accent-blue); }

.f-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid #1a1a20;
  padding-top: 2rem;
}

/* Animated Specs Bars */
.spec-row {
  margin-bottom: 1.5rem;
}
.spec-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.spec-bar-bg {
  width: 100%;
  height: 4px;
  background: #222;
  position: relative;
  overflow: hidden;
}
.spec-bar-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
  width: 0%; /* Animated via JS */
}

/* Base Classes for HTML updates */
.about-grid {
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 4rem; 
  align-items: center;
}
.checkout-split-row {
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1rem;
}

/* Comprehensive Mobile Responsiveness */
@media (max-width: 768px) {
  /* Typography Scaling */
  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.8rem !important; }
  .hero-subtitle { font-size: 0.7rem; letter-spacing: 2px; }
  .v-title-large { font-size: 2rem !important; }
  
  /* Layout Spacing */
  .section-pad { padding: 4rem 0; }
  .container { padding: 0 1.5rem; }
  
  /* Grids Stacking */
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .checkout-split-row { grid-template-columns: 1fr; gap: 1rem; }
  .fleet-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
  
  /* UI Elements */
  .loader-bar { width: 80vw; }
  nav { padding: 1rem 1.5rem; }
  nav.nav-scrolled { padding: 1rem 1.5rem; }
  .nav-brand { font-size: 1.2rem; }
  .btn { padding: 0.8rem 1.5rem; font-size: 0.8rem; }
  
  /* Specific Sections */
  .hero-desc { font-size: 0.9rem; margin-bottom: 2rem; }
  .vehicle-details { padding: 2rem 1.5rem; }
  .booking-panel { padding: 1.5rem 1rem; }
  
  /* Checkout Specific */
  .checkout-container { padding: 100px 1.5rem 2rem; }
  .success-overlay h1 { font-size: 2.5rem; }
  
  /* Vehicle Details Page Specific */
  .vehicle-split { padding-top: 60px; }
  .vehicle-gallery { height: 40vh; }
  .price-badge { font-size: 1rem; padding: 0.4rem 0.8rem; margin-bottom: 1.5rem; }
}
