body {
    background: linear-gradient(135deg, rgb(0, 109, 136), rgba(0, 6, 124, 0.9));
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-fluid.h-100 {
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.row.d-flex {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.col-md-8.col-lg-6.col-xl-4 {
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
}

.card {
    background: linear-gradient(135deg, rgb(0, 140, 255), rgba(0, 4, 255, 0.9));
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.card-body.p-4.p-md-5 {
    padding: 2.5rem !important;
}

.form-floating > .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.form-floating > label {
    color: #6c757d;
    padding: 1rem 0.75rem;
}

.btn-primary {
    background: linear-gradient(to right, rgb(140, 0, 255), rgb(0, 47, 255));
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.btn-primary:disabled {
    opacity: 0.7;
    transform: none;
}

.text-white-50 {
    transition: color 0.3s ease;
}

.text-white-50:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.text-center.mb-4 {
    margin-bottom: 2rem !important;
}

.text-center img {
    max-width: 200px;
    height: auto;
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid {
    border-color: #198754;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
}

.d-none {
    display: none !important;
}

/* Responsive */
@media (max-width: 576px) {
    .container-fluid.h-100 {
        padding: 15px !important;
    }
    
    .card-body.p-4.p-md-5 {
        padding: 1.5rem !important;
    }
    
    .card {
        max-width: 100%;
    }
    
    .text-center img {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .col-md-8.col-lg-6.col-xl-4 {
        max-width: 400px;
    }
}

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

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Estilos para el Modal de Registro */
.modal-content {
    background: linear-gradient(135deg, rgb(0, 140, 255), rgba(0, 4, 255, 0.95));
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    color: white;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
}

.modal-header .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #333;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

.modal-body .form-control:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    color: #333;
}

.modal-body .form-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.modal-body .invalid-feedback {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.modal-body .btn-primary {
    background: linear-gradient(to right, rgb(140, 0, 255), rgb(0, 47, 255));
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

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

.modal-body .btn-primary:disabled {
    opacity: 0.7;
    transform: none;
}

/* Ajustes para los alerts dentro del modal */
#registroModal .alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 1rem;
}

#registroModal .alert-success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

#registroModal .alert-danger {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Animación para el modal */
.modal.fade .modal-content {
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive para el modal */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
}

.g-recaptcha {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

@media (max-width: 576px) {
    .g-recaptcha {
        transform: scale(0.85) !important;
        transform-origin: center center !important;
        margin: -5px 0 !important;
    }
    
    .g-recaptcha > div {
        margin: 0 auto !important;
    }
}

@media (max-width: 420px) {
    .g-recaptcha {
        transform: scale(0.75) !important;
        transform-origin: center center !important;
        margin: -10px 0 !important;
    }
}

@media (max-width: 360px) {
    .g-recaptcha {
        transform: scale(0.65) !important;
        transform-origin: center center !important;
        margin: -15px 0 !important;
    }
}

@media (max-width: 576px) {
    .grecaptcha-badge {
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}