/* CONTAINER */
.container {
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* FLEX */
.flex {
  display: flex;
  gap: 20px;
}

.left, .right {
  flex: 1;
  width: 100%;
  min-width: 0; /* FIX overflow issue */
}

/* INPUT GROUP */
.input-group {
  margin-bottom: 18px;
}

label {
  font-weight: 600;
  font-size: 14px;
  display: block;
}

.value {
  float: right;
  color: #007bff;
  font-weight: 600;
}

/* SLIDER */
input[type=range] {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}

/* TOGGLE */
.toggle {
  margin-top: 10px;
  font-size: 14px;
}

/* RESULT */
.result {
  background: #f0f4ff;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
}

.result div {
  margin: 8px 0;
  font-size: 14px;
}

.highlight {
  font-size: 18px;
  font-weight: bold;
  color: #28a745;
}

/* CHART */
canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 320px;
  margin-top: 10px;
}

/* TABLE */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
  min-width: 300px;
}

table th, table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

table th {
  background: #007bff;
  color: #fff;
}

/* TABLET */
@media (max-width: 768px) {

  body {
    padding: 0;
    background: #fff;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    border-radius: 0;
    box-shadow: none;
  }

  .flex {
    flex-direction: column;
    gap: 15px;
  }

  label {
    font-size: 13px;
  }

  .value {
    font-size: 13px;
  }

  canvas {
    max-height: 250px;
  }

  table {
    font-size: 12px;
  }

  table th, table td {
    padding: 6px;
  }
}
