/* ── Car Tint Percentage Calculator ─────────────────────────────── */

.ctc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 920px;
  margin: 2rem auto;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  color: #1e293b;
  box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────────── */
.ctc__header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 80%, #475569 100%);
  padding: clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 4vw, 2rem);
  position: relative;
  overflow: hidden;
}
.ctc__header::before {
  content: '🚘';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.07;
  pointer-events: none;
}
.ctc__header h2 {
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}
.ctc__header p { font-size: 0.9rem; color: #94a3b8; margin: 0; }

/* ── Main layout ─────────────────────────────────────────────────── */
.ctc__main {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* ── LEFT: Controls ──────────────────────────────────────────────── */
.ctc__controls {
  width: 280px;
  min-width: 260px;
  padding: 1.5rem;
  background: #fff;
  border-right: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* VLT big number */
.ctc__vlt-display {
  text-align: center;
}
.ctc__vlt-num {
  font-size: 4.5rem;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1;
  letter-spacing: -2px;
  display: inline-block;
}
.ctc__vlt-unit {
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  vertical-align: bottom;
  margin-left: 4px;
  margin-bottom: 10px;
  display: inline-block;
}

/* Darkness badge */
.ctc__darkness-badge {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: #1e293b;
  color: #f59e0b;
  border-radius: 20px;
  padding: 4px 14px;
  display: inline-block;
  margin: 0 auto;
  width: fit-content;
  align-self: center;
}

/* Slider */
.ctc__slider-section { display: flex; flex-direction: column; gap: 4px; }
.ctc__slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctc__slider-cap {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  min-width: 28px;
}
.ctc__slider-cap:last-child { text-align: right; }

.ctc__slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #0f172a 0%, #1e293b 20%, #f59e0b 60%, #fef3c7 100%);
  outline: none;
  cursor: pointer;
}
.ctc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.1s;
}
.ctc__slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.ctc__slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
}

.ctc__slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}
.ctc__slider-ticks span {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}

/* Number input */
.ctc__input-row { display: flex; flex-direction: column; gap: 4px; }
.ctc__input-label { font-size: 0.75rem; font-weight: 600; color: #64748b; }
.ctc__input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.ctc__input-wrap:focus-within { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.ctc__num-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}
.ctc__input-unit {
  background: #f1f5f9;
  color: #64748b;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Presets */
.ctc__preset-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #94a3b8;
}
.ctc__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ctc__preset {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ctc__preset:hover { border-color: #f59e0b; color: #d97706; background: #fffbeb; }
.ctc__preset--active { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ctc__preset--active:hover { background: #d97706; border-color: #d97706; color: #fff; }

/* Stats */
.ctc__stats {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ctc__stat { display: flex; justify-content: space-between; align-items: center; }
.ctc__stat-label { font-size: 0.75rem; color: #64748b; font-weight: 500; }
.ctc__stat-val { font-size: 0.85rem; font-weight: 800; color: #1e293b; }

/* ── RIGHT: Preview ──────────────────────────────────────────────── */
.ctc__preview {
  flex: 1;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem;
  gap: 1rem;
}
.ctc__preview-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #475569;
  align-self: flex-start;
}

.ctc__car-wrap {
  width: 100%;
  max-width: 560px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}
.ctc__car-svg { width: 100%; height: auto; display: block; }

.ctc__preview-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: #94a3b8;
}
.ctc__preview-badge span:first-child { font-weight: 800; color: #f59e0b; }
.ctc__badge-sep { color: #475569; }

/* ── Reference Table ─────────────────────────────────────────────── */
.ctc__table-section {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #fff;
  border-top: 1.5px solid #e2e8f0;
}
.ctc__table-title {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.85rem;
}
.ctc__table-wrap { overflow-x: auto; }
.ctc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.ctc__table thead tr { background: linear-gradient(90deg, #0f172a, #334155); }
.ctc__table thead th {
  color: #fff;
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.ctc__table tbody tr:nth-child(even) { background: #f8fafc; }
.ctc__table tbody tr:hover { background: #fef3c7; }
.ctc__table tbody td {
  padding: 0.5rem 0.9rem;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.ctc__table tbody td:first-child { font-size: 1rem; color: #f59e0b; }

/* ── Note ────────────────────────────────────────────────────────── */
.ctc__note {
  background: #fffbeb;
  border-top: 1.5px solid #fde68a;
  padding: 0.85rem clamp(1rem, 3vw, 1.5rem);
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ctc__main { flex-direction: column; }
  .ctc__controls {
    width: 100%;
    border-right: none;
    border-bottom: 1.5px solid #e2e8f0;
  }
  .ctc__preview { padding: 1.25rem; }
  .ctc__vlt-num { font-size: 3.5rem; }
}
