:root {
  --bg-color: #2d2d30;
  --panel-bg: #3e3e42;
  --title-bar-bg: #007acc;
  --border-color: #555555;
  --text-color: #ffffff;
  --hover-color: #505050;
  --accent-color: #0078d7;
  --uncertainty-color: #ff6b6b;
}

body {
  background-color: var(--bg-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  padding: 20px;
  direction: rtl;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
}

header {
    background-color: var(--accent-color);
  margin-bottom: 20px;
  text-align: center;
}

h1 {
    background-color: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
}

.lead {
  color: #cccccc;
}

.card {
  position:sticky;
  top:0;
  background: #007acc;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.controls {
  padding: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: rgb(0,255,0);
  color: white;
}

.btn-secondary {
  background-color: #4d4d4d;
  color: #ffffff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.status {
  margin-right: auto;
  color: #cccccc;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.feature-panel {
  background: var(--panel-bg);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  height: auto;
}

.feature-panel.collapsed {
  height: auto;
}

.panel-header {
  background-color: var(--title-bar-bg);
  color: white;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.panel-title {
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-type {
  font-size: 12px;
  color: #cccccc;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
}

.distribution-type {
  font-size: 11px;
  color: #ffa500;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
}

.panel-actions {
  display: flex;
  gap: 5px;
}

.toggle-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.panel-body {
  padding: 15px;
  transition: all 0.3s ease;
}

.panel-value {
  margin-bottom: 15px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-value span {
  font-weight: 600;
  color: #4ec9b0;
}

.panel-value.predicted span {
  color: #4ec9b0;
}

.value-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.value-input {
  width: 80px;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #2d2d30;
  color: white;
}

.panel-chart {
  margin-bottom: 15px;
  position: relative;
  height: 120px;
  transition: all 0.3s ease;
}

.feature-panel.collapsed .panel-chart {
  display: none;
}

.panel-slider {
  width: 100%;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.feature-panel.collapsed .panel-slider {
  display: none;
}

.panel-select {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #2d2d30;
  color: white;
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.uncertainty {
  font-size: 12px;
  color: var(--uncertainty-color);
  display: flex;
  align-items: center;
}

.chart-toggle-btn {
  background-color: #4d4d4d;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.chart-toggle-btn:hover {
  background-color: #5d5d5d;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--panel-bg);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--title-bar-bg);
  color: white;
  margin: -20px -20px 20px -20px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 20px;
}

.modal-body {
  padding: 20px 0;
}

.modal-chart-container {
  height: 300px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.table th {
  background-color: #2d2d30;
}

.summary-panel {
  margin-top: 20px;
}

.summary-chart-container {
  height: 200px;
  margin-bottom: 15px;
}

.predicted-badge {
  background-color: #28a745;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 8px;
}

.data-info {
  font-size: 11px;
  color: #aaa;
  margin-top: 5px;
}