/* ======================================================
   Black Trap Substrate Configurator
   Frontend Design
   ====================================================== */

#btsc-app,
.btsc-root-container {
  width: 100%;
  color: #C4C7C8;
  font-family: inherit;
}

/* Loading / Error */
.btsc-loader,
.btsc-error {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.14);
  color: #C4C7C8;
  padding: 28px;
  font-size: 14px;
  letter-spacing: 0.6px;
}

.btsc-error {
  color: #ffb4b4;
  border-color: rgba(255,120,120,0.35);
}

/* Main Shell */
.btsc-terminal {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.14);
  color: #C4C7C8;
  padding: 34px;
  box-shadow: none;
}

.btsc-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 34px;
}

/* Panels */
.btsc-matrix-sector,
.btsc-analysis-sector {
  background: #0F0F0F;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 28px;
}

.btsc-lab-title {
  margin: 0 0 28px 0;
  color: #FFFFFF;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 400;
}

/* Slider Rows */
.btsc-slider-container {
  display: grid;
  gap: 22px;
}

.btsc-slider-row {
  padding: 0 0 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.btsc-slider-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.btsc-label-group {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 12px;
}

.btsc-material-name {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.btsc-material-pct {
  color: #A9CFB8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Range Input */
.btsc-range {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.14);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.btsc-range::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255,255,255,0.14);
}

.btsc-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  background: #A9CFB8;
  border: 2px solid #0A0A0A;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
}

.btsc-range::-moz-range-track {
  height: 4px;
  background: rgba(255,255,255,0.14);
}

.btsc-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #A9CFB8;
  border: 2px solid #0A0A0A;
  border-radius: 50%;
}

/* Integrity */
.btsc-integrity-check {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: #8D9492;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-align: right;
}

#btsc-total-display {
  color: #A9CFB8;
}

/* Analysis */
.btsc-analysis-sector {
  display: grid;
  gap: 22px;
}

.btsc-visualizer {
  min-height: 260px;
  background: #111111;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 18px;
}

#btsc-radar-canvas {
  width: 100% !important;
  max-height: 280px;
}

.btsc-output-box {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 24px;
}

.btsc-price-tag {
  color: #A9CFB8;
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  font-weight: 400;
  margin-bottom: 10px;
}

.btsc-weight-tag {
  color: #8D9492;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

/* Expert Feedback */
.btsc-expert-feedback {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.btsc-note {
  border-left: 2px solid #A9CFB8;
  padding-left: 14px;
}

.btsc-note strong {
  display: block;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.btsc-note p {
  margin: 0;
  color: #C4C7C8;
  font-size: 13px;
  line-height: 1.55;
}

/* Action Zone */
.btsc-action-zone {
  display: grid;
  gap: 12px;
}

.btsc-select {
  width: 100%;
  min-height: 48px;
  background: #0F0F0F;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0;
  color: #FFFFFF;
  padding: 0 14px;
  font-size: 13px;
  box-shadow: none;
}

.btsc-select:focus {
  border-color: #A9CFB8;
  outline: none;
}

.btsc-btn-primary {
  width: 100%;
  min-height: 52px;
  background: #A9CFB8;
  color: #0A0A0A;
  border: 1px solid #A9CFB8;
  border-radius: 0;
  padding: 0 24px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  box-shadow: none;
}

.btsc-btn-primary:hover {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0A0A0A;
}

.btsc-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Legacy Classes */
.btsc-layout,
.btsc-report-box {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 0;
  color: #C4C7C8;
}

.btsc-title {
  color: #A9CFB8;
  letter-spacing: 2px;
}

.btsc-price-val {
  color: #A9CFB8;
}

.btsc-expert-note {
  border-left-color: #A9CFB8;
}

.btsc-expert-note strong {
  color: #A9CFB8;
}

.btsc-expert-note p {
  color: #C4C7C8;
}

/* Mobile */
@media (max-width: 1024px) {
  .btsc-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .btsc-terminal {
    padding: 20px;
  }

  .btsc-matrix-sector,
  .btsc-analysis-sector {
    padding: 20px;
  }

  .btsc-lab-title {
    font-size: 28px;
  }

  .btsc-price-tag {
    font-size: 32px;
  }
}