body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #F5F5F5;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  height: 100vh;
  width: 100vw;
}

* {
  box-sizing: border-box;
}

#configurator-ui {
  display: flex;
  height: 100vh;
  width: 100vw;
  color: #1A1A1A;
  overflow: hidden;
}

.viewport {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, #E0E0E0 0%, #BDBDBD 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

canvas {
  display: block;
  outline: none;
}

.view-controls {
  position: absolute;
  bottom: 32px;
  left: 32px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.control-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.control-btn:hover {
  background: #FFF;
  transform: translateY(-2px);
}

.sidebar {
  width: 340px;
  background: #0A0F1A;
  color: #FFF;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  z-index: 20;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.5s ease-in-out, width 0.5s ease-in-out;
}

body.summary-mode .sidebar {
  min-width: 0;
  width: 0px;
  padding: 0;
  opacity: 0;
  transform: translateX(100%);
  border-left: none;
  overflow: hidden;
  pointer-events: none;
}

.tooltip {
  position: absolute;
  background: rgba(10, 15, 26, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

.tooltip.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.accordion-header.completed .step-indicator {
  background: #E31837;
  color: #fff;
  border-color: #E31837;
}

.step-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 10px;
  margin-right: 12px;
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.logo-container {
  margin-bottom: 24px;
}

.logo-container img {
  height: 28px;
}

.model-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.model-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.search-box {
  margin-top: 20px;
  position: relative;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  color: #FFF;
  font-size: 13px;
  border-radius: 2px;
}

.accordion-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.accordion-header {
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s;
  user-select: none;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.accordion-header.active {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #E31837;
}

.header-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.accordion-content {
  display: none;
}

.accordion-content.active {
  display: block;
}

.option-grid {
  padding: 0 32px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.thumb {
  aspect-ratio: 1;
  border-radius: 2px;
  cursor: pointer;
  border: 2px solid transparent;
  background: #1A1F2B;
  position: relative;
  overflow: hidden;
}

.thumb.active {
  border-color: #E31837;
}

.thumb-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.mat-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  font-size: 8px;
  background: rgba(0, 0, 0, 0.6);
  text-align: center;
  padding: 2px 0;
}

.price-footer {
  margin-top: auto;
  padding: 32px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.total-price {
  font-size: 20px;
  font-weight: 700;
}

.total-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.order-btn {
  background: #E31837;
  color: #FFF;
  border: none;
  padding: 12px 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 2px;
}

.order-btn:hover {
  background: #F52040;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0A0F1A;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
  color: #FFF;
}

.loading-logo {
  height: 40px;
  margin-bottom: 20px;
}

.loading-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.progress-container {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #E31837;
  transition: width 0.1s ease;
}
