/* ===================================
   GARAGE REDESIGN - Based on Reference Images
   =================================== */

.garage-redesign {
  min-height: 100vh;
  position: relative;
  z-index: 0;
}

.garage-redesign::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('assets/image 242.png') center center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.garage-redesign::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

.garage-redesign > * {
  position: relative;
  z-index: 2;
}

.garage-redesign-original {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
}

/* ===================================
   GARAGE ACTION BANNER - Carousel System
   =================================== */

.garage-banner-carousel {
  margin: 12px 12px 16px 12px;
  position: relative;
  overflow: hidden;
}

/* LiveOps Banner - Bottom Section */
.garage-liveops-banner {
  margin: 16px 12px 12px 12px;
  position: relative;
  overflow: hidden;
}

/* LiveOps banner - width adaptive to show full image */
.garage-liveops-banner .garage-action-banner[data-type="sweepstake"] {
  height: auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.garage-liveops-banner .garage-action-banner[data-type="sweepstake"] img {
  width: 100%;
  height: auto;
  display: block;
}

.garage-banner-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.garage-action-banner {
  min-width: 100%;
  padding: 16px 20px;
  background: rgba(180, 180, 0, 0.25);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  max-height: 80px;
}

/* Image banners - full bleed with no gaps */
.garage-action-banner[data-type="sweepstake"] {
  padding: 0;
  background: none;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  height: auto;
}

.garage-action-banner[data-type="sweepstake"] img {
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* 移动端：显示更多内容 */
@media (max-width: 768px) {
  .garage-action-banner[data-type="sweepstake"] img {
    max-height: 130px;
  }
}

.garage-action-banner img {
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
}

.garage-action-banner::before {
  display: none;
}

.garage-action-banner:hover {
  transform: translateY(-1px);
  background: rgba(180, 180, 0, 0.35);
}

.banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.banner-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.banner-icon img {
  filter: brightness(0) saturate(100%) invert(83%) sepia(45%) saturate(497%) hue-rotate(29deg) brightness(101%) contrast(91%);
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-size: 16px;
  font-weight: 700;
  color: #CDDC39;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
}

.banner-subtitle {
  font-size: 12px;
  color: #CDDC39;
  margin: 0;
  opacity: 0.8;
}

/* Carousel Indicators - hidden per user request */
.banner-carousel-indicators {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: #FFD700;
  width: 24px;
  border-radius: 4px;
}

/* ===================================
   USER PROFILE HEADER (Image 2 Style)
   =================================== */

.garage-header {
  position: relative;
  padding: 60px 12px 12px;
  background: transparent;
  border-bottom: none;
  z-index: 3;
}

.user-profile-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.profile-avatar-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-avatar-container:hover .avatar-edit-overlay {
  display: flex;
}

.edit-icon {
  font-size: 24px;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: 0.3px;
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

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

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.2);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.free-builds-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  margin-right: 8px;
}

.free-builds-badge .badge-icon {
  font-size: 16px;
}

.free-builds-badge .badge-text {
  font-size: 12px;
  color: #4CAF50;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.elite-badge {
  display: inline-block;
  padding: 2px 8px;
  background: transparent;
  border-radius: 4px;
  border: none;
  font-size: 11px;
  color: #FFD700;
  font-weight: 600;
  margin-bottom: 8px;
}

.badge-icon {
  font-size: 16px;
}

.badge-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-location {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
}

.badge-title {
  font-size: 10px;
  color: #FFD700;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.settings-btn:hover {
  color: #fff;
}

/* ===================================
   CAR LIST SECTION (Vertical Scroll)
   =================================== */

.car-list-scroll {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 12px;
  padding-bottom: 90px;
  background: transparent;
  width: 100%;
  max-width: 100%;
}

.car-card {
  position: relative;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 16px;
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

.car-card:hover {
  background: #222;
}

.car-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.car-title-section {
  flex: 1;
}

/* New left-aligned car card header */
.car-card-header-new {
  text-align: left;
  margin-bottom: 12px;
}

.car-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.car-title-row .car-name {
  margin: 0;
}

.car-value-row {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.car-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.car-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
}

.build-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.delete-build-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s ease;
}

.delete-build-btn:hover {
  color: #ff4444;
  transform: scale(1.1);
}

.car-value {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.car-image-wrapper {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: visible;
  margin-bottom: 0;
  background: rgba(0,0,0,0.3);
  position: relative;
}

.car-image-wrapper .car-image {
  border-radius: 8px;
}

.car-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bottom left info overlay */
.image-info-overlay {
  position: absolute;
  bottom: clamp(8px, 2vw, 20px);
  left: clamp(8px, 2vw, 20px);
  z-index: 5;
  text-align: left;
}

.car-name-overlay {
  font-size: clamp(14px, 3vw, 24px);
  font-weight: 600;
  color: #fff;
  margin: 4px 0 2px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.car-value-overlay {
  font-size: clamp(11px, 2vw, 16px);
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.image-info-overlay .build-type-badge {
  font-size: clamp(9px, 1.5vw, 12px);
  padding: clamp(2px, 0.5vw, 4px) clamp(6px, 1vw, 10px);
}

/* Status badges overlay */
.image-status-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 5;
}

/* Image overlay buttons container - top right */
.image-overlay-buttons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.image-edit-menu {
  position: relative;
}

.image-edit-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.image-edit-btn img,
.image-edit-btn span {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.image-edit-btn:hover {
  opacity: 0.8;
}

.edit-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: none;
}

.edit-dropdown.show {
  display: block;
}

.edit-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.edit-option:hover {
  background: rgba(255,255,255,0.1);
}

.edit-option.delete-build-option:hover {
  background: rgba(255,68,68,0.2);
  color: #ff4444;
}

.car-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4vw 4vw;
  gap: 3vw;
}

.car-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: clamp(8px, 2.5vw, 12px);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: clamp(18px, 7vw, 32px);
  font-weight: 700;
  color: #fff;
}

.drift-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 0 8px;
}

.drift-score-label {
  font-size: clamp(8px, 2.5vw, 12px);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drift-score-value {
  font-size: clamp(18px, 7vw, 32px);
  font-weight: 700;
  color: #fff;
}

.pentagon-display {
  width: clamp(60px, 25vw, 120px);
  height: clamp(60px, 25vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pentagon-svg {
  display: block;
  filter: none;
}

.pentagon-label {
  fill: rgba(255,255,255,0.6);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pentagon-value {
  fill: rgba(255,255,255,0.7);
  font-size: 10px;
  font-weight: 700;
}

.rerun-build-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(0,122,255,0.8) 0%, rgba(0,81,213,0.8) 100%);
  border: 1px solid rgba(0,122,255,0.5);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rerun-build-btn svg {
  width: 16px;
  height: 16px;
}

.rerun-build-btn:hover {
  background: linear-gradient(135deg, rgba(0,122,255,1) 0%, rgba(0,81,213,1) 100%);
  border-color: rgba(0,122,255,0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

.rerun-build-btn:active {
  transform: translateY(0);
}

/* Standalone fact check button - NOT used in car-actions */
.fact-check-card-btn:not(.car-card .car-actions .fact-check-card-btn) {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: rgba(100,100,100,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fact-check-card-btn:hover {
  background: rgba(120,120,120,0.8);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.fact-check-card-btn:active {
  transform: translateY(0);
}

.share-build-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(0,255,255,0.2) 0%, rgba(0,212,212,0.2) 100%);
  border: 1px solid rgba(0,255,255,0.4);
  border-radius: 10px;
  color: #00ffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-build-btn:hover {
  background: linear-gradient(135deg, rgba(0,255,255,0.3) 0%, rgba(0,212,212,0.3) 100%);
  border-color: rgba(0,255,255,0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,255,255,0.3);
}

.share-build-btn:active {
  transform: translateY(0);
}

.share-build-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.delete-build-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(60, 60, 60, 1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
  opacity: 1;
  z-index: 10;
}

.delete-build-btn:hover {
  background: rgba(50, 50, 50, 1);
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Prevent card click when clicking delete button */
.delete-build-btn:active {
  transform: scale(0.95);
}

/* Empty State */
.empty-garage {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.5);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-garage h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.7);
}

.empty-garage p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}

/* ===================================
   BOTTOM NAVIGATION BAR (Instagram Style)
   =================================== */

.garage-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 20px;
  z-index: 101;
}

.nav-item {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item:hover {
  color: rgba(255,255,255,0.7);
  transform: scale(1.1);
}

.nav-item.active {
  color: #FFD700;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

/* Center Add Button (Instagram style) */
.nav-item-add {
  background: #000;
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  margin-top: -18px; /* Lift it above the nav bar */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  padding: 0;
  overflow: hidden;
}

.nav-item-add:hover {
  background: #1a1a1a;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-item-add:active {
  transform: scale(1.05) translateY(-1px);
}

.nav-item-add svg {
  width: 40px;
  height: 40px;
  stroke: #fff;
  fill: none;
}

.nav-item-add img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.delete-build-btn svg {
  stroke: #fff !important;
  fill: none !important;
  display: block;
}

/* ===================================
   FACT CHECK BADGES
   =================================== */

.fact-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.fc-pending {
  background: rgba(255,193,7,0.2);
  color: #FFC107;
  border: 1px solid rgba(255,193,7,0.5);
}

.fc-pending:hover {
  background: rgba(255,193,7,0.3);
  box-shadow: 0 0 10px rgba(255,193,7,0.3);
}

.fc-review {
  background: rgba(33,150,243,0.2);
  color: #2196F3;
  border: 1px solid rgba(33,150,243,0.5);
}

.fc-review:hover {
  background: rgba(33,150,243,0.3);
  box-shadow: 0 0 10px rgba(33,150,243,0.3);
}

.fc-certified {
  background: rgba(76,175,80,0.2);
  color: #4CAF50;
  border: 1px solid rgba(76,175,80,0.5);
}

.fc-certified:hover {
  background: rgba(76,175,80,0.3);
  box-shadow: 0 0 10px rgba(76,175,80,0.3);
}

.fc-rejected {
  background: rgba(244,67,54,0.2);
  color: #F44336;
  border: 1px solid rgba(244,67,54,0.5);
}

.fc-rejected:hover {
  background: rgba(244,67,54,0.3);
  box-shadow: 0 0 10px rgba(244,67,54,0.3);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  .car-image-wrapper {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: unset;
    margin-bottom: 12px;
  }
  
  .car-image {
    object-fit: cover;
  }
  
  .profile-name {
    font-size: 20px;
  }
  
  .stat-number {
    font-size: 18px;
  }
  
  /* Fix car card layout on mobile */
  .car-card {
    margin: 0 0 16px 0;
    padding: 0;
    border-radius: 8px;
  }
  
  .car-card-header-new {
    padding: 0 0 8px 0;
  }
  
  .car-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .car-title-row .car-name {
    font-size: 16px;
    max-width: 100%;
    word-break: break-word;
  }
  
  .build-type-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  
  .car-value-row {
    font-size: 12px;
  }
  
  /* Stats section - larger and responsive */
  .car-card-footer {
    padding: 4vw;
    gap: 3vw;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .car-spec .spec-label,
  .drift-score-label {
    font-size: 10px;
  }
  
  .car-spec .spec-value,
  .drift-score-value {
    font-size: 24px;
  }
  
  .pentagon-display {
    width: 90px;
    height: 90px;
  }
  
  .pentagon-display svg {
    width: 80px;
    height: 80px;
  }
  
  /* Fix action buttons on mobile - equal width */
  .car-card .car-actions {
    padding: 0 4vw 4vw 4vw !important;
    gap: 2vw !important;
    flex-wrap: nowrap !important;
  }
  
  .car-card .car-actions .action-btn {
    font-size: 12px !important;
    padding: 12px 0 !important;
    flex: 0 0 calc(50% - 1vw) !important;
    width: calc(50% - 1vw) !important;
    max-width: calc(50% - 1vw) !important;
  }
  
  .action-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  /* Fix build progress on mobile */
  .build-progress-section {
    padding: 3vw 4vw !important;
  }
}

@media (min-height: 800px) {
  .car-image-wrapper {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* ===================================
   PERFORMANCE CHART MODAL
   =================================== */

.performance-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.performance-modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border-radius: 20px;
  padding: 30px;
  max-width: 90%;
  width: 400px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

.modal-title {
  color: #FFD700;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 5px 0;
  text-align: center;
}

.modal-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0 0 25px 0;
  text-align: center;
}

/* Pentagon Container */
.pentagon-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  min-height: 280px;
}

.pentagon-chart {
  display: block;
  margin: 0 auto;
}

/* Pentagon Labels */
.pentagon-labels {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.pentagon-labels .label {
  position: absolute;
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pentagon-labels .label span {
  display: block;
  color: #00ffff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.label-top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.label-right {
  top: 25%;
  right: 0;
  transform: translateX(10px);
}

.label-bottom-right {
  bottom: 15%;
  right: 10%;
}

.label-bottom-left {
  bottom: 15%;
  left: 10%;
}

.label-left {
  top: 25%;
  left: 0;
  transform: translateX(-10px);
}

/* Modal Stats */
.modal-stats {
  display: flex;
  justify-content: space-around;
  gap: 15px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.modal-stats .stat-item {
  flex: 1;
  text-align: center;
}

.modal-stats .stat-label {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-stats .stat-value {
  display: block;
  color: #00ffff;
  font-size: 18px;
  font-weight: 700;
}

/* Responsive modal */
@media (max-width: 480px) {
  .performance-modal-content {
    width: 95%;
    padding: 20px;
  }
  
  .pentagon-chart {
    width: 220px;
    height: 220px;
  }
  
  .pentagon-labels .label {
    font-size: 10px;
  }
  
  .modal-stats {
    flex-direction: column;
    gap: 10px;
  }
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 400px;
  padding: 16px 20px;
  background: rgba(20, 20, 20, 0.95);
  border-radius: 12px;
  border-left: 4px solid;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: toastSlideIn 0.3s ease-out forwards;
  backdrop-filter: blur(10px);
  /* Override style.css defaults */
  opacity: 1 !important;
  transform: translateX(0) !important;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-out {
  animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-success {
  border-left-color: #4CAF50;
}

.toast-error {
  border-left-color: #F44336;
}

.toast-warning {
  border-left-color: #FFC107;
}

.toast-info {
  border-left-color: #2196F3;
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #4CAF50;
}

.toast-error .toast-icon {
  color: #F44336;
}

.toast-warning .toast-icon {
  color: #FFC107;
}

.toast-info .toast-icon {
  color: #2196F3;
}

.toast-content {
  flex: 1;
  color: #fff;
}

.toast-message {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: rgba(255, 255, 255, 1);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 60px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

/* ========================================
   PURCHASE SUCCESS ANIMATION
   ======================================== */

.purchase-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.purchase-success-overlay.show {
  opacity: 1;
}

.purchase-success-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid #4CAF50;
  border-radius: 24px;
  padding: 48px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(76, 175, 80, 0.3);
}

.purchase-success-overlay.show .purchase-success-card {
  transform: scale(1);
}

.success-icon {
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
}

.success-circle {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: drawCircle 0.6s ease forwards;
}

.success-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s ease forwards 0.4s;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.success-title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
  animation: slideUp 0.5s ease 0.3s both;
}

.success-subtitle {
  font-size: 18px;
  color: #4CAF50;
  margin: 0 0 32px 0;
  animation: slideUp 0.5s ease 0.4s both;
}

.success-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.success-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(76, 175, 80, 0.1);
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.3);
  animation: slideUp 0.5s ease calc(0.5s + var(--index) * 0.1s) both;
}

.success-item:nth-child(1) {
  --index: 0;
}

.success-item:nth-child(2) {
  --index: 1;
}

.success-item-icon {
  font-size: 24px;
}

.success-item-text {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.success-close-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: slideUp 0.5s ease 0.7s both;
}

.success-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.success-close-btn:active {
  transform: translateY(0);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive for success animation */
@media (max-width: 600px) {
  .purchase-success-card {
    padding: 32px 24px;
  }
  
  .success-title {
    font-size: 24px;
  }
  
  .success-subtitle {
    font-size: 16px;
  }
  
  .success-item-text {
    font-size: 16px;
  }
}

/* ===================================
   BUILD CARD ACTION BUTTONS (Image 2 Style)
   =================================== */

/* Use more specific selector to override style.css */
.car-card .car-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  gap: 2vw;
  margin-top: 0;
  padding: 0 4vw 4vw 4vw;
  border-top: none;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}

.car-card .car-actions .action-btn,
.car-card .car-actions .action-btn.fact-check-card-btn,
.car-card .car-actions .action-btn.refine-build-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 !important;
  margin: 0 !important;
  background: #000;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 0 0 calc(50% - 1vw) !important;
  width: calc(50% - 1vw) !important;
  min-width: 0 !important;
  max-width: calc(50% - 1vw) !important;
  box-sizing: border-box;
}

.car-card .car-actions .action-btn:hover {
  background: #1a1a1a;
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.car-card .car-actions .action-btn:active {
  transform: translateY(0);
}

.car-card .car-actions .action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===================================
   RADAR CHART LARGER SIZE (Image 2 Style)
   =================================== */

.drift-chart-container {
  width: 120px;
  height: 120px;
  position: relative;
}

.drift-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===================================
   RECOMMENDED PARTS SECTION
   =================================== */

.recommended-parts-section {
  margin: 24px 16px;
  padding: 0;
}

/* Per-build recommended section - carousel style */
.recommended-parts-section.build-recommended {
  margin: 0 0 16px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.recommended-parts-section.build-recommended .recommended-header {
  margin-bottom: 12px;
}

.recommended-parts-section.build-recommended .recommended-title {
  font-size: 14px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Carousel wrapper with side arrows */
.recommended-carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Navigation buttons - hidden on all devices */
.recommended-nav-btn {
  display: none !important;
}

.recommended-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.recommended-nav-btn:active {
  transform: scale(0.9);
}

/* Carousel container */
.recommended-carousel-container {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.recommended-carousel {
  display: inline-flex;
  gap: 8px;
  overflow-x: scroll;
  overflow-y: visible;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 16px 4px 4px;
  touch-action: pan-x;
  min-width: 100%;
}

.recommended-carousel::-webkit-scrollbar {
  display: none;
}

.recommended-parts-section.build-recommended .recommended-part-card {
  flex: 0 0 100px;
  min-width: 100px;
  max-width: 120px;
  padding: 8px;
}

.recommended-parts-section.build-recommended .recommended-part-image,
.recommended-parts-section.build-recommended .part-image-wrapper {
  height: 100px;
}

.recommended-parts-section.build-recommended .recommended-part-name,
.recommended-parts-section.build-recommended .part-name {
  font-size: 12px;
  -webkit-line-clamp: 2;
}

.recommended-parts-section.build-recommended .recommended-part-price,
.recommended-parts-section.build-recommended .part-price {
  font-size: 13px;
}

/* Mobile responsive - allow proper compression */
@media (max-width: 768px) {
  .recommended-parts-section.build-recommended {
    margin: 0 0 16px 0;
    padding: 12px;
  }
  
  .recommended-parts-section.build-recommended .recommended-part-card {
    flex: 0 0 90px;
    min-width: 90px;
    padding: 8px;
  }
  
  .recommended-carousel-wrapper {
    gap: 4px;
  }
  
  .recommended-nav-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  
  .recommended-parts-section.build-recommended .recommended-part-image,
  .recommended-parts-section.build-recommended .part-image-wrapper {
    height: 70px;
  }
  
  .recommended-parts-section.build-recommended .recommended-part-name,
  .recommended-parts-section.build-recommended .part-name {
    font-size: 10px;
  }
  
  .recommended-parts-section.build-recommended .recommended-part-price,
  .recommended-parts-section.build-recommended .part-price {
    font-size: 11px;
  }
}

/* Extra small screens - show 2 items */
@media (max-width: 400px) {
  .recommended-parts-section.build-recommended .recommended-part-card {
    flex: 0 0 85px;
    min-width: 85px;
  }
  
  /* Keep arrows visible on desktop even at small widths */
  .recommended-nav-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }
  
  .recommended-nav-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .recommended-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.recommended-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.recommended-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
}

.recommended-refresh-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #888;
}

.recommended-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.recommended-refresh-btn:active {
  transform: rotate(180deg);
}

/* Parts Grid - 2 columns */
.recommended-parts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Part Card */
.recommended-part-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  outline: none !important;
}

.recommended-part-card:focus,
.recommended-part-card:focus-visible,
.recommended-part-card:focus-within {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
  background: #1a1a1a !important;
}

.recommended-part-card:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
  background: #1a1a1a !important;
  transform: scale(0.98);
}

/* Ensure no highlight on any state */
.recommended-part-card,
.recommended-part-card * {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  outline: none !important;
}

/* Hero Part - subtle accent border */
.recommended-part-card.hero-part {
  border-color: rgba(255, 255, 255, 0.2);
}

.recommended-part-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.recommended-part-card.hero-part:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}


/* Part Image */
.part-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.part-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 8px;
  box-sizing: border-box;
}

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

/* Part placeholder when no thumbnail */
.part-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
}

/* FITS Label */
.part-fits-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.fits-dot {
  width: 6px;
  height: 6px;
  background: #4CAF50;
  border-radius: 50%;
}

/* Hero Part Indicator */
.hero-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(139, 115, 85, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Stats Badge - semi-transparent, no emoji */
.part-stats-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.part-stats-badge.verified {
  background: rgba(76, 175, 80, 0.25);
  color: #81C784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.part-stats-badge.popular {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Inline stats badge for detail partlist */
.part-stats-inline {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.part-stats-inline.verified {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.part-stats-inline.popular {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Key Part styles for detail-list page */
.detail-category.key-part-category {
  border: 1px solid rgba(139, 115, 85, 0.4);
  border-radius: 12px;
  background: rgba(139, 115, 85, 0.05);
  padding: 12px;
  margin-bottom: 16px;
}

.detail-item.key-part-item {
  background: rgba(139, 115, 85, 0.1);
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
}

.key-category-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #8B7355 0%, #6B5344 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Add Button */
.part-add-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #333;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
}

.recommended-part-card:hover .part-add-btn {
  opacity: 1;
  transform: scale(1);
}

.part-add-btn:hover {
  background: #444;
  transform: scale(1.1);
}

.part-add-btn:focus,
.part-add-btn:active {
  outline: none !important;
  background: #444;
}

/* Part Info */
.part-info {
  padding: 12px;
}

/* Simplified price-only style */
.part-price-only {
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #888;
}

.part-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 34px;
}

.part-price {
  font-size: 15px;
  font-weight: 700;
  color: #C41E3A;
  margin-top: 6px;
}

/* Responsive - Mobile adjustments */
@media (max-width: 360px) {
  .recommended-parts-grid {
    gap: 8px;
  }

  .part-info {
    padding: 10px;
  }

  .part-name {
    font-size: 12px;
  }

  .part-price {
    font-size: 14px;
  }
}

/* ===================================
   PART DETAIL MODAL
   =================================== */

.part-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.part-detail-modal.active {
  opacity: 1;
  visibility: visible;
}

.part-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.part-detail-content {
  position: relative;
  background: #1a1a1a;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.part-detail-modal.active .part-detail-content {
  transform: translateY(0);
}

.part-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s ease;
}

.part-detail-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.part-detail-header {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.part-detail-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: #2a2a2a;
  flex-shrink: 0;
}

.part-detail-info {
  flex: 1;
  min-width: 0;
}

.part-detail-brand {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-hero-badge {
  background: linear-gradient(135deg, #8B7355 0%, #6B5344 100%);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.part-detail-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}

.part-detail-category {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.part-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: #C41E3A;
  margin-top: 8px;
}

.part-detail-stats {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: flex;
  gap: 16px;
}

.stat-item {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px 12px;
}

.stat-item.verified {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-item.verified .stat-value {
  color: #22c55e;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.stat-section {
  margin-top: 16px;
}

.stat-section-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-tag {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-stats {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  padding: 20px;
}

.part-detail-actions {
  padding: 20px;
}

.part-detail-buy-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #8B7355;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.part-detail-buy-btn:hover {
  background: #a08567;
}

/* ===================================
   BUILD JOB CARDS - Pending/Failed builds
   =================================== */

.build-job-card {
  position: relative;
}

.build-job-card .car-image-wrapper {
  position: relative;
}

.job-status-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.job-status-overlay .status-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.job-status-overlay .status-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.job-status-overlay .status-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
  max-width: 80%;
  text-align: center;
  word-break: break-word;
}

/* Status-specific colors */
.job-status-overlay.status-running {
  background: rgba(0, 0, 0, 0.7);
}

.job-status-overlay.status-running .status-text {
  color: #FFD700;
}

.job-status-overlay.status-completed {
  background: rgba(0, 80, 0, 0.75);
}

.job-status-overlay.status-completed .status-text {
  color: #4ADE80;
}

.job-status-overlay.status-failed {
  background: rgba(80, 0, 0, 0.75);
}

.job-status-overlay.status-failed .status-text {
  color: #FF6B6B;
}

.job-status-overlay.status-timeout {
  background: rgba(80, 40, 0, 0.75);
}

.job-status-overlay.status-timeout .status-text {
  color: #FFA500;
}

/* Job action buttons */
.job-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  z-index: 11;
}

.job-actions .action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.job-actions .import-build-btn {
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  color: #000;
}

.job-actions .import-build-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.job-actions .retry-build-btn {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.job-actions .retry-build-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.job-actions .delete-job-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  flex: 0 0 auto;
  padding: 10px 16px;
}

.job-actions .delete-job-btn:hover {
  background: rgba(255, 100, 100, 0.3);
}

/* Import Success Modal */
.import-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  transition: opacity 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.import-success-content {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 320px;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.import-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.import-success-content h3 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.import-success-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.import-success-content .import-reloading {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin: 0;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.import-success-btn {
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  color: #000;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.import-success-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.4);
}

/* ===================================
   DEMO BUILD CAROUSEL
   =================================== */

.demo-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #000;
}

.demo-carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  width: 100%;
}

.demo-carousel-slide {
  min-width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-carousel-slide .car-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.demo-carousel-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #FFD700;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.demo-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.demo-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.demo-carousel-btn.prev {
  left: 8px;
}

.demo-carousel-btn.next {
  right: 8px;
}

.demo-carousel-dots {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-dot.active {
  background: #FFD700;
  width: 20px;
  border-radius: 4px;
}
