/* Elektrochemie auf Teilchenebene Styles */

.elektrochemie-teilchenebene-container {
  padding: 20px;
}

.cell-visualization,
.electrolysis-visualization,
.electron-transitions,
.nernst-visualization {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.canvas-container {
  text-align: center;
  margin: 20px 0;
  overflow-x: auto;
}

.canvas-container canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: white;
}

.cell-controls,
.electrolysis-controls,
.transition-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.voltage-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f8ff;
  padding: 10px 20px;
  border-radius: 6px;
}

.voltage-control label {
  font-weight: bold;
  color: #2c3e50;
}

.voltage-control input[type="range"] {
  width: 150px;
}

.voltage-control span {
  font-weight: bold;
  color: #0984e3;
  min-width: 50px;
}

.cell-parameters,
.electrolysis-reactions,
.transition-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.half-reactions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 15px 0;
}

.anode,
.cathode,
.anode-anode {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.anode {
  border-left: 4px solid #e74c3c;
}

.cathode {
  border-right: 4px solid #3498db;
}

.electrolysis-cathode {
  border-left: 4px solid #3498db;
}

.arrow {
  font-size: 2rem;
  color: #2c3e50;
}

.cell-potential {
  margin-top: 20px;
  padding: 15px;
  background: #e3f2fd;
  border-left: 4px solid #0984e3;
  border-radius: 4px;
}

.cell-potential .label {
  font-weight: 600;
  color: #495057;
  display: block;
  margin: 5px 0;
}

.cell-potential .value {
  font-size: 1.1rem;
  color: #2c3e50;
}

.cell-potential .highlight {
  color: #e74c3c;
  font-weight: bold;
}

.formula-text {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2c3e50;
  margin: 10px 0;
  font-family: 'Times New Roman', serif;
  text-align: center;
}

.formula-display {
  background: #f0f8ff;
  border-left: 4px solid #0984e3;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

.nernst-calculator {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  font-weight: 600;
  color: #34495e;
  display: block;
  margin-bottom: 5px;
}

.form-group .help-block {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin: 5px 0;
}

.result-panel {
  background: #f8f9fa;
  border: 1px solid #e3f2fd;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  animation: fadeIn 0.3s ease-in;
}

.result-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #2c3e50;
  margin: 15px 0;
}

.result-value .label {
  font-weight: normal;
  color: #666;
}

.nernst-calculation,
.nernst-interpretation {
  margin-top: 15px;
}

.nernst-calculation .step {
  display: inline-block;
  font-weight: bold;
  color: #0984e3;
}

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

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.example-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.example-card h4 {
  color: #0984e3;
  margin-bottom: 10px;
}

.cell-legend {
  margin-top: 20px;
  padding: 15px;
  background: #fff9e6;
  border-left: 4px solid #f39c12;
  border-radius: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.legend-mark {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.legend-mark.electron {
  background: #f1c40f;
}

.legend-mark.cation {
  background: #9b59b6;
}

.legend-mark.anion {
  background: #2ecc71;
}

.info-card {
  background: white;
  border-left: 4px solid #0984e3;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card h3 {
  color: #0984e3;
  margin-bottom: 15px;
}

.info-card h4 {
  color: #2c3e50;
  margin: 10px 0;
}

.info-card ul {
  padding-left: 20px;
  margin: 10px 0;
}

.info-card li {
  margin: 5px 0;
}

.educational-content {
  margin-top: 30px;
}

.table-bordered {
  border: 1px solid #dee2e6;
  width: 100%;
  border-collapse: collapse;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
  padding: 12px;
  text-align: center;
}

.table-bordered th {
  background: #f8f9fa;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cell-visualization,
  .electrolysis-visualization,
  .electron-transitions,
  .nernst-visualization {
    padding: 15px;
  }
  
  .half-reactions {
    flex-direction: column;
  }
  
  .example-grid {
    grid-template-columns: 1fr;
  }
  
  .result-value {
    font-size: 1.4rem;
  }
}