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

:root {
  --bg-color: #050505;
  --text-color: #f1f1f1;
  --accent-color: #e50000;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --transition-speed: 0.4s;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  transition: background var(--transition-speed);
}

header.scrolled {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 4px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.9rem;
  transition: color var(--transition-speed);
  cursor: pointer;
}

nav a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/hero.png') center/cover no-repeat;
  z-index: -2;
  filter: brightness(0.6);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, var(--bg-color), transparent);
  z-index: -1;
}

.hero-content {
  text-align: center;
  z-index: 1;
  animation: fadeIn 2s ease-out;
}

.hero h1 {
  font-size: 5rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 5px;
  margin-bottom: 40px;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid var(--text-color);
  background: transparent;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--text-color);
  transition: left var(--transition-speed);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: var(--bg-color);
  font-weight: 600;
}

/* Sections Base */
section {
  padding: 100px 50px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--accent-color);
}

/* Specs Section */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

.spec-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 40px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform var(--transition-speed);
}

.spec-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.3);
}

.spec-value {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.spec-label {
  font-size: 1rem;
  font-weight: 300;
  color: #aaa;
  letter-spacing: 2px;
}

/* Configurator Section */
.configurator-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 50px;
  width: 100%;
  max-width: 1200px;
}

.config-image-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  position: relative;
}

.config-image-container img {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: opacity 0.5s ease-in-out;
}

.config-image-container img.fading {
  opacity: 0.5;
}

.config-controls {
  flex: 0.5;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.control-group h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: #aaa;
}

.color-options {
  display: flex;
  gap: 15px;
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.color-black { background-color: #111; }
.color-white { background-color: #eee; }
.color-red { background-color: #c00; }
.color-grey { background-color: #555; }

/* Track Mode Dashboard */
.dashboard-container {
  background: #000;
  border: 2px solid #222;
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  padding: 40px;
  box-shadow: inset 0 0 50px rgba(255,0,0,0.05), 0 20px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.dashboard-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: metallic 5s linear infinite;
  pointer-events: none;
}

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

.dashboard-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 30px;
  z-index: 1;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #888;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
}

.track-active .dot {
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-color);
}

.track-active .status-indicator {
  color: var(--accent-color);
}

.dashboard-main {
  display: flex;
  justify-content: space-around;
  width: 100%;
  align-items: flex-end;
  margin-bottom: 40px;
  z-index: 1;
}

.dial {
  text-align: center;
}

.dial-value {
  font-size: 4rem;
  font-weight: 800;
  font-family: monospace;
  color: #fff;
  line-height: 1;
}

.track-active .dial-value {
  color: var(--accent-color);
  text-shadow: 0 0 15px rgba(229, 0, 0, 0.5);
}

.dial-unit {
  font-size: 1rem;
  color: #666;
  letter-spacing: 2px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 30px;
  z-index: 1;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.1s linear;
}

.toggle-track-btn {
  background: transparent;
  border: 1px solid #444;
  color: #fff;
  padding: 10px 30px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  letter-spacing: 1px;
  z-index: 1;
}

.toggle-track-btn:hover, .track-active .toggle-track-btn {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(229, 0, 0, 0.4);
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 5px;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.close-lightbox {
  position: absolute;
  top: 30px; right: 40px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
}

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

@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1rem; }
  .spec-value { font-size: 2.5rem; }
  .dial-value { font-size: 2.5rem; }
  nav ul { gap: 15px; }
  header { padding: 20px; }
}
