body, html { 
    margin: 0; 
    padding: 0; 
    height: 100%; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    font-size: 14px; 
}

#map { 
    height: 100%; 
    width: 100%; 
}

/* =============================================== */
/* ESTILOS PARA FLECHAS DE VIENTO */
/* =============================================== */
.wind-arrow-icon {
    background: none !important;
    border: none !important;
}

.wind-arrow-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-size: 11px !important;
    text-align: center !important;
}

.wind-arrow-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.8) !important;
}

/* Controles de visualización */
.visualization-controls {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.visualization-controls h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.visualization-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.visualization-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

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

.visualization-btn:active {
    transform: scale(0.98);
}

#controls {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    /* width: 550px; */
    min-width: 550px;
    max-width: 90vw; /* Responsive para pantallas pequeñas */
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: translateX(0);
    opacity: 1;
}

/* Panel colapsado */
#controls.panel-collapsed {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

/* Botón resetear portal - superior izquierda */
.reset-portal-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: #dc3545;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.reset-portal-btn:hover {
    background: #c82333;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Botón para mostrar el panel */
.panel-toggle {
    position: fixed;
    top: 45px;
    right: 20px;
    z-index: 1001;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.panel-toggle:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Botón de cerrar dentro del panel */
.close-panel {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-panel:hover {
    background: #f0f0f0;
    color: #333;
}

/* Botón eliminar en tooltip de consulta (modo consulta) */
.query-popup-remove-btn {
    padding: 6px 12px;
    font-size: 12px;
    color: white;
    background: #dc3545;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.query-popup-remove-btn:hover {
    background: #c82333;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    #controls {
        width: 100vw;
        height: 100vh;
        top: 0;
        right: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    .reset-portal-btn {
        top: 8px;
        left: 8px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .panel-toggle {
        right: 15px;
        top: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

#controls h2 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    font-size: 18px;
}

.hidden { 
    display: none; 
}

/* Estilos para pestañas */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    font-size: 12px;
}

.tab-button:hover {
    background-color: #e9ecef;
}

.tab-button.active {
    background-color: #007cba;
    color: white;
    border-bottom-color: #005a89;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Grupos de controles */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.control-group label {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 500;
}

.control-group input,
.control-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Campos de coordenadas en la misma línea */
.coordinate-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.coordinate-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0; /* Permite que el flex se contraiga */
    font-size: 14px;
}

.coordinate-row input {
    width: 100px;
    max-width: 100px;
    padding: 4px;
    font-size: 11px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.info-text {
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Controles de Modo de Interacción */
.interaction-mode-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.interaction-mode-section h4 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-option {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mode-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.mode-option input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.mode-option input[type="radio"]:checked + .mode-label {
    color: #007bff;
    font-weight: bold;
}

.mode-option:has(input:checked) {
    border-color: #007bff;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.mode-option:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.mode-option:has(input:disabled):hover {
    border-color: #e0e0e0;
    background: #f5f5f5;
}

.mode-label {
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-option small {
    color: #6c757d;
    font-style: italic;
    font-size: 11px;
    margin-left: 20px;
}

/* Botón simular principal */
#simulateBtn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

#simulateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

/* Editor de fuentes */
#sourceEditor {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

#sourceEditor h4 {
    margin: 0 0 15px 0;
    color: #495057;
    word-wrap: break-word;
}

#sourceForm {
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

#sourceForm label {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

#sourceForm input {
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    max-width: 100%;
}

#removeSourceBtn {
    width: 100%;
    padding: 8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

#removeSourceBtn:hover {
    background-color: #c82333;
}

/* Factores de emisión */
.emission-factors-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.emission-factors-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.emission-factors-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#resetFactorsBtn {
    background-color: #6c757d;
    color: white;
}

#resetFactorsBtn:hover {
    background-color: #5a6268;
}

#applyFactorsBtn {
    background-color: #28a745;
    color: white;
}

#applyFactorsBtn:hover {
    background-color: #218838;
}

/* Enlace de documentación */
.documentation-link {
    display: inline-block;
    background: linear-gradient(135deg, #0056b3, #007bff);
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 500;
    margin: 5px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.documentation-link:hover {
    background: linear-gradient(135deg, #004494, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Badge de Desarrollador */
.developer-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    user-select: none;
}

.developer-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #218838, #28a745);
}

.badge-icon {
    margin-right: 5px;
}

/* Modal Acerca de */
.about-modal {
    max-width: 600px;
    width: 90%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
}

.about-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.about-header h2 {
    color: #0056b3;
    margin: 0 0 5px 0;
}

.version-info {
    color: #6c757d;
    font-style: italic;
}

.developer-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.developer-info h3 {
    color: #155724;
    margin-top: 0;
}

.developer-details p {
    margin: 5px 0;
    color: #333;
}

.linkedin-link {
    display: inline-block;
    background: #0077b5;
    color: white !important;
    text-decoration: none !important;
    padding: 6px 12px;
    border-radius: 4px;
    margin-top: 8px;
    transition: background 0.3s;
}

.linkedin-link:hover {
    background: #005582;
}

.technical-info {
    margin-bottom: 15px;
}

.technical-info ul {
    margin: 10px 0;
}

.technical-info li {
    margin: 5px 0;
}

.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* Close button para modal */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

/* Footer */
.app-footer {
    background: #343a40;
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-top: 30px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-text {
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-link {
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

/* Estilos para documentación técnica */
.developer-credit-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.credit-header {
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white;
    padding: 20px;
    text-align: center;
}

.credit-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.credit-content {
    padding: 25px;
}

.developer-profile {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.developer-profile h4 {
    color: #0056b3;
    font-size: 1.3em;
    margin: 0 0 10px 0;
}

.titles {
    margin: 10px 0 15px 0;
}

.title-badge {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin: 2px 4px;
}

.professional-link {
    display: inline-block;
    background: #0077b5;
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.professional-link:hover {
    background: #005582;
}

.development-details,
.technical-contributions {
    margin-bottom: 20px;
}

.project-timeline {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.timeline-item {
    margin: 8px 0;
    color: #495057;
}

.contributions-list {
    list-style: none;
    padding: 0;
}

.contributions-list li {
    background: #f8f9fa;
    margin: 8px 0;
    padding: 10px 15px;
    border-left: 4px solid #007bff;
    border-radius: 0 4px 4px 0;
}

.intellectual-property {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .developer-badge {
        top: 5px;
        right: 5px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .about-modal {
        width: 95%;
        margin: 10px;
    }
}

/* Resultados */
.results-section {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Modal base para About Dialog */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

/* Iconos para diferentes tipos de fuentes */
.farm-icon {
    background-color: rgba(233, 30, 99, 0.8);
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    width: 30px;
    height: 30px;
}

.polygon-icon {
    background-color: rgba(108, 117, 125, 0.8);
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    width: 30px;
    height: 30px;
}

.estercolero-icon {
    background-color: rgba(218, 165, 32, 0.8);
    border: 1px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
    width: 30px;
    height: 30px;
}

/* Panel nivel de zoom (sobre la leyenda) */
.zoom-level-display {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}
.zoom-level-display .zoom-level-label {
    font-size: 11px;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.zoom-level-display .zoom-level-value {
    font-size: 18px;
    font-weight: bold;
    color: #1976d2;
    min-width: 24px;
    text-align: right;
}

/* Leyenda Mejorada */
.legend {
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-radius: 8px;
    min-width: 280px;
    max-width: 320px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.legend h4 {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.legend-toggle {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.legend-toggle:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.legend-content {
    display: block;
}

.legend-section {
    margin-bottom: 15px;
}

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

.legend-section h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #555;
    font-weight: bold;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    padding: 2px 0;
}

.legend-item span {
    font-size: 11px;
    color: #666;
}

.marker-icon {
    width: 20px;
    height: 18px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 3px;
}

.farm-marker {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
}

.polygon-marker {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid #2196F3;
}

.lagoon-marker {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid #FF9800;
}

/* Escala de concentraciones */
.concentration-scale {
    margin: 5px 0;
}

.scale-item {
    display: flex;
    align-items: center;
    margin: 3px 0;
    padding: 1px 0;
}

.color-box {
    width: 20px;
    height: 12px;
    margin-right: 8px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 2px;
    flex-shrink: 0;
}

.scale-item span {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
}

/* Indicadores meteorológicos */
.wind-arrow {
    width: 20px;
    height: 18px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #2196F3;
    transform: rotate(90deg);
}

.stability-indicator {
    width: 20px;
    height: 18px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 3px;
    color: #2E7D32;
}

/* Botón de captura PDF */
.legend-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.capture-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.capture-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

/* Indicador de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

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

.loading-message {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Notificaciones de mensaje */
.message-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.message-success {
    background: #4CAF50;
}

.message-error {
    background: #F44336;
}

.message-warning {
    background: #FF9800;
}

.message-info {
    background: #2196F3;
}

/* Estilos para carga masiva */
.upload-section {
    margin-bottom: 25px;
}

.file-upload-area {
    border: 2px dashed #007cba;
    border-radius: 8px;
    padding: 20px;
    background-color: #f8f9fa;
    margin-bottom: 15px;
}

.upload-dropzone {
    text-align: center;
    padding: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-dropzone:hover {
    background-color: #e3f2fd;
}

.upload-dropzone.dragover {
    background-color: #bbdefb;
    border-color: #1976d2;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.upload-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.primary-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.primary-btn:hover {
    background-color: #005a8a;
}

.primary-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.secondary-btn:hover {
    background-color: #545b62;
}

.data-preview-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #fff;
}

.preview-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.preview-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.preview-tab-btn.active {
    background-color: #007cba;
    color: white;
    border-bottom-color: #007cba;
}

.preview-panel {
    display: none;
}

.preview-panel.active {
    display: block;
}

.preview-stats {
    background-color: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 13px;
}

.preview-table {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.preview-table th {
    background-color: #007cba;
    color: white;
    padding: 8px;
    text-align: left;
    position: sticky;
    top: 0;
}

.preview-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.preview-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.info-section {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
}

.structure-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.structure-item {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.structure-item h6 {
    margin: 0 0 10px 0;
    color: #007cba;
    font-size: 14px;
}

.structure-item ul {
    margin: 0;
    padding-left: 20px;
}

.structure-item li {
    margin: 5px 0;
    font-size: 12px;
}

.validation-message {
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.validation-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.validation-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Estilos específicos para Meteorología */
.meteo-mode-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mode-btn {
    padding: 8px 16px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-btn:hover {
    background: #e3f2fd;
    transform: translateY(-1px);
}

.mode-btn.active {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.meteo-mode {
    display: none;
    margin: 20px 0;
}

.meteo-mode.active {
    display: block;
}

.single-meteo-form {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.multi-meteo-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meteo-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

#meteoDataTable {
    width: 100%;
    border-collapse: collapse;
}

#meteoDataTable th {
    background: #007bff;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 10;
}

#meteoDataTable td {
    padding: 10px 8px;
    border-bottom: 1px solid #e0e0e0;
}

#meteoDataTable tbody tr:hover {
    background: #f8f9fa;
}

.meteo-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.meteo-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.delete-meteo-btn {
    padding: 4px 8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.delete-meteo-btn:hover {
    background: #c82333;
}

.meteo-summary {
    padding: 10px 15px;
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #155724;
}

.meteo-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
    flex-wrap: wrap;
}

.current-meteo-display {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.current-meteo-display h6 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-weight: 600;
}

#currentMeteoInfo {
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mode-buttons {
        flex-direction: column;
    }
    
    .multi-meteo-controls {
        flex-direction: column;
    }
    
    .meteo-actions {
        flex-direction: column;
    }
    
    .meteo-table-container {
        font-size: 0.85em;
    }
    
    #meteoDataTable th,
    #meteoDataTable td {
        padding: 8px 4px;
    }
}

/* ===============================================
   ESTILOS DEL REPRODUCTOR TEMPORAL
   =============================================== */

.temporal-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 15px;
    width: 700px;
    max-width: 90vw;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.temporal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.temporal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.temporal-header h3 {
    margin: 0;
    color: #007bff;
    font-size: 18px;
}

.minimize-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.minimize-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.temporal-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.temporal-player.minimized {
    height: auto;
}

.temporal-player.minimized .temporal-info {
    display: none;
}

/* Panel ensanchado para meteorología */
.wide-panel {
    min-width: 750px !important;
    width: auto !important;
    transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out;
}

.wide-panel .meteorology-table {
    width: 100%;
    max-width: none !important;
    overflow: visible !important;
}

.wide-panel .tab-content {
    min-width: 720px;
    padding: 15px;
}

/* Transición suave para cambios de ancho */
#controls {
    transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out;
}

/* Mejorar tabla de meteorología en panel ensanchado */
.wide-panel .meteo-table th,
.wide-panel .meteo-table td {
    padding: 8px 12px;
    white-space: nowrap;
}

.wide-panel .meteo-table {
    table-layout: auto;
    width: 100%;
    margin: 10px 0;
}

.temporal-controls-container {
    transition: all 0.3s ease;
}

.temporal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.playback-controls {
    display: flex;
    gap: 8px;
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-controls label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.speed-controls select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.export-controls {
    display: flex;
    gap: 8px;
}

.temporal-btn {
    padding: 8px 12px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.temporal-btn:active {
    transform: scale(0.95);
}

.temporal-close {
    border-color: #dc3545;
    color: #dc3545;
}

.temporal-close:hover {
    background: #dc3545;
    color: white;
}

.temporal-slider-container {
    position: relative;
}

.temporal-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.temporal-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.temporal-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.temporal-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* Overlay de exportación GIF */
.gif-export-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.gif-export-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.gif-export-content h3 {
    margin: 0 0 20px 0;
    color: #007bff;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .temporal-player {
        width: 95vw;
        bottom: 10px;
        padding: 10px;
    }
    
    .temporal-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .playback-controls {
        justify-content: center;
    }
    
    .temporal-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .temporal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .temporal-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* ===============================================
   ESTILOS PARA ROSA DE OLORES (EN PANEL DE RESULTADOS)
   =============================================== */

/* Controles de Rosa de Olores en panel */
.odour-rose-controls-panel {
    background: #f8f9fa;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.odour-rose-controls-panel h5 {
    margin: 0 0 8px 0;
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
}

.odour-info-text {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
    font-style: italic;
}

.odour-controls-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.odour-control-btn {
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.odour-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.odour-control-btn.primary {
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
}

.odour-control-btn.primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.odour-control-btn.primary.active {
    background: #28a745;
    border-color: #28a745;
}

.odour-control-btn.secondary {
    background: white;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.odour-control-btn.secondary:hover {
    background: #6c757d;
    color: white;
}

/* Coordenadas - Estilos corregidos */
.coordinate-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.coord-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    min-width: 0; /* Evitar que el texto se corte */
}

.coord-text {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    min-width: 30px;
    display: inline-block;
}

.coord-input {
    font-size: 11px !important;
    width: 90px !important;
    padding: 4px 6px !important;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
}

.coord-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.wind-rose-modal {
    width: 900px;
    max-width: 95vw;
}

.percentiles-modal {
    width: 600px;
    max-width: 90vw;
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #666;
}

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

.modal-info {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 13px;
    color: #666;
}

/* Tabla de Rosa de Olores */
.wind-rose-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.wind-rose-table th,
.wind-rose-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.wind-rose-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.wind-rose-table tr:nth-child(even) {
    background: #f9f9f9;
}

.wind-rose-table tr:hover {
    background: #f0f8ff;
}

/* Grid de percentiles */
.percentiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.percentile-summary {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.percentile-summary h4 {
    margin: 0 0 8px 0;
    color: #007bff;
    font-size: 16px;
}

.percentile-summary p {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
}

/* Responsive para Rosa de Olores */
@media (max-width: 768px) {
    .odour-controls-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .odour-control-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .coordinate-row {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
    }
    
    .coord-label {
        justify-content: space-between;
    }
    
    .coord-input {
        width: 120px !important;
    }
    
    .wind-rose-table {
        font-size: 11px;
    }
    
    .wind-rose-table th,
    .wind-rose-table td {
        padding: 6px 5px;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .percentiles-grid {
        grid-template-columns: 1fr;
    }
}

/* Agregar al final de tu archivo CSS */

.coordinate-input-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.method-btn {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.method-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.method-btn:hover:not(.active) {
    background: #e0e0e0;
}

.coord-input-mode {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.coord-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.coord-input-row label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.coord-input-row input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#multiple-coords-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.primary-btn, .secondary-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.primary-btn:hover {
    background: #218838;
}

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

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

#coord-results-table-container {
    overflow-x: auto;
    margin: 15px 0;
}

.coord-results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.coord-results-table th,
.coord-results-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.coord-results-table th {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.coord-results-table tr:nth-child(even) {
    background: #f9f9f9;
}

.coord-results-table tr:hover {
    background: #e7f3ff;
}

/* Estilos unificados para secciones de controles */
.interaction-mode-section,
.visualization-controls {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.visualization-controls h5 {
    color: white;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.visualization-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visualization-buttons .capture-btn {
    width: 100%;
    padding: 10px 15px;
    background: white;
    color: #667eea;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.visualization-buttons .capture-btn:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.compact-mode-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.compact-mode-line > span {
    font-weight: bold;
    white-space: nowrap;
    color: white;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.compact-mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.compact-mode-option:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.compact-mode-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.compact-mode-option span {
    font-size: 13px;
    line-height: 1.3;
    color: #667eea;
    font-weight: 500;
}

.compact-mode-option small {
    display: block;
    font-size: 11px;
    color: #888;
    font-weight: normal;
}

.compact-mode-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.compact-mode-option:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.compact-mode-option:has(input[type="radio"]:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e9ecef;
}

.compact-mode-option:has(input[type="radio"]:disabled):hover {
    transform: none;
    box-shadow: none;
}

/* === BARRA DE PROGRESO DE SIMULACIÓN === */

.simulation-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.simulation-progress-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.simulation-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.simulation-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.simulation-icon-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.simulation-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.simulation-message {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
    min-height: 24px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.progress-bar {
    flex: 1;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 15px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-size: 18px;
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

.simulation-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    font-weight: bold;
}

.simulation-footer {
    margin-top: 15px;
    opacity: 0.8;
}

.simulation-footer small {
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .simulation-progress-container {
        padding: 30px 20px;
    }
    
    .simulation-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .simulation-title {
        font-size: 20px;
    }
}