/* Polynomial Regression - Full Screen HUD Design */

.polynomial-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 80px);
  overflow: hidden;
  background: #0a0a0a;
  position: relative;
}

/* HUD Grid Background */
.polynomial-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(74, 158, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 158, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Control Sidebar */
.control-sidebar {
  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid rgba(74, 158, 255, 0.2);
  padding: 24px;
  overflow-y: auto;
  z-index: 1;
  position: relative;
  backdrop-filter: blur(10px);
}

.panel-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(74, 158, 255, 0.1);
}

.panel-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #00ffff;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  font-family: 'Roboto Mono', monospace;
}

.panel-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

.control-group {
  margin-bottom: 24px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.label-value {
  color: #00ffff;
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  font-size: 13px;
}

/* HUD Slider */
.hud-slider {
  width: 100%;
  height: 4px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.hud-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.3);
}

.hud-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.3);
}

.hud-slider:active::-webkit-slider-thumb {
  background: #00cccc;
}

.hud-slider:active::-moz-range-thumb {
  background: #00cccc;
}

/* HUD Button */
.hud-button {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #00ffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Roboto', sans-serif;
}

.hud-button:hover {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.5);
}

.hud-button:active {
  background: rgba(0, 255, 255, 0.15);
}

/* HUD Metric Display */
.hud-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.metric-value {
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #00ffff;
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px 0;
  font-weight: 600;
}

.equation-display {
  padding: 16px;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-details {
  margin-top: 16px;
}

.hud-details summary {
  cursor: pointer;
  padding: 10px 12px;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #00ffff;
  user-select: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

.hud-details summary:hover {
  background: rgba(0, 255, 255, 0.1);
}

.hud-details[open] summary {
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.hud-output {
  width: 100%;
  min-height: 150px;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-top: none;
  padding: 12px;
  color: rgba(255, 255, 255, 0.8);
  resize: vertical;
  outline: none;
}

/* Canvas Viewport */
.canvas-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
  z-index: 1;
}

.canvas-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#canvas {
  border: 1px solid rgba(0, 255, 255, 0.2);
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.1);
}

.canvas-overlay {
  position: absolute;
  top: 24px;
  left: 24px;
  pointer-events: none;
  z-index: 10;
}

.hud-instruction {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(0, 255, 255, 0.5);
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
  .polynomial-main {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 768px) {
  .polynomial-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: calc(100vh - 80px);
  }
  
  .control-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    max-height: 400px;
    overflow-y: auto;
  }
  
  .canvas-viewport {
    min-height: 500px;
  }
}

/* Scrollbar Styling */
.control-sidebar::-webkit-scrollbar {
  width: 6px;
}

.control-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.control-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
  border-radius: 3px;
}

.control-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}
