/* HFC Schematic Styles */
.hfc-container {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  border: 2px solid #00ff41;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.hfc-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hfc-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
  z-index: 10;
  position: relative;
}

.control-btn {
  background: linear-gradient(45deg, #2c5530, #3e7b3e);
  border: 2px solid #00ff41;
  color: #00ff41;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 12px;
}

.control-btn:hover {
  background: linear-gradient(45deg, #3e7b3e, #4a8f4a);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.legend {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.legend-item .fiber-line {
  width: 30px;
  height: 4px;
  background: #00ff41;
  border-radius: 2px;
  display: block;
}

.legend-item .coax-line {
  width: 30px;
  height: 6px;
  background: #ffa500;
  border-radius: 3px;
  display: block;
}

.legend-item .power-line {
  width: 30px;
  height: 3px;
  background: #ff0000;
  border-radius: 1px;
  display: block;
  border: 1px dashed #ff0000;
}

.hfc-schematic {
  width: 100%;
  height: auto;
  min-height: 500px;
  background: rgba(15, 52, 96, 0.2);
  border: 1px solid #0f3460;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.component {
  transition: all 0.3s ease;
  cursor: pointer;
}

.component:hover {
  filter: drop-shadow(0 0 10px #00ff41);
}

.component.selected {
  filter: drop-shadow(0 0 15px #ff6b35);
}

.component text {
  pointer-events: none;
  user-select: none;
}

/* Cable animations */
.fiber-cable {
  transition: all 0.3s ease;
}

.coax-cable {
  transition: all 0.3s ease;
}

.power-line {
  transition: all 0.3s ease;
}

.signal-pulse {
  stroke-dasharray: 10,5;
  animation: signalFlow 3s infinite linear;
}

@keyframes signalFlow {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

/* Component Information Panel */
.component-info {
  background: linear-gradient(135deg, #1a1a2e, #2d2d4a);
  border: 2px solid #00ff41;
  border-radius: 8px;
  padding: 20px;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  position: relative;
  overflow: hidden;
}

.component-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00ff41, #ff6b35, #00ff41);
  animation: scanline 2s infinite linear;
}

@keyframes scanline {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.component-info h4 {
  color: #00ff41;
  margin: 0 0 15px 0;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.component-details p {
  margin: 10px 0;
  line-height: 1.6;
}

.component-details strong {
  color: #ff6b35;
}

.component-details ul {
  margin: 10px 0;
  padding-left: 20px;
}

.component-details li {
  margin: 5px 0;
  color: #cccccc;
}

.component-details li::marker {
  color: #00ff41;
}

/* Technical Specifications Box */
.tech-specs text {
  font-family: 'Courier New', monospace;
}

/* Signal Indicators */
.signal-indicators text {
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 5px currentColor;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hfc-container {
    padding: 15px;
  }
  
  .hfc-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .legend {
    justify-content: center;
  }
  
  .legend-item {
    font-size: 10px;
  }
  
  .control-btn {
    font-size: 10px;
    padding: 6px 12px;
  }
  
  .component-info {
    padding: 15px;
  }
  
  .component-info h4 {
    font-size: 16px;
  }
  
  .hfc-schematic {
    min-height: 400px;
  }
}

@media (max-width: 480px) {
  .legend {
    flex-direction: column;
    gap: 10px;
  }
  
  .hfc-schematic {
    min-height: 350px;
  }
  
  .component-info h4 {
    font-size: 14px;
  }
}

/* Accessibility */
.component:focus {
  outline: 3px solid #00ff41;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .signal-pulse {
    animation: none;
  }
  
  .component {
    transition: none;
  }
  
  @keyframes scanline {
    0%, 100% { transform: translateX(0); }
  }
}
