/* ==========================================================================
   Centro Hípico - Premium Login Stylesheet (Player Portal)
   ========================================================================== */

/* --- Reset & Base Config --- */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: #030F27;
    background-image: url('../images/fondo.avif');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* overlay background just like admin/player mix */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(3, 15, 39, 0.4) 0%, rgba(3, 15, 39, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

/* --- Main Layout Wrapper --- */
.login-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

/* --- Centered Card Container --- */
.login-card-container {
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.login-card {
    background: rgba(13, 27, 42, 0.7) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 44, 52, 0.15) !important;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(255, 44, 52, 0.1);
    text-align: left; /* clean align like admin */
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Card Header Components --- */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255, 44, 52, 0.2));
}

.login-logo h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    font-style: italic;
    margin: 8px 0 2px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.login-logo p {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

/* --- Form Styles --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mb-3 {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border-radius: 10px;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(10, 14, 23, 0.5);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #ff2c34;
    background-color: rgba(23, 28, 38, 0.8);
    box-shadow: 0 0 10px rgba(255, 44, 52, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #ff2c34;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #ffffff;
}

/* --- Submit Button --- */
.btn {
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 30px;
    border-radius: 10px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #ff2c34 0%, #c40a11 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 44, 52, 0.3) !important;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 44, 52, 0.45) !important;
    background: linear-gradient(135deg, #ff474e 0%, #d61118 100%) !important;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 44, 52, 0.2) !important;
}

.btn-icon {
    font-size: 13px;
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
    transform: translateX(3px);
}

/* --- In-page Alert Banner (Notification) --- */
.alert-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
    border: 1px solid transparent;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.alert-danger .alert-icon {
    color: #ef4444;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.alert-success .alert-icon {
    color: #10b981;
}

.alert-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-close {
    margin-left: auto;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
}

.ocultar {
    display: none !important;
}

/* --- Sponsor Footer --- */
.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    z-index: 2;
}

.login-footer img {
    height: 48px;
    object-fit: contain;
    opacity: 0.55;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-footer img:hover {
    opacity: 0.95;
    transform: scale(1.05);
}

/* --- Responsive Adaptations --- */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 20px 10px;
    }
    
    .login-card {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .login-logo h2 {
        font-size: 20px;
    }
    
    .login-footer {
        margin-top: 30px;
        gap: 16px;
    }

    .login-footer img {
        height: 38px;
    }
}