/* ===== SISTEMA DE MODALES MODERNO Y ELEGANTE ===== */

/* Bloquear scroll cuando hay modales abiertos */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
}

/* Clase específica para el modal tecnológico - más específica para evitar conflictos */
body.tech-modal-open:not(.loading):not(.loaded) {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
}

/* Asegurar que funcione incluso con otras clases */
body.tech-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
}

/* Prevenir scroll en dispositivos móviles cuando hay modales */
@media (max-width: 768px) {
    body.modal-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow: hidden !important;
        touch-action: none !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: none !important;
        -webkit-overscroll-behavior: none !important;
    }
    
    body.tech-modal-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow: hidden !important;
        touch-action: none !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: none !important;
        -webkit-overscroll-behavior: none !important;
    }
}

/* Overlay del modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: modalOverlayFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contenedor del modal */
.modal-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 50%, #1f1f1f 100%);
    border: 2px solid #C50039;
    border-radius: 20px;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(197, 0, 57, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Header del modal */
.modal-header {
    background: linear-gradient(135deg, #C50039 0%, #a4002e 100%);
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-title {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* Contenido del modal */
.modal-overlay .modal-container .modal-content {
    padding: 25px;
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: none;
    width: auto;
}

/* Iconos del modal */
.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.modal-icon.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.modal-icon.warning {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.modal-icon.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.modal-icon.info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.modal-icon.chess {
    background: linear-gradient(135deg, #C50039 0%, #a4002e 100%);
    box-shadow: 0 4px 15px rgba(197, 0, 57, 0.4);
}

/* Mensaje del modal */
.modal-overlay .modal-container .modal-content .modal-message {
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

/* Footer del modal */
.modal-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer específico para tablas */
.modal-tablas .modal-footer {
    padding: 25px 30px 30px;
    gap: 20px;
}

/* Botones del modal */
.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.modal-btn:hover::before {
    left: 100%;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #C50039 0%, #a4002e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(197, 0, 57, 0.3);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 0, 57, 0.4);
}

.modal-btn.secondary {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    color: white;
    border: 1px solid #666;
}

.modal-btn.secondary:hover {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    transform: translateY(-2px);
}

.modal-btn.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.modal-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.modal-btn.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.modal-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.modal-btn.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Modal específico para tablas */
.modal-overlay .modal-container.modal-tablas {
    max-width: 450px;
    width: 100%;
}

.modal-overlay .modal-container.modal-tablas .modal-content {
    padding: 35px 30px;
    text-align: center;
}

/* Header específico para modal PGN */
.modal-overlay .modal-container.modal-pgn-download .modal-header {
    padding: 15px 20px 12px;
}

.modal-overlay .modal-container.modal-pgn-download .modal-title {
    font-size: 1.1rem;
}

.modal-overlay .modal-container.modal-pgn-download .modal-footer {
    padding: 15px 20px 20px;
    gap: 10px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-overlay .modal-container.modal-pgn-download .modal-footer .modal-btn {
    flex: 1;
    min-width: 160px;
    font-size: 0.75rem;
    padding: 10px 12px;
}

/* Modal específico para error de GIF */
.modal-overlay .modal-container.modal-error-gif {
    max-width: 450px;
    width: 100%;
}

.modal-overlay .modal-container.modal-error-gif .modal-content {
    padding: 35px 30px;
    text-align: center;
}

.modal-overlay .modal-container.modal-error-gif .modal-content .modal-message {
    max-width: 350px;
    margin: 0 auto;
    text-align: center;
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Asegurar centrado en todos los modales */
.modal-overlay .modal-container .modal-content > * {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.tablas-icon {
    font-size: 52px;
    margin-bottom: 25px;
    display: block;
    text-align: center;
    color: #C50039;
    text-shadow: 0 2px 8px rgba(197, 0, 57, 0.4);
}

.tablas-reason {
    font-size: 1.2rem;
    font-weight: 700;
    color: #C50039;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    display: block;
}

.tablas-description {
    color: #d0d0d0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    display: block;
    max-width: 350px;
    margin: 0 auto;
}

/* Modal de confirmación */
.modal-overlay .modal-container.modal-confirm .modal-content {
    padding: 30px 25px;
}

.confirm-question {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #e0e0e0;
}

.confirm-description {
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Animaciones */
@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* Responsive */
@media only screen and (max-width: 768px) {
    .modal-container {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .modal-header {
        padding: 15px 20px 10px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-overlay .modal-container .modal-content {
        padding: 20px;
        font-size: 0.95rem;
    }
    
    .modal-overlay .modal-container .modal-content .modal-message {
        max-width: 350px;
    }
    
    .modal-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .modal-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* Responsive específico para tablas */
    .modal-overlay .modal-container.modal-tablas {
        max-width: calc(100vw - 40px);
    }
    
    .modal-overlay .modal-container.modal-tablas .modal-content {
        padding: 25px 20px;
    }
    
    .tablas-icon {
        font-size: 44px;
        margin-bottom: 20px;
    }
    
    .tablas-reason {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    
    .tablas-description {
        font-size: 0.95rem;
        max-width: 280px;
    }
    
    .modal-tablas .modal-footer {
        padding: 20px 20px 25px;
        gap: 15px;
    }
    
    /* Responsive específico para error de GIF */
    .modal-overlay .modal-container.modal-error-gif {
        max-width: calc(100vw - 40px);
    }
    
    .modal-overlay .modal-container.modal-error-gif .modal-content {
        padding: 25px 20px;
    }
    
    .modal-overlay .modal-container.modal-error-gif .modal-content .modal-message {
        max-width: 280px;
        font-size: 0.95rem;
    }
}

@media only screen and (max-width: 480px) {
    .modal-container {
        margin: 15px;
        max-width: calc(100vw - 30px);
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 12px 15px 8px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-overlay .modal-container .modal-content {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .modal-overlay .modal-container .modal-content .modal-message {
        max-width: 300px;
    }
    
    .modal-footer {
        padding: 12px 15px 15px;
    }
    
    .modal-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    /* Responsive específico para tablas en móviles */
    .modal-overlay .modal-container.modal-tablas {
        max-width: calc(100vw - 30px);
    }
    
    .modal-overlay .modal-container.modal-tablas .modal-content {
        padding: 20px 15px;
    }
    
    .tablas-icon {
        font-size: 40px;
        margin-bottom: 18px;
    }
    
    .tablas-reason {
        font-size: 1rem;
        letter-spacing: 0.8px;
        margin-bottom: 15px;
    }
    
    .tablas-description {
        font-size: 0.9rem;
        max-width: 250px;
        line-height: 1.5;
    }
    
    .modal-tablas .modal-footer {
        padding: 15px 15px 20px;
        gap: 12px;
    }
    
    /* Responsive específico para error de GIF en móviles */
    .modal-overlay .modal-container.modal-error-gif {
        max-width: calc(100vw - 30px);
    }
    
    .modal-overlay .modal-container.modal-error-gif .modal-content {
        padding: 20px 15px;
    }
    
    .modal-overlay .modal-container.modal-error-gif .modal-content .modal-message {
        max-width: 250px;
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Scrollbar personalizado para el contenido del modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(197, 0, 57, 0.5);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 0, 57, 0.7);
}

/* ===== MODAL TECNOLÓGICO "AJEDREZ DE SILICIO" ===== */

/* Modal tecnológico principal */
.modal-tech-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 15000;
    display: none;
    justify-content: center;
    align-items: center;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
}

.modal-tech-container {
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 25%, #0f0f0f 50%, #1a1a1a 75%, #0a0a0a 100%);
    border: 3px solid #C50039;
    border-radius: 25px;
    padding: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(197, 0, 57, 0.3),
        0 0 50px rgba(197, 0, 57, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(197, 0, 57, 0.1);
    position: relative;
    overflow: hidden;
}

/* Marco exterior simple y estable */
.modal-tech-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 28px;
    background: #C50039;
    z-index: -1;
}

/* Marco interior estable sin efectos */
.modal-tech-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    padding: 3px;
    background: rgba(197, 0, 57, 0.2);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: -1;
}

/* Contenido del modal tecnológico */
.modal-tech-content {
    display: flex;
    align-items: center;
    padding: 40px;
    gap: 40px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Efectos de partículas de fondo */
.modal-tech-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(197, 0, 57, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(197, 0, 57, 0.05) 0%, transparent 50%);
    animation: techParticles 8s ease-in-out infinite;
    pointer-events: none;
}

/* Sección del logo */
.modal-tech-logo-section {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.modal-tech-logo {
    width: 220px;
    height: 220px;
    border-radius: 25px;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    border: 3px solid transparent;
    padding: 25px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(197, 0, 57, 0.4),
        0 0 40px rgba(197, 0, 57, 0.3),
        0 0 60px rgba(197, 0, 57, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 0 rgba(197, 0, 57, 0.15);
    position: relative;
    overflow: hidden;
}

/* Marco del logo estable */
.modal-tech-logo::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 28px;
    background: #C50039;
    z-index: -1;
}

/* Efecto sutil en el logo sin animación */
.modal-tech-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    background: rgba(197, 0, 57, 0.05);
    z-index: 1;
    pointer-events: none;
}

.modal-tech-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: 
        drop-shadow(0 0 15px rgba(197, 0, 57, 0.4))
        drop-shadow(0 0 25px rgba(197, 0, 57, 0.2))
        brightness(1.1)
        contrast(1.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.modal-tech-logo:hover img {
    filter: 
        drop-shadow(0 0 20px rgba(197, 0, 57, 0.6))
        drop-shadow(0 0 35px rgba(197, 0, 57, 0.3))
        brightness(1.2)
        contrast(1.2);
    transform: scale(1.02);
}

/* Sección del texto */
.modal-tech-text-section {
    flex: 1;
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

.modal-tech-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #C50039;
    margin-bottom: 30px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(197, 0, 57, 0.5);
    position: relative;
    animation: techTitleGlow 2s ease-in-out infinite alternate;
}

.modal-tech-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #C50039, #FFD700, #C50039);
    border-radius: 2px;
    animation: techTitleUnderline 3s ease-in-out infinite;
}

.modal-tech-content-text {
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: left;
    margin-bottom: 25px;
    position: relative;
}

.modal-tech-content-text::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #C50039, #FFD700, #C50039);
    border-radius: 2px;
    animation: techTextAccent 4s ease-in-out infinite;
}

.modal-tech-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #FFD700;
    margin: 30px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.modal-tech-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: linear-gradient(135deg, #C50039 0%, #a4002e 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(197, 0, 57, 0.4);
    z-index: 10;
}

.modal-tech-close:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.5);
    color: #000;
}

/* Animaciones tecnológicas */
@keyframes techOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(15px);
    }
}

@keyframes techModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px) rotateX(15deg);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

@keyframes techBorderGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes techBorderScan {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes techParticles {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes techLogoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(0.5deg);
    }
}

@keyframes techLogoBorder {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes techLogoScan {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes techTitleGlow {
    from {
        text-shadow: 0 0 20px rgba(197, 0, 57, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(197, 0, 57, 0.8), 0 0 40px rgba(197, 0, 57, 0.3);
    }
}

@keyframes techTitleUnderline {
    0%, 100% {
        width: 100px;
        opacity: 0.8;
    }
    50% {
        width: 150px;
        opacity: 1;
    }
}

@keyframes techTextAccent {
    0%, 100% {
        opacity: 0.6;
        height: 100%;
    }
    50% {
        opacity: 1;
        height: 120%;
    }
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 50px rgba(255, 215, 0, 0.6);
    }
}

/* Responsive para modal tecnológico */
@media only screen and (max-width: 768px) {
    .modal-tech-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .modal-tech-content {
        flex-direction: column;
        padding: 30px 25px;
        gap: 30px;
        text-align: center;
    }
    
    .modal-tech-logo-section {
        flex: none;
    }
    
    .modal-tech-logo {
        width: 150px;
        height: 150px;
    }
    
    .modal-tech-title {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 25px;
    }
    
    .modal-tech-content-text {
        font-size: 1rem;
        text-align: center;
    }
    
    .modal-tech-content-text::before {
        display: none;
    }
    
    .modal-tech-subtitle {
        font-size: 1.2rem;
        text-align: center;
    }
}

@media only screen and (max-width: 480px) {
    .modal-tech-container {
        width: 98%;
        margin: 10px;
        border-radius: 20px;
    }
    
    .modal-tech-content {
        padding: 25px 20px;
        gap: 25px;
    }
    
    .modal-tech-logo {
        width: 120px;
        height: 120px;
        padding: 15px;
    }
    
    .modal-tech-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .modal-tech-content-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .modal-tech-subtitle {
        font-size: 1.1rem;
    }
    
    .modal-tech-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 15px;
        right: 20px;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA MODAL DE DESCARGA PGN ===== */

/* Modal de descarga PGN */
.modal-overlay .modal-container.modal-pgn-download {
    max-width: 480px;
    width: 90%;
}

.modal-overlay .modal-container.modal-pgn-download .modal-content {
    padding: 20px;
}

.modal-overlay .modal-container.modal-pgn-download .modal-message {
    margin-bottom: 15px;
    text-align: center;
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Formulario PGN */
.modal-overlay .modal-container.modal-pgn-download .pgn-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.modal-overlay .modal-container.modal-pgn-download .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-overlay .modal-container.modal-pgn-download .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-overlay .modal-container.modal-pgn-download label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-overlay .modal-container.modal-pgn-download input,
.modal-overlay .modal-container.modal-pgn-download select {
    padding: 10px 12px;
    border: 2px solid rgba(197, 0, 57, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-overlay .modal-container.modal-pgn-download input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-overlay .modal-container.modal-pgn-download input:focus,
.modal-overlay .modal-container.modal-pgn-download select:focus {
    outline: none;
    border-color: #C50039;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(197, 0, 57, 0.2);
}

.modal-overlay .modal-container.modal-pgn-download input:hover,
.modal-overlay .modal-container.modal-pgn-download select:hover {
    border-color: rgba(197, 0, 57, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.modal-overlay .modal-container.modal-pgn-download select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

/* Estilos específicos para el formulario PGN moderno */
.pgn-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid rgba(197, 0, 57, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #C50039;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(197, 0, 57, 0.2);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(197, 0, 57, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

/* Responsive para formulario PGN */
@media (max-width: 768px) {
    .modal-overlay .modal-container.modal-pgn-download {
        max-width: 95%;
        margin: 15px;
    }
    
    .modal-overlay .modal-container.modal-pgn-download .modal-content {
        padding: 18px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pgn-form {
        gap: 12px;
    }
    
    .form-group {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .modal-overlay .modal-container.modal-pgn-download {
        max-width: calc(100vw - 20px);
        margin: 10px;
    }
    
    .modal-overlay .modal-container.modal-pgn-download .modal-content {
        padding: 15px 12px;
    }
    
    .modal-overlay .modal-container.modal-pgn-download input,
    .modal-overlay .modal-container.modal-pgn-download select {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .modal-overlay .modal-container.modal-pgn-download label {
        font-size: 0.75rem;
    }
    
    .modal-overlay .modal-container.modal-pgn-download .modal-message {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .modal-overlay .modal-container.modal-pgn-download .pgn-form {
        gap: 10px;
        margin-top: 12px;
    }
}
