:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --alert-color: #e74c3c;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --border-color: #ddd;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --hover-color: #f1f1f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2, h3, h4 {
  margin-bottom: 15px;
  color: var(--dark-color);
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  transition: all 0.3s;
}

.tab-btn:hover {
  background-color: var(--hover-color);
}

.tab-btn.active {
  font-weight: bold;
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.tab-content {
  display: none;
  padding: 20px 0;
}

.tab-content.active {
  display: block;
}

/* Model Grid */
.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.graph-container {
  background: var(--bg-color);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.graph-container.wide {
  grid-column: span 2;
}

.graph {
  width: 100%;
  height: 300px;
}

/* Controls */
.controls-panel {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.control-group {
  margin-bottom: 15px;
}

.slider {
  width: 100%;
  margin: 10px 0;
  height: 10px;
  -webkit-appearance: none;
  background: #ddd;
  outline: none;
  border-radius: 5px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

/* Stats Panel */
.stats-panel {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-item {
  padding: 10px;
  border-radius: 4px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--dark-color);
}

/* Analysis Tab */
.analysis-container {
  padding: 20px;
}

.optimization {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.optimal-results {
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 4px;
  border-left: 4px solid var(--secondary-color);
}

/* Parameters Tab */
.param-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.param-group {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.param-control {
  margin-bottom: 15px;
}

.param-control input[type="number"] {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.param-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Buttons */
.action-btn {
  padding: 10px 20px;
  background: #eee;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn:hover {
  background: #ddd;
}

.action-btn.primary {
  background: var(--primary-color);
  color: white;
}

.action-btn.primary:hover {
  background: #2980b9;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .model-grid, .controls {
    grid-template-columns: 1fr;
  }
  
  .param-grid {
    grid-template-columns: 1fr;
  }
}