/* Login CSS - Estilo festivo para "De Fiesta en Fiesta" */

:root {
    --primary-color: #FF6B35;
    --secondary-color: #FFD166;
    --accent-color: #06D6A0;
    --tertiary-color: #83E85C;
    --coral-color: #EE6C4D;
    --text-dark: #4A4A4A;
    --text-light: #333333;
    --bg-light: #F2F2F2;
    --bg-white: #FFFFFF;
    --bg-secondary: #E0E0E0;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;
    --error-color: #EF4444;
    --success-color: #10B981;
}

/* Estilos para enlace de reenvío de verificación */
.resend-verification-link {
    color: var(--accent-color) !important;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
    padding: 5px 0;
}

.resend-verification-link:hover {
    color: var(--tertiary-color) !important;
    border-bottom-color: var(--tertiary-color);
    transform: translateY(-1px);
}

/* Body y Layout General */
body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.08"/><circle cx="20" cy="60" r="0.8" fill="white" opacity="0.06"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    z-index: 1;
    pointer-events: none;
}

/* Elementos flotantes decorativos */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.floating-circle:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 80%;
    right: 15%;
    animation-delay: 4s;
}

.floating-circle:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 1s;
}

.floating-circle:nth-child(5) {
    width: 50px;
    height: 50px;
    top: 70%;
    left: 20%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Container Principal */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Tarjeta de Login */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 50px 40px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--tertiary-color));
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0.1;
}

/* Header del Login */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-logo .logo-image {
    width: 80px;
    height: 80px;
}

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

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    opacity: 0.8;
}

/* Already Logged In Message */
.already-logged {
    background: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    border: none;
}

.already-logged a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.already-logged a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Form Styles */
.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 107, 53, 0.1);
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

/* Password field with eye icon */
.password-field {
    position: relative;
}

.password-input {
    padding-right: 50px; /* Espacio para el icono */
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

.password-toggle:focus {
    outline: 2px solid rgba(255, 107, 53, 0.3);
    outline-offset: 2px;
}

.password-toggle i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Checkbox Remember Me */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

/* Button Styles */
.btn-login {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::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;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4);
}

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

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

.btn-login:focus {
    outline: 3px solid rgba(255, 107, 53, 0.3);
    outline-offset: 2px;
}

/* Loading state */
.btn-login.loading {
    opacity: 0.8;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Links Adicionales */
.login-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Back to Home */
.back-home {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
        margin: 20px;
        max-width: 100%;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .back-home {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .floating-circle {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .form-control {
        padding: 12px 16px;
    }

    .btn-login {
        padding: 15px;
        font-size: 1rem;
    }
}

/* Animaciones de entrada */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-up {
    animation: slideUp 0.8s ease forwards;
}

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

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

/* Estados de validación */
.form-control.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.invalid-feedback {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}
