/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}


body.info-open {
  overflow: hidden;
}



/* Title and info styles */
.main-title {
  font-size: 2rem;
  font-weight: 300;
  color: #34495e;
  margin: 0;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.header-subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin: 0 0 20px 0;
  font-weight: 400;
}

.info-toggle-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.info-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.info-toggle-btn:active {
  transform: translateY(0);
}

/* Main content layout */
.main-content {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Controls section */
.controls-section {
  width: 100%;
}

.controls-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 1rem;
  font-weight: 500;
  color: #34495e;
  white-space: nowrap;
}

.year-selector {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.year-selector:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.year-selector:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Label styles */
label {
  font-size: 1rem;
  font-weight: 500;
  color: #34495e;
  white-space: nowrap;
}

/* Select dropdown styles */
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

select:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Diagram section */
.diagram-section {
  width: 100%;
}

.diagram-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
}

#zoom-wrapper {
  width: 100%;
  height: 85vh;
  min-height: 600px;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  transform-origin: 0 0;
  cursor: grab;
}

#zoom-wrapper.dragging {
  cursor: grabbing;
}

#sankey-diagram {
  width: 100%;
  height: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .controls-container {
    padding: 15px 20px;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 10px;
  }

  .diagram-container {
    width: 98%;
    padding: 15px;
  }

  #zoom-wrapper {
    height: 75vh;
    min-height: 400px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .controls-container {
    padding: 12px 15px;
  }

  .diagram-container {
    width: 100%;
    padding: 12px;
  }

  #zoom-wrapper {
    height: 70vh;
    min-height: 320px;
  }

  select {
    font-size: 0.9rem;
    padding: 8px 12px;
    min-width: 100px;
  }
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #7f8c8d;
  font-size: 1.1rem;
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #bdc3c7;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Error state */
.error {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    background: white;
    color: black;
  }

  .controls-container,
  .diagram-container {
    background: white;
    border: 2px solid black;
  }

  select {
    border: 2px solid black;
  }
}

/* Column Labels Controls Styles */
.column-labels-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-labels-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.column-labels-controls input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3498db;
}

/* Column Label Styles */
.column-label {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.column-label-title {
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
}

.column-label-description {
  margin: 2px 0 0 0;
  line-height: 1.1;
  opacity: 0.7;
  font-size: 0.8em;
}

/* Export Controls Styles */
.export-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.export-btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.config-btn {
  background: #6c757d;
  color: white;
}

.config-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.png-btn {
  background: #28a745;
  color: white;
}

.png-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.svg-btn {
  background: #007bff;
  color: white;
}

.svg-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.reset-btn {
  background: #17a2b8;
  color: white;
}

.reset-btn:hover {
  background: #138496;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.zoom-btn {
  background: #ffc107;
  color: #212529;
}

.zoom-btn:hover {
  background: #e0a800;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  color: #000;
}

.modal-body {
  padding: 25px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.config-section {
  margin-bottom: 25px;
}

.config-section h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.config-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.config-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

.config-group input[type="number"],
.config-group input[type="text"],
.config-group select {
  padding: 8px 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.config-group input[type="number"]:focus,
.config-group input[type="text"]:focus,
.config-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.config-group input[type="checkbox"] {
  margin-right: 8px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Progress Modal Styles */
.progress-modal {
  max-width: 400px;
  text-align: center;
}

.progress-content {
  padding: 30px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.progress-content h3 {
  margin: 0 0 10px 0;
  color: #2c3e50;
}

.progress-content p {
  margin: 0 0 20px 0;
  color: #6c757d;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Responsive adjustments for export controls */
@media (max-width: 768px) {
  .export-controls {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .export-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}

@media (max-width: 480px) {
  .export-controls {
    flex-direction: column;
    gap: 8px;
  }

  .export-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
  }

  h1 {
    color: #ecf0f1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .controls-container,
  .diagram-container {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(236, 240, 241, 0.1);
  }

  label {
    color: #ecf0f1;
  }

  select {
    background: #34495e;
    color: #ecf0f1;
    border-color: #4a6741;
  }

  select:hover {
    border-color: #5dade2;
  }

  .error {
    background: #4a2c2a;
    border-color: #8b4513;
    color: #ff6b6b;
  }

  .modal-content {
    background: #34495e;
    color: #ecf0f1;
  }

  .modal-header {
    border-bottom-color: #4a6741;
  }

  .modal-header h3 {
    color: #ecf0f1;
  }

  .modal-footer {
    border-top-color: #4a6741;
  }

  .config-section h4 {
    color: #ecf0f1;
  }

  .config-group label {
    color: #ecf0f1;
  }

  .config-group input[type="number"],
  .config-group input[type="text"],
  .config-group select {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a6741;
  }

  .progress-content h3 {
    color: #ecf0f1;
  }

  .progress-content p {
    color: #bdc3c7;
  }
}
/*
 Info Panel Styles */
.info-panel {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.info-panel.visible {
  opacity: 1;
  visibility: visible;
}

.info-content {
  background: #ffffff;
  width: 400px;
  max-width: 90%;
  height: 100%;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  position: relative;
}

.info-panel.visible .info-content {
  transform: translateX(0);
}

.info-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #7f8c8d;
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.info-close-btn:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.info-sections {
  padding: 30px;
  padding-top: 60px;
}

.info-section {
  margin-bottom: 40px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.info-section h3 {
  color: #34495e;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 25px 0 15px 0;
}

.info-section h4 {
  color: #34495e;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 15px 0 10px 0;
}

.info-section p {
  color: #5d6d7e;
  line-height: 1.7;
  margin-bottom: 15px;
  text-align: justify;
}

/* Energéticos Grid */
.energeticos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.energetico-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
}

.energetico-item:hover {
  background: #e3f2fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.energetico-item strong {
  color: #2c3e50;
  display: block;
  margin-bottom: 5px;
}

/* Config Panel Styles */
.config-panel {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.config-panel.visible {
  opacity: 1;
  visibility: visible;
}

.config-content {
  background: #ffffff;
  width: 450px;
  max-width: 90%;
  height: 100%;

  display: flex;
  flex-direction: column;

  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  position: relative;
}

.config-panel.visible .config-content {
  transform: translateX(0);
}

.config-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #7f8c8d;
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.config-close-btn:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

/* Flujo Steps */
.flujo-steps {
  margin: 20px 0;
}

.step {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  border-left: 5px solid #3498db;
  transition: all 0.3s ease;
}

.step:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.step h4 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.step p {
  margin: 0;
  color: #5d6d7e;
}

/* Importancia Grid */
.importancia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.importancia-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3498db;
  transition: all 0.3s ease;
}

.importancia-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.importancia-item h4 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.importancia-item p {
  margin: 0;
  color: #5d6d7e;
  font-size: 0.95rem;
}

/* Uso Instrucciones */
.uso-instrucciones {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.uso-instrucciones p {
  margin-bottom: 12px;
  color: #495057;
}

.uso-instrucciones p:last-child {
  margin-bottom: 0;
}

.uso-instrucciones strong {
  color: #2c3e50;
}

/* Responsive adjustments for info panel */
@media (max-width: 768px) {
  .info-panel {
    padding: 0;
  }

  .info-content {
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
  }
  
  .info-sections {
    padding: 20px;
    padding-top: 50px;
  }
  
  .info-section h2 {
    font-size: 1.5rem;
  }
  
  .energeticos-grid {
    grid-template-columns: 1fr;
  }
  
  .importancia-grid {
    grid-template-columns: 1fr;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .controls-container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .control-group {
    justify-content: center;
  }
  
  .export-controls {
    justify-content: center;
  }

  .config-panel {
    padding: 0;
  }

  .config-content {
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
  }

  .modal-footer {
    justify-content: center;
  }

  .modal-footer button {
    flex: 1 1 45%;
  }

}

@media (max-width: 480px) {
  .main-title {
    font-size: 1.6rem;
  }
  
  .header-subtitle {
    font-size: 1rem;
  }
  
  .info-toggle-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .info-content {
    width: 100%;
    max-width: 100%;
  }

  .info-sections {
    padding: 15px;
    padding-top: 45px;
  }
  
  .info-section h2 {
    font-size: 1.3rem;
  }
  
  .step {
    padding: 15px;
  }
  
  .importancia-item {
    padding: 15px;
  }

  .config-content {
    width: 100%;
    max-width: 100%;
  }

  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-footer button {
    width: 100%;
  }

}

/* Dark mode support for info panel */
@media (prefers-color-scheme: dark) {
  .info-panel {
    background: rgba(44, 62, 80, 0.4);
  }
  .info-content {
    background: #2c3e50;
    color: #ecf0f1;
  }
  
  .info-close-btn {
    color: #bdc3c7;
  }
  
  .info-close-btn:hover {
    background: #34495e;
    color: #ecf0f1;
  }
  
  .info-section h2 {
    color: #ecf0f1;
    border-bottom-color: #5dade2;
  }
  
  .info-section h3,
  .info-section h4 {
    color: #ecf0f1;
  }
  
  .info-section p {
    color: #bdc3c7;
  }
  
  .energetico-item {
    background: #34495e;
    border-left-color: #5dade2;
  }
  
  .energetico-item:hover {
    background: #3d566e;
  }
  
  .energetico-item strong {
    color: #ecf0f1;
  }
  
  .step {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-left-color: #5dade2;
  }
  
  .step h4 {
    color: #ecf0f1;
  }
  
  .step p {
    color: #bdc3c7;
  }
  
  .importancia-item {
    background: #34495e;
    border-top-color: #5dade2;
  }
  
  .importancia-item h4 {
    color: #ecf0f1;
  }
  
  .importancia-item p {
    color: #bdc3c7;
  }
  
  .uso-instrucciones {
    background: #34495e;
    border-color: #4a6741;
  }
  
  .uso-instrucciones p {
    color: #bdc3c7;
  }
  
  .uso-instrucciones strong {
    color: #ecf0f1;
  }
  
  .main-title {
    color: #ecf0f1;
  }
  
  .header-subtitle {
    color: #bdc3c7;
  }
  
  .controls-container {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(236, 240, 241, 0.1);
  }
  
  .control-label {
    color: #ecf0f1;
  }
  
  .year-selector {
    background: #34495e;
    color: #ecf0f1;
    border-color: #4a6741;
  }
  
  .year-selector:hover {
    border-color: #5dade2;
  }
  
  .diagram-container {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(236, 240, 241, 0.1);
  }

  .config-panel {
    background: rgba(44, 62, 80, 0.4);
  }
  .config-content {
    background: #2c3e50;
    color: #ecf0f1;
  }
  .config-close-btn {
    color: #bdc3c7;
  }
  .config-close-btn:hover {
    background: #34495e;
    color: #ecf0f1;
  }
}

/* Fondo para etiquetas de nodos */
.node-label-bg {
  fill: rgba(255, 255, 255, 0.8);
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 1;
  rx: 2px;
}

/* Accessibility improvements */
.info-toggle-btn:focus,
.info-close-btn:focus,
.config-close-btn:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .info-panel,
  .config-panel,
  .controls-section {
    display: none;
  }
  
  .diagram-section {
    width: 100%;
    margin: 0;
  }
  
  .diagram-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}