.enhanced-ph-viz-container {
  max-width: 1400px;
  margin: 0 auto;
}

.enhanced-ph-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.ph-scale-viz h4,
.titration-curve-viz h4 {
  color: #2e7d32;
  border-bottom: 2px solid #28a745;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

#ph-scale-canvas,
#titration-canvas {
  border: 2px solid #28a745;
  border-radius: 8px;
  background: #f8f9fa;
  width: 100%;
  height: auto;
}

.ph-scale-controls,
.titration-controls {
  margin-top: 15px;
}

#ph-slider {
  width: 100%;
  margin: 10px 0;
}

.indicator-controls {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.indicator-controls h4 {
  color: #2e7d32;
  margin-bottom: 15px;
}

.indicator-grid {
  margin-bottom: 15px;
}

.info-message {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 5px;
  padding: 15px;
  color: #0c5460;
  text-align: center;
}

.suitable-indicators .indicator-item {
  background: #d4edda;
  border-left: 4px solid;
  padding: 10px;
  margin: 5px 0;
  animation: fadeIn 0.3s ease;
}

.no-indicators {
  background: #fff3cd;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #ffeaa7;
  color: #856404;
  animation: fadeIn 0.3s ease;
}

.substance-examples {
  margin-top: 20px;
}

.substance-examples h5 {
  color: #2e7d32;
  margin-bottom: 10px;
}

.example-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ph-example {
  font-size: 12px;
  padding: 6px 12px;
  background: #fff;
  color: #28a745;
  border: 1px solid #28a745;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.ph-example:hover {
  background: #28a745;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

#titration-type {
  margin: 10px 0;
}

.titration-controls > div {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#equivalence-point {
  color: #28a745;
  font-weight: bold;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .enhanced-ph-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .example-buttons {
    justify-content: center;
  }
  
  .titration-controls > div {
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .example-buttons {
    gap: 5px;
  }
  
  .ph-example {
    font-size: 11px;
    padding: 5px 8px;
  }
  
  #titration-type {
    margin-bottom: 10px;
  }
  
  .titration-controls > div {
    text-align: center;
  }
  
  .titration-controls > div > div {
    margin-left: 10px;
  }
}

@media (prefers-color-scheme: dark) {
  .indicator-controls {
    background: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
  }
  
  .indicator-controls h4 {
    color: #81c784;
  }
  
  .info-message {
    background: #1e3a8a;
    border-color: #004085;
    color: #b8daff;
  }
  
  .ph-example {
    background: #2c2c2c;
    color: #81c784;
    border-color: #81c784;
  }
  
  .ph-example:hover {
    background: #81c784;
    color: #2c2c2c;
  }
  
  .suitable-indicators .indicator-item {
    background: #1e4620;
    color: #a8dabc;
  }
  
  .no-indicators {
    background: #4b3937;
    border-color: #6c757d;
    color: #f8d7da;
  }
  
  #ph-scale-canvas,
  #titration-canvas {
    background: #2c2c2c;
    border-color: #444;
  }
  
  #titration-type {
    background: #3c3c3c;
    border-color: #555;
    color: #e0e0e0;
  }
}

.ph-example:focus {
  outline: 2px solid #28a745;
  outline-offset: 2px;
}

#ph-slider:focus,
#titration-type:focus {
  outline: 2px solid #28a745;
  outline-offset: 2px;
}

.suitable-indicators:focus-within,
.no-indicators:focus-within {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.btn:focus {
  outline: 2px solid #28a745;
  outline-offset: 2px;
}

.form-control:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}