:root {
  /* Honeycomb Main Colors */
  --hc-fog: #f5f7fa;
  --hc-pacific: #0177cc;
  --hc-slate: #25303e;
  --hc-denim: #02487b;
  --hc-honey: #ffbc03;
  --hc-tango: #f16907;
  --hc-lime: #63ba01;
  --hc-indigo: #542a8f;

  /* Honeycomb Gray Series */
  --hc-gray100: #ebeff5;
  --hc-gray200: #dee3ec;
  --hc-gray300: #c8d1df;
  --hc-gray400: #b0bac9;
  --hc-gray500: #8f99a8;
  --hc-gray600: #717a89;
  --hc-gray700: #59606d;
  --hc-gray800: #444a53;
  --hc-gray900: #33383f;

  /* Honeycomb Sky Series */
  --hc-sky50: #e3f2fc;
  --hc-sky100: #b9def8;
  --hc-sky200: #8dcaf5;

  /* Honeycomb Red Series */
  --hc-red500: #e65b53;
  --hc-red600: #d75350;

  /* Honeycomb Green Series */
  --hc-green500: #73ca0e;
  --hc-green600: #63ba01;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--hc-fog);
}

.container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
  color: var(--hc-slate);
  text-align: center;
  margin-bottom: 30px;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background-color: var(--hc-gray100);
  border-radius: 8px;
}

.control-group {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--hc-gray700);
}

.input-parameter-title {
  color: var(--hc-indigo);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: var(--hc-gray300);
  border-radius: 3px;
  outline: none;
}

select {
  padding: 8px;
  border: 1px solid var(--hc-gray300);
  border-radius: 4px;
  background: white;
  font-size: 14px;
}

.value-display {
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  color: var(--hc-pacific);
  min-width: 100px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: white;
  border: 2px solid var(--hc-gray200);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.metric-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--hc-slate);
  margin-bottom: 15px;
}

.metric-values {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.true-value {
  color: var(--hc-lime);
  font-weight: bold;
}

.sampled-value {
  color: var(--hc-red500);
  font-weight: bold;
}

.confidence-interval {
  font-size: 12px;
  color: var(--hc-gray600);
  margin-top: 5px;
}

.error-display {
  font-size: 14px;
  color: var(--hc-gray600);
  margin-top: 10px;
}

.intro-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.purpose-card,
.demo-card,
.disclaimer-card {
  background: white;
  border: 2px solid var(--hc-gray200);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.purpose-card:hover,
.demo-card:hover,
.disclaimer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.purpose-card {
  border-left: 4px solid var(--hc-pacific);
  background: linear-gradient(135deg, var(--hc-sky50) 0%, white 100%);
}

.demo-card {
  border-left: 4px solid var(--hc-lime);
  background: linear-gradient(135deg, #f0f9e8 0%, white 100%);
}

.disclaimer-card {
  border-left: 4px solid var(--hc-honey);
  background: linear-gradient(135deg, #fffbf0 0%, white 100%);
}

.card-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 4px;
}

.card-content {
  flex: 1;
}

.card-content h3 {
  margin: 0 0 12px 0;
  color: var(--hc-slate);
  font-size: 18px;
  font-weight: 600;
}

.card-content p {
  margin: 0 0 12px 0;
  color: var(--hc-gray700);
  line-height: 1.6;
  font-size: 14px;
}

.card-content p:last-child {
  margin-bottom: 0;
}

.card-content strong {
  color: var(--hc-pacific);
  font-weight: 600;
}

@media (min-width: 768px) {
  .intro-section {
    grid-template-columns: 1fr 1fr;
  }

  .purpose-card {
    grid-column: 1 / -1;
  }
}

.info-panel {
  background: var(--hc-sky50);
  border-left: 4px solid var(--hc-pacific);
  padding: 15px;
  margin-bottom: 20px;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background-color: var(--hc-gray100);
  border-radius: 8px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--hc-gray600);
  margin-bottom: 5px;
}

.stat-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--hc-slate);
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.runs-display {
  font-size: 12px;
  color: var(--hc-gray600);
  margin-top: 10px;
}

.distribution-chart {
  background: white;
  border: 2px solid var(--hc-gray200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.distribution-chart h3 {
  color: var(--hc-slate);
  margin-bottom: 20px;
  font-size: 18px;
}

.p99-scatter-chart {
  background: white;
  border: 2px solid var(--hc-gray200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.p99-scatter-chart h3 {
  color: var(--hc-slate);
  margin-bottom: 20px;
  font-size: 18px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-controls label {
  font-size: 14px;
  color: var(--hc-gray600);
  margin: 0;
}

.chart-controls select {
  padding: 4px 8px;
  border: 1px solid var(--hc-gray300);
  border-radius: 4px;
  background: white;
  font-size: 12px;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.distribution-chart canvas {
  max-width: 100%;
  max-height: 100%;
}

.explanation {
  position: relative;
  background: white;
  border: 2px solid var(--hc-gray200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  overflow: hidden;
  text-align: center;
}

.describe-sampled-events {
  color: var(--hc-red500);
}

.describe-unsampled-events {
  color: var(--hc-lime);
}

.explanation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--hc-sky50) 0%, var(--hc-sky100) 100%);
  clip-path: polygon(0% 0%, 100% 0%, var(--bottom-right-x) 100%, var(--bottom-left-x) 100%);
  z-index: 1;
  transition: clip-path 0.3s ease;
}

.explanation p {
  position: relative;
  z-index: 2;
  margin: 8px 0;
  color: var(--hc-slate);
  font-size: 14px;
  line-height: 1.4;
}

.explanation p:last-child {
  margin-top: 15px;
  font-style: italic;
  color: var(--hc-gray600);
}
