/* Variables CSS */
:root {
    --primary-orange: #ff6b35;
    --primary-red: #d32f2f;
    --primary-yellow: #ffcc00;
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #d32f2f 100%);
    --gradient-secondary: linear-gradient(135deg, #ffcc00 0%, #ff9800 100%);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

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

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

.element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.element-3 {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.element-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 70%;
    animation-delay: 1s;
}

.element-5 {
    width: 50px;
    height: 50px;
    top: 70%;
    left: 60%;
    animation-delay: 3s;
}

.element-6 {
    width: 70px;
    height: 70px;
    top: 40%;
    left: 5%;
    animation-delay: 5s;
}

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

/* Overlay de fondo */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.02);
    z-index: 2;
}

/* Botón volver */
.back-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    animation: slideInLeft 0.5s ease-out;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 50%;
    color: var(--primary-orange);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: var(--primary-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    text-decoration: none;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contenedor principal */
.main-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.8s ease-out;
    text-align: center;
}

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

/* Sección del logo */
.logo-section {
    margin-bottom: 40px;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

.chef-icon {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    animation: bounce 2s ease-in-out infinite;
}

.chef-icon i {
    font-size: 2.5rem;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.brand-section {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.brand-subtitle {
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* Formulario */
.login-form {
    margin-bottom: 30px;
}

.input-group-modern {
    margin-bottom: 25px;
    animation: slideInRight 0.6s ease-out both;
}

.input-group-modern:nth-child(1) { animation-delay: 0.4s; }
.input-group-modern:nth-child(2) { animation-delay: 0.5s; }

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--primary-orange);
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.modern-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

.modern-input:focus {
    border-color: var(--primary-orange);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.modern-input:focus ~ .input-icon {
    color: var(--primary-orange);
    transform: scale(1.1);
}

.modern-input:focus ~ .input-line {
    width: 100%;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 15px 15px;
    transition: width 0.3s ease;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 2;
    padding: 5px;
    border-radius: 50%;
}

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

/* Botón de login */
.login-button {
    width: 100%;
    padding: 15px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    animation: slideInUp 0.6s ease-out 0.6s both;
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
}

.login-button:active {
    transform: translateY(-1px);
}

.button-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.button-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-button.ripple-active .button-ripple {
    width: 300px;
    height: 300px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-button.loading .loading-spinner {
    opacity: 1;
}

.login-button.loading .button-text {
    opacity: 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enlaces del formulario */
.form-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeIn 0.6s ease-out 0.7s both;
}

.form-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 8px;
}

.form-link:hover {
    color: var(--primary-red);
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.link-separator {
    color: #ccc;
    font-weight: 300;
}

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

/* Footer */
.footer-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    animation: fadeIn 0.6s ease-out 0.8s both;
}

.copyright {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Modales modernos */
.modern-modal {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease-out;
}

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

.gradient-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 20px 30px;
}

.gradient-header .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modern-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Pestañas personalizadas */
.custom-tabs {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-button.active {
    background: white;
    color: var(--primary-orange);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-button:hover:not(.active) {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-orange);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* Inputs flotantes */
.floating-label-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-input, .floating-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.floating-input:focus, .floating-select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.floating-label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #999;
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 5px;
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label,
.floating-select:focus + .floating-label,
.floating-select:not([value=""]) + .floating-label {
    top: -8px;
    left: 12px;
    font-size: 0.8rem;
    color: var(--primary-orange);
    font-weight: 600;
}

/* Aviso de contraseña */
.password-notice {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-orange);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-top: 20px;
}

/* Footer del modal */
.gradient-footer {
    background: #f8f9fa;
    border: none;
    padding: 20px 30px;
}

.modern-btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.gradient-btn {
    background: var(--gradient-primary);
    color: white;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Modal de recuperación */
.recovery-info {
    text-align: center;
    margin-bottom: 25px;
}

.recovery-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    animation: bounce 2s ease-in-out infinite;
}

.recovery-icon i {
    font-size: 2rem;
    color: white;
}

.recovery-info p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.recovery-button {
    width: 100%;
    padding: 15px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.recovery-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .form-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .link-separator {
        display: none;
    }
    
    .floating-element {
        display: none;
    }
    
    .back-button-container {
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }
    
    .chef-icon {
        width: 60px;
        height: 60px;
    }
    
    .chef-icon i {
        font-size: 2rem;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
}