/* ===== CamarVolt Calculadora de Resistores ===== */

/* RESET GERAL */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0a0a0a;
  color: #f5f5f5;
  font-family: "Inter", sans-serif;
}

/* ===== SECTION WRAPPER ===== */
section.band {
  width: 100%;
  padding: 60px 20px;
  min-height: calc(100vh - 80px);
}

/* ===== GRID CONTAINER ===== */
.container.calc-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* ===== PAINÉIS ===== */
.panel {
  background: linear-gradient(180deg, #0f1013, #0a0b0d);
  border: 1px solid #222;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  height: fit-content;
}

.title-lg {
  margin: 0 0 10px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f5f5f5;
}

p.muted {
  color: #aaa;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.legend.muted {
  margin-top: 20px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #777;
}

/* ===== CONTROLES ===== */
.control {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.control label {
  min-width: 140px;
  color: #aaa;
  font-size: 0.92rem;
}

.control select {
  flex: 1;
  background: #14161b;
  color: #f5f5f5;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.92rem;
}

/* ===== PICKERS ===== */
.pickers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.picker-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.picker-row label {
  min-width: 140px;
  color: #aaa;
  font-size: 0.92rem;
}

.picker-row select {
  flex: 1;
  background: #14161b;
  color: #f5f5f5;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.92rem;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, .12);
  flex-shrink: 0;
}

/* ===== BOTÕES ===== */
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-gold {
  flex: 1;
  background: linear-gradient(90deg, #f5c542, #f9d976);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.92rem;
}

.btn-gold:hover {
  box-shadow: 0 0 18px rgba(245, 197, 66, .35);
  transform: translateY(-1px);
}

.btn-ghost {
  flex: 1;
  background: transparent;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 11px 18px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.92rem;
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: #f5c542;
  color: #f5c542;
  transform: translateY(-1px);
}

/* ===== PAINEL DIREITO ===== */
main.panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== RESISTOR WRAP ===== */
.resistor-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.resistor {
  width: 100%;
  max-width: 480px;
  height: 110px;
  position: relative;
  background: linear-gradient(180deg, #6d4a22 0%, #8a5a2b 50%, #6d4a22 100%);
  border-radius: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 10px rgba(255, 255, 255, .06),
              0 14px 28px rgba(0, 0, 0, .5);
  margin: 0 auto;
}

.lead {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 5px;
  background: linear-gradient(90deg, #cfcfcf, #9f9f9f);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}

.lead.left { 
  left: -55px; 
}

.lead.right { 
  right: -55px; 
}

.bands-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.band {
  width: 20px;
  height: 74px;
  border-radius: 3px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45);
}

.band.small {
  height: 52px;
  width: 12px;
}

/* ===== READOUTS ===== */
.readouts {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.readouts > div {
  flex: 1;
}

.readouts .label {
  color: #888;
  font-size: 0.82rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.read-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f5c542;
  margin-bottom: 6px;
  line-height: 1.2;
}

.readouts .small {
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
  line-height: 1.4;
}

.readouts .right {
  text-align: right;
}

.copy-row {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.copy-row .btn-ghost {
  flex: 0 0 auto;
  padding: 9px 16px;
  font-size: 0.88rem;
}

/* ===== RESULT CARDS ===== */
.result-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.metric {
  background: #0c0d10;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 18px;
}

.metric h3 {
  margin: 0 0 10px 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric .val {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e0e0e0;
}

.metric pre {
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #bbb;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .container.calc-grid {
    grid-template-columns: 380px 1fr;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .container.calc-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    gap: 32px;
  }
  
  .resistor {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  section.band {
    padding: 40px 16px;
  }

  .panel {
    padding: 22px;
  }

  .title-lg {
    font-size: 1.5rem;
  }

  .picker-row,
  .control {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .picker-row label,
  .control label {
    min-width: auto;
  }

  .resistor {
    height: 90px;
    max-width: 100%;
  }

  .band {
    width: 16px;
    height: 60px;
  }

  .band.small {
    height: 42px;
    width: 10px;
  }

  .bands-preview {
    gap: 11px;
  }

  .readouts {
    flex-direction: column;
    gap: 20px;
  }

  .readouts .right {
    text-align: left;
  }

  .actions {
    flex-direction: column;
  }

  .copy-row .btn-ghost {
    width: 100%;
  }
}