/* ============================================
   SET UP — Global Design System
   Dark Futuristic Theme + Glassmorphism
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Background & Surface */
  --bg-primary:    #0B0B0F;
  --bg-secondary:  #101117;
  --surface:       #15161C;
  --surface-light: #1E1F27;
  --surface-hover: #252630;

  /* Primary — Teal from logo */
  --primary:       #4DBFAC;
  --primary-light: #6AD4C2;
  --primary-dark:  #39A08E;
  --primary-glow:  rgba(77, 191, 172, 0.35);

  /* Accent — Brighter complement */
  --accent:        #50D4BE;
  --accent-light:  #7DE8D6;
  --accent-glow:   rgba(80, 212, 190, 0.25);

  /* Text */
  --text-primary:   #F0F0F5;
  --text-secondary: #A0A1B2;
  --text-muted:     #6B6C7E;

  /* Borders & Dividers */
  --border:        rgba(255, 255, 255, 0.06);
  --border-light:  rgba(255, 255, 255, 0.10);

  /* Glass */
  --glass-bg:      rgba(21, 22, 28, 0.65);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-blur:    16px;

  /* Misc */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.45);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Font families */
  --font-en: 'Inter', sans-serif;
  --font-ar: 'Cairo', sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Arabic override */
html[dir="rtl"] body {
  font-family: var(--font-ar);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Ambient Background Glow --- */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes ambientDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(5%, 3%) scale(1.05); }
  100% { transform: translate(-3%, -2%) scale(0.97); }
}

/* ============================================
   NAVBAR — Glassmorphism
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}

.navbar .logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--primary-glow));
  transition: filter var(--transition), transform var(--transition);
}
.navbar .logo:hover {
  filter: drop-shadow(0 0 14px var(--primary-glow));
  transform: scale(1.04);
}

/* Nav links group */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-links a:hover::after {
  width: 100%;
}

/* RTL nav link underline fix */
html[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

/* --- Language Toggle Button --- */
.btn-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(77, 191, 172, 0.08);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: 0.03em;
}
.btn-lang:hover {
  background: rgba(77, 191, 172, 0.16);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateY(-1px);
}
.btn-lang .lang-icon {
  font-size: 1.05rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 120px 2rem 4rem;
  gap: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 580px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--primary-glow);
  transition: all var(--transition);
  font-family: inherit;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px var(--primary-glow), 0 0 0 3px rgba(77,191,172,0.15);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1.2rem;
    height: 64px;
  }
  .navbar .logo {
    height: 32px;
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.85rem;
  }
  .btn-lang {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }
  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }
  .hero p {
    font-size: 0.95rem;
  }
}

/* ============================================
   BUILDER SECTION
   ============================================ */
.builder {
  position: relative;
  z-index: 1;
  padding: 110px 0 5rem;
  min-height: 100vh;
  animation: fadeSlideUp 0.6s ease-out;
}

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

/* Step Header */
.step-header {
  text-align: center;
  margin-bottom: 3rem;
}

.step-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(77, 191, 172, 0.12);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(77, 191, 172, 0.2);
  margin-bottom: 1rem;
}

.step-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.step-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   COMPONENT CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* --- Individual Card --- */
.component-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

/* Hover — primary glow */
.component-card:hover {
  border-color: rgba(77, 191, 172, 0.3);
  box-shadow:
    0 0 20px rgba(77, 191, 172, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

/* Active / Selected — green success glow */
.component-card.active-card {
  border-color: #34D399;
  box-shadow:
    0 0 16px rgba(52, 211, 153, 0.25),
    0 0 40px rgba(52, 211, 153, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.3);
}

.component-card.active-card::before {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: #34D399;
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  z-index: 2;
  animation: popIn 0.3s ease-out;
}

/* RTL — move checkmark to left */
html[dir="rtl"] .component-card.active-card::before {
  right: auto;
  left: 12px;
}

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

/* Card Image Area */
.card-img-wrap {
  background: var(--bg-secondary);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.card-img-wrap img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  opacity: 0.85;
  transition: transform var(--transition), opacity var(--transition);
}

.component-card:hover .card-img-wrap img {
  transform: scale(1.08);
  opacity: 1;
}

/* Card Body */
.card-body {
  padding: 1.2rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-price {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.01em;
}

/* ============================================
   BUILDER RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .builder {
    padding: 90px 0 3rem;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
  .card-img-wrap {
    min-height: 120px;
    padding: 1rem;
  }
  .card-img-wrap img {
    width: 80px;
    height: 80px;
  }
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1.2rem;
  padding-left: 0.5rem;
  border-left: 4px solid var(--primary);
}
html[dir="rtl"] .section-subtitle {
  padding-left: 0;
  padding-right: 0.5rem;
  border-left: none;
  border-right: 4px solid var(--primary);
}

.section-divider {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 3.5rem 0 1.5rem;
}

/* ============================================
   SUMMARY SECTION (STEP 5)
   ============================================ */
.summary-card {
  padding: 2rem;
  margin-top: 1rem;
}
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.summary-list li:last-child {
  border-bottom: none;
}
.summary-list .comp-type {
  font-weight: 700;
  color: var(--primary);
  margin-right: 1rem;
}
html[dir="rtl"] .summary-list .comp-type {
  margin-right: 0;
  margin-left: 1rem;
}
.summary-list .comp-name {
  color: var(--text-primary);
  flex: 1;
}

/* Row Alerts - inline compatibility warnings */
.row-alert {
  flex-grow: 1;
  text-align: center;
  color: #ff4d4d;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  animation: rowPulse 2s infinite;
  white-space: nowrap;
}
.row-alert.warning {
  color: #FBBF24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}
@keyframes rowPulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-light);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.glowing-text {
  color: #34D399; /* Success color */
  text-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
  font-size: 1.5rem;
}

.summary-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   STEP 6.1 (ENHANCEMENTS)
   ============================================ */
.btn-edit {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 1rem;
}
html[dir="rtl"] .btn-edit {
  margin-left: 0;
  margin-right: 1rem;
}
.btn-edit:hover {
  color: var(--primary);
}

.status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  width: 100%;
}
.status-success {
  background: rgba(52, 211, 153, 0.1);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-error {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.performance-section {
  margin-top: 2rem;
}
.video-container {
  width: 100%;
  margin-top: 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Wattage Report Banner */
.wattage-report-banner { padding: 1.5rem; margin-top: 1.5rem; }
.wattage-meter-wrap { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.wattage-meter-track { flex: 1; height: 14px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; position: relative; }
.wattage-meter-fill { height: 100%; border-radius: 10px; transition: width 0.6s ease, background 0.4s ease; width: 0%; }
.wattage-meter-fill.status-excellent { background: linear-gradient(90deg, #34D399, #10B981); box-shadow: 0 0 12px rgba(52,211,153,0.5); }
.wattage-meter-fill.status-good { background: linear-gradient(90deg, #FBBF24, #F59E0B); box-shadow: 0 0 12px rgba(251,191,36,0.5); }
.wattage-meter-fill.status-bad { background: linear-gradient(90deg, #F87171, #EF4444); box-shadow: 0 0 12px rgba(248,113,113,0.5); }
.wattage-meter-label { font-weight: 700; font-size: 0.9rem; min-width: 50px; text-align: center; }
.wattage-meter-text { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.75rem; }
.wattage-meter-status { font-weight: 700; font-size: 1rem; margin-top: 0.3rem; }
.wattage-meter-status.status-excellent { color: #34D399; }
.wattage-meter-status.status-good { color: #FBBF24; }
.wattage-meter-status.status-bad { color: #F87171; }

/* Mobo Extras Checkboxes */
.mobo-extras-options { padding: 1.5rem; margin-top: 1.5rem; }
.mobo-checkbox-group { display: flex; flex-direction: column; gap: 0.8rem; }
.mobo-checkbox-label {
  display: flex; align-items: center; gap: 0.6rem; cursor: pointer;
  padding: 0.7rem 1rem; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  color: var(--text-light); font-size: 0.92rem; transition: all var(--transition);
}
.mobo-checkbox-label:hover { background: rgba(255,255,255,0.08); border-color: rgba(77,191,172,0.3); }
.mobo-checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--primary-color); cursor: pointer;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2.2rem;
  background: #25D366;
  color: #FFF;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
  transition: all var(--transition);
  font-family: inherit;
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(37, 211, 102, 0.6);
}

/* ============================================
   FEATURE TAGS & NOTES (STEP 4)
   ============================================ */
.feature-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.feature-tags span {
  font-size: 0.75rem;
  background: #2A2B36;
  color: var(--text-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid var(--border-light);
}

.recommendation-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #F59E0B; /* Warning/Accent color */
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ============================================
   EDIT MODAL (STEP 6.2)
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 11, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.modal-overlay.hidden {
  display: none;
}
.modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  animation: slideUp 0.3s ease-out;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition);
}
html[dir="rtl"] .modal-close {
  right: auto; left: 1.5rem;
}
.modal-close:hover {
  color: var(--primary);
}

/* ============================================
   INSTALLMENT PLAN (STEP 6.3)
   ============================================ */
.installment-text {
  text-align: left;
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}
html[dir="rtl"] .installment-text {
  justify-content: flex-start;
}
.installment-text strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================
   STORE PERKS (STEP 6.4)
   ============================================ */
.store-perks-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(52, 211, 153, 0.03);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-lg);
}
.perks-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}
.perks-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.perks-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.perks-conclusion {
  margin-top: 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: #34D399; /* Success Accent */
  text-align: center;
}

/* ============================================
   EXPERT MODE (STEP 8)
   ============================================ */
.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn-ghost {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--border-light);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* ============================================
   PERFORMANCE METRICS (STEP 8.5)
   ============================================ */
.performance-metrics {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
  font-weight: 600;
}
html[dir="ltr"] .metric-label {
  text-align: left;
}
.metric-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  justify-content: flex-end; /* Grow from right for RTL */
}
html[dir="ltr"] .metric-track {
  justify-content: flex-start; /* Grow from left for LTR */
}
.metric-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.5s ease-out;
}
.metric-fill[data-level="low"] {
  width: 33%;
  background-color: #EF4444; /* Red Warning */
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
.metric-fill[data-level="medium"] {
  width: 66%;
  background-color: #F59E0B; /* Orange */
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}
.metric-fill[data-level="high"] {
  width: 100%;
  background-color: #34D399; /* Green Success */
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* ============================================
   COMBO ANALYZER (STEP 8.6)
   ============================================ */
.combo-analyzer {
  margin-bottom: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.analyzer-body {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.analyzer-cpu {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.analyzer-cpu:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.analyzer-cpu img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}
.analyzer-cpu-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}
.analyzer-bar-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 250px;
}
.analyzer-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
  display: flex;
  justify-content: flex-end; /* RTL default */
}
html[dir="ltr"] .analyzer-track {
  justify-content: flex-start;
}
.analyzer-fill {
  height: 100%;
  width: 0%;
  border-radius: 50px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s;
}
.analyzer-fill.status-green {
  width: 100%;
  background-color: #34D399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}
.analyzer-fill.status-orange {
  width: 60%;
  background-color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}
.analyzer-fill.status-red {
  width: 30%;
  background-color: #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.analyzer-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s;
}
.analyzer-text.status-green { color: #34D399; }
.analyzer-text.status-orange { color: #F59E0B; }
.analyzer-text.status-red { color: #EF4444; }

/* ============================================
   REAL-WORLD METRICS (STEP 4.1)
   ============================================ */
.real-world-metric {
  margin-top: 0.6rem;
  padding: 0.5rem 0.8rem;
  background-color: rgba(91, 140, 255, 0.1); /* Primary accent 10% opacity */
  border-left: 2px solid var(--primary); /* LTR border */
  border-radius: var(--radius-sm);
  display: flex;
}
html[dir="rtl"] .real-world-metric {
  border-left: none;
  border-right: 2px solid var(--primary); /* RTL border */
}
.metric-tag {
  font-size: 0.82rem;
  color: #A3BFFF; /* Soft blue text */
  font-weight: 600;
  line-height: 1.4;
}

/* ============================================
   PSU ANALYZER (STEP 5.2)
   ============================================ */
.analyzer-fill.load-safe {
  background-color: #34D399; /* Green */
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}
.analyzer-fill.load-warning {
  background-color: #F59E0B; /* Orange */
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}
.analyzer-fill.load-danger {
  background-color: #EF4444; /* Red */
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.analyzer-text.load-safe { color: #34D399; }
.analyzer-text.load-warning { color: #F59E0B; }
.analyzer-text.load-danger { color: #EF4444; }

/* ============================================
   BUILDER NAVIGATION
   ============================================ */
.builder-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.2rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
}

/* ============================================
   CONFLICT ALERT BANNER
   ============================================ */
.conflict-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  animation: conflictSlideIn 0.4s ease-out;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.conflict-alert.hidden { display: none !important; }

/* WARNING variant (default) */
.conflict-alert.conflict-warning {
  background: rgba(255, 170, 43, 0.08);
  border: 1px solid rgba(255, 170, 43, 0.35);
  box-shadow: 0 0 20px rgba(255, 170, 43, 0.08);
}
.conflict-alert.conflict-warning .conflict-alert-icon { color: #ffaa2b; }
.conflict-alert.conflict-warning strong { color: #ffaa2b; }

/* CRITICAL variant */
.conflict-alert.conflict-critical {
  background: rgba(255, 77, 106, 0.08);
  border: 1px solid rgba(255, 77, 106, 0.4);
  box-shadow: 0 0 25px rgba(255, 77, 106, 0.12);
}
.conflict-alert.conflict-critical .conflict-alert-icon { color: #ff4d6a; }
.conflict-alert.conflict-critical strong { color: #ff4d6a; }

.conflict-alert-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.conflict-alert-content {
  flex: 1;
}
.conflict-alert-content strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.conflict-alert-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.conflict-alert-close {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: color var(--transition);
}
html[dir="ltr"] .conflict-alert-close {
  left: auto;
  right: 0.8rem;
}
.conflict-alert-close:hover { color: var(--text-primary); }

@keyframes conflictSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* GPU Filters */
.filters-container { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.btn-filter { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 20px; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.btn-filter:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-light); }
.btn-filter.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; box-shadow: 0 0 10px var(--primary-glow); }

/* Trending Builds Section */
.trending-section { padding: 3rem 0; margin-top: 2rem; border-top: 1px solid var(--glass-border); background: radial-gradient(circle at center, rgba(77, 191, 172, 0.05) 0%, transparent 70%); }
.trending-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.trending-card { position: relative; display: flex; flex-direction: column; padding: 1.5rem; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.trending-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(77, 191, 172, 0.15); }
.trending-badge { position: absolute; top: -12px; right: 20px; background: var(--primary-color); color: #fff; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 700; box-shadow: 0 4px 10px rgba(77, 191, 172, 0.3); z-index: 10; }
.trending-stats { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.trending-share-count { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.trending-share-count i { color: #F59E0B; }
.trending-parts { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.5rem; flex-grow: 1; }
.trending-part-item { display: flex; align-items: center; gap: 0.8rem; font-size: 0.95rem; color: var(--text-primary); }
.trending-part-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); border-radius: 8px; color: var(--primary-color); }
.btn-view-trending { width: 100%; padding: 0.8rem; border: 1px solid var(--primary-color); background: transparent; color: var(--primary-color); border-radius: var(--radius-md); font-weight: 700; cursor: pointer; transition: all 0.3s ease; }
.btn-view-trending:hover { background: var(--primary-color); color: #fff; }
