/* ====================================
   SHARED STYLES FOR SAMPLING METHODS
   ==================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ====================================
   JEKYLL-COMPATIBLE HEADER NAVIGATION
   ==================================== */
.site-header {
  border-top: 5px solid #424242;
  border-bottom: 1px solid #e8e8e8;
  min-height: 55.95px;
  position: relative;
  background-color: white;
}

.site-header .wrapper {
  max-width: calc(1200px - (30px * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px;
}

.site-title {
  font-size: 26px;
  font-weight: 300;
  line-height: 54px;
  letter-spacing: -1px;
  margin-bottom: 0;
  float: left;
  text-decoration: none;
  color: #424242;
}

.site-title:hover {
  text-decoration: none;
  color: #111;
}

.site-nav {
  float: right;
  line-height: 54px;
}

.site-nav .nav-trigger {
  display: none;
}

.site-nav .menu-icon {
  display: none;
}

.site-nav .page-link {
  color: #111;
  line-height: 1.5;
  text-decoration: none;
  margin-left: 20px;
}

.site-nav .page-link:hover {
  text-decoration: underline;
}

.site-nav .page-link.active {
  font-weight: 600;
}

@media screen and (max-width: 600px) {
  .site-nav {
    position: absolute;
    top: 9px;
    right: 15px;
    background-color: white;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    text-align: right;
  }

  .site-nav label[for="nav-trigger"] {
    display: block;
    float: right;
    width: 36px;
    height: 36px;
    z-index: 2;
    cursor: pointer;
  }

  .site-nav .menu-icon {
    display: block;
    float: right;
    width: 36px;
    height: 26px;
    line-height: 0;
    padding-top: 10px;
    text-align: center;
  }

  .site-nav .menu-icon > svg {
    fill: #424242;
  }

  .site-nav input ~ .trigger {
    clear: both;
    display: none;
  }

  .site-nav input:checked ~ .trigger {
    display: block;
    padding-bottom: 5px;
  }

  .site-nav .page-link {
    display: block;
    padding: 5px 10px;
    margin-left: 20px;
  }
}

/* ====================================
   PAGE STRUCTURE
   ==================================== */
.page-content {
  padding: 0;
}

.wrapper {
  max-width: calc(1200px - (30px * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px;
}

.page-heading {
  font-size: 2rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #1a1a1a;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ====================================
   SECTIONS
   ==================================== */
.section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: #1a1a1a;
  border-bottom: 2px solid #111827;
  padding-bottom: 0.5rem;
}


.algorithm-box {
      background: #f7fafc;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      padding: 1.5rem;
      margin-top: 1rem;
      overflow-x: auto;
    }

.algorithm-box ol {
      margin: 0.5rem 0 0 0;
      padding-left: 1.5rem;
    }

.algorithm-box li {
      margin: 0.5rem 0;
      font-family: 'Courier New', monospace;
      font-size: 0.95rem;
    }

/* ====================================
   CONTROLS
   ==================================== */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.control-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-value {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
}

input[type=range] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111827;
  cursor: pointer;
  transition: all 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
  background: #374151;
  transform: scale(1.1);
}

input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111827;
  cursor: pointer;
  border: none;
}

select {
  padding: 0.5rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

/* ====================================
   BUTTONS
   ==================================== */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

button {
  background: #111827;
  color: white;
  border: none;
  padding: 0.6rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: #374151;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background: #4b5563;
}

button.secondary:hover {
  background: #6b7280;
}

button.tertiary {
  background: #9ca3af;
}

button.tertiary:hover {
  background: #6b7280;
}

/* ====================================
   VISUALIZATIONS
   ==================================== */
.visualization-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.canvas-container {
  position: relative;
}

.canvas-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #2d3748;
}

canvas {
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 4px;
  display: block;
}

.replica-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* Change to 2 columns instead of 3 */
  gap: 1rem;
  margin-top: 1rem;
}

.replica-canvas-container {
  width: 100%;  /* Add this */
}

.replica-canvas-container canvas {
  width: 100%;
  height: auto;
}

/* ====================================
   STATISTICS
   ==================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.step-info-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #0c4a6e;
}
