/* Modal de recomendación para PC */
.pc-recommendation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.pc-recommendation-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.pc-recommendation-modal.show .modal-content {
    transform: translateY(0);
    animation: modalEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalEnter {
    0% {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.modal-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.device-recommendation {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    gap: 20px;
}

.device-item {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.device-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.device-item i {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 10px;
}

.device-item span {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-modal {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-modal {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary-modal:hover {
    background: linear-gradient(45deg, #20c997, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-secondary-modal {
    background: #6c757d;
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary-modal:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

/* Iconos en botones */
.btn-modal i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.highlight-text {
    color: #28a745;
    font-weight: 600;
}

/* Tema oscuro */
.theme-dark .modal-content {
    background: #1a1d29;
    color: #fff;
}

.theme-dark .modal-title {
    color: #fff;
}

.theme-dark .modal-text {
    color: #b8bcc8;
}

.theme-dark .device-item {
    background: #252936;
}

.theme-dark .device-item:hover {
    background: #2d3142;
}

.theme-dark .device-item span {
    color: #fff;
}

/* Estilos específicos para modal QR */
.qr-modal-content {
    max-width: 450px !important;
    text-align: center;
}

.qr-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.qr-frame {
    background: white;
    padding: 15px;
    border-radius: 15px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin: 20px auto;
    position: relative;
    border: 3px solid #28a745;
    /* Ajustar exactamente al tamaño del QR */
    width: fit-content;
    height: fit-content;
    text-align: center;
}

.qr-frame::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.1;
}

.qr-image {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 8px;
    /* Asegurar que no haya espacios extra y centrado */
    margin: 0 auto;
}

.qr-instructions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.instruction-step {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
}

.instruction-step i {
    display: block;
    font-size: 1.5rem;
    color: #28a745;
    margin-bottom: 8px;
}

.instruction-step span {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    line-height: 1.2;
}

.url-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.url-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.url-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 0.8rem;
    font-family: monospace;
    background: white;
    color: #495057;
    outline: none;
    transition: border-color 0.3s ease;
}

.url-input:focus {
    border-color: #28a745;
}

.copy-btn {
    background: #6c757d;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.copy-btn:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.copy-btn i {
    font-size: 0.9rem;
}

/* Tema oscuro para modal QR */
.theme-dark .qr-container {
    background: linear-gradient(135deg, #252936 0%, #1a1d29 100%);
}

.theme-dark .url-section {
    background: #252936;
    border-color: #3a3f51;
}

.theme-dark .url-input {
    background: #1a1d29;
    border-color: #3a3f51;
    color: #b8bcc8;
}

.theme-dark .url-input:focus {
    border-color: #28a745;
}

.theme-dark .url-label {
    color: #b8bcc8;
}

.theme-dark .instruction-step span {
    color: #b8bcc8;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .qr-modal-content {
        max-width: 90% !important;
        margin: 10px;
    }
    
    .device-recommendation {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .qr-instructions {
        flex-direction: column;
        gap: 10px;
    }
    
    .instruction-step {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 10px;
    }
    
    .instruction-step i {
        margin-bottom: 0;
        font-size: 1.2rem;
    }
    
    .instruction-step span {
        font-size: 0.85rem;
    }
    
    .url-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .copy-btn {
        align-self: center;
        min-width: 120px;
        border-radius: 25px;
        height: auto;
        padding: 10px 20px;
    }
}

/* Ocultar completamente en móviles */
@media (max-width: 767px) {
    .pc-recommendation-modal {
        display: none !important;
    }
}
