/**
 * RYO Platform - Login Page Futuristic Design
 * Diseño 3D innovador con vórtice de energía y pantalla cristalina
 */

/* Variables CSS para el tema futurista */
:root {
    --primary-blue: #F26522;
    --electric-blue: #F26522;
    --energy-orange: #F26522;
    --crystal-white: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --shadow-glow: rgba(242, 101, 34, 0.3);
    --vortex-glow: rgba(242, 101, 34, 0.6);
    --gradient-bg: linear-gradient(135deg, #0D0D0D 0%, #1a1a1a 50%, #0D0D0D 100%);
}

/* Reset específico para login */
.login-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
.login-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(242, 101, 34, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px var(--electric-blue));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--electric-blue);
    text-shadow: 0 0 20px rgba(242, 101, 34, 0.5);
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.header-nav .nav-link:hover {
    color: var(--electric-blue);
    background: rgba(242, 101, 34, 0.1);
    border-color: rgba(242, 101, 34, 0.3);
    box-shadow: 0 0 20px rgba(242, 101, 34, 0.2);
}

/* Main Content */
.login-main {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

/* 3D Scene Background */
.scene-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 1000px;
}

/* Energy Vortex */
.energy-vortex {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
}

.vortex-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    z-index: 10;
}

.logo-energy {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px var(--energy-orange)) 
            drop-shadow(0 0 60px var(--energy-orange))
            brightness(1.2);
    animation: energyPulse 3s ease-in-out infinite;
}

.vortex-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid var(--electric-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
}

.ring-1 {
    width: 150px;
    height: 150px;
    animation: vortexSpin 8s linear infinite;
    box-shadow: 0 0 20px var(--electric-blue);
}

.ring-2 {
    width: 200px;
    height: 200px;
    animation: vortexSpin 12s linear infinite reverse;
    box-shadow: 0 0 30px var(--electric-blue);
    opacity: 0.4;
}

.ring-3 {
    width: 250px;
    height: 250px;
    animation: vortexSpin 16s linear infinite;
    box-shadow: 0 0 40px var(--electric-blue);
    opacity: 0.3;
}

.ring-4 {
    width: 300px;
    height: 300px;
    animation: vortexSpin 20s linear infinite reverse;
    box-shadow: 0 0 50px var(--electric-blue);
    opacity: 0.2;
}

.ring-5 {
    width: 350px;
    height: 350px;
    animation: vortexSpin 24s linear infinite;
    box-shadow: 0 0 60px var(--electric-blue);
    opacity: 0.1;
}

/* Holographic Data Flows */
.data-flows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.data-stream {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
    height: 2px;
    opacity: 0.6;
    animation: dataFlow 4s ease-in-out infinite;
}

.stream-1 {
    top: 20%;
    left: 0;
    width: 60%;
    animation-delay: 0s;
}

.stream-2 {
    top: 40%;
    right: 0;
    width: 50%;
    animation-delay: 1s;
    animation-direction: reverse;
}

.stream-3 {
    top: 60%;
    left: 0;
    width: 70%;
    animation-delay: 2s;
}

.stream-4 {
    top: 80%;
    right: 0;
    width: 45%;
    animation-delay: 3s;
    animation-direction: reverse;
}

.stream-5 {
    top: 30%;
    left: 20%;
    width: 40%;
    animation-delay: 1.5s;
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--electric-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--electric-blue);
    animation: particleFloat 6s ease-in-out infinite;
}

.particle-1 { top: 10%; left: 15%; animation-delay: 0s; }
.particle-2 { top: 25%; left: 80%; animation-delay: 1s; }
.particle-3 { top: 45%; left: 10%; animation-delay: 2s; }
.particle-4 { top: 65%; left: 85%; animation-delay: 3s; }
.particle-5 { top: 80%; left: 20%; animation-delay: 4s; }
.particle-6 { top: 30%; left: 90%; animation-delay: 5s; }
.particle-7 { top: 70%; left: 5%; animation-delay: 2.5s; }
.particle-8 { top: 50%; left: 95%; animation-delay: 1.5s; }

/* Crystalline Display Panel */
.crystal-panel {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    width: 300px;
    height: 200px;
    perspective: 1000px;
}

.panel-glass {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: rotateY(-15deg) rotateX(5deg);
    animation: panelFloat 4s ease-in-out infinite;
}

.growth-chart {
    position: relative;
    width: 80%;
    height: 60%;
    margin: 20% auto;
}

.chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue), var(--energy-orange));
    border-radius: 2px;
    box-shadow: 0 0 20px var(--electric-blue);
}

.chart-line::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue), var(--energy-orange));
    transform: rotate(15deg);
    box-shadow: 0 0 15px var(--electric-blue);
}

.chart-points {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--energy-orange);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--energy-orange);
    animation: pointPulse 2s ease-in-out infinite;
}

.point-1 { bottom: 0; left: 10%; animation-delay: 0s; }
.point-2 { bottom: 20px; left: 30%; animation-delay: 0.5s; }
.point-3 { bottom: 35px; left: 50%; animation-delay: 1s; }
.point-4 { bottom: 45px; left: 70%; animation-delay: 1.5s; }
.point-5 { bottom: 60px; left: 90%; animation-delay: 2s; }

.chart-glow {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 80px;
    background: radial-gradient(ellipse at center bottom, 
                               rgba(0, 212, 255, 0.3) 0%, 
                               transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

.watermark {
    position: absolute;
    bottom: 10px;
    right: 15px;
    opacity: 0.3;
}

.protech-logo {
    width: 40px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

.panel-reflection {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border-radius: 15px;
    opacity: 0.2;
    transform: scaleY(-1) translateY(20px);
    filter: blur(2px);
}

/* Login Form Container */
.login-container {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: 10%;
}

.login-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: formFloat 6s ease-in-out infinite;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    align-items: start;
}

.form-header {
    text-align: left;
    padding-right: 1rem;
    border-right: 1px solid rgba(242, 101, 34, 0.2);
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--electric-blue);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(242, 101, 34, 0.5);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.form-header h1 i {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--electric-blue));
}

.form-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--electric-blue);
    filter: drop-shadow(0 0 5px var(--electric-blue));
}

.form-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(242, 101, 34, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

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

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--electric-blue);
    background: rgba(242, 101, 34, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input:checked + .checkmark {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
    box-shadow: 0 0 10px rgba(242, 101, 34, 0.5);
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--electric-blue);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-shadow: 0 0 10px rgba(242, 101, 34, 0.8);
}

.login-btn {
    background: linear-gradient(135deg, #F26522, #D4541E);
    border: none;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 8px 25px rgba(242, 101, 34, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(242, 101, 34, 0.5);
    background: linear-gradient(135deg, #D4541E, #B8441A);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-footer p {
    color: rgba(255, 255, 255, 0.7);
}

.register-link {
    color: var(--electric-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.register-link:hover {
    text-shadow: 0 0 10px rgba(242, 101, 34, 0.8);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--electric-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Animations */
@keyframes energyPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 30px var(--energy-orange)) 
                drop-shadow(0 0 60px var(--energy-orange))
                brightness(1.2);
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        filter: drop-shadow(0 0 40px var(--energy-orange)) 
                drop-shadow(0 0 80px var(--energy-orange))
                brightness(1.4);
    }
}

@keyframes vortexSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px); opacity: 0.6; }
    50% { transform: translateY(-20px); opacity: 1; }
}

@keyframes panelFloat {
    0%, 100% { transform: rotateY(-15deg) rotateX(5deg) translateY(0px); }
    50% { transform: rotateY(-15deg) rotateX(5deg) translateY(-10px); }
}

@keyframes pointPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes formFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .energy-vortex {
        left: 25%;
        width: 300px;
        height: 300px;
    }
    
    .crystal-panel {
        right: 10%;
        width: 250px;
        height: 160px;
    }
    
    .login-container {
        margin-right: 5%;
    }
}

@media (max-width: 768px) {
    .login-main {
        padding: 100px 1rem 2rem;
    }
    
    .energy-vortex {
        left: 50%;
        top: 20%;
        width: 200px;
        height: 200px;
    }
    
    .crystal-panel {
        display: none;
    }
    
    .login-container {
        max-width: 100%;
        margin: 0;
    }
    
    .login-form-wrapper {
        padding: 2rem;
        margin: 0 1rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-header {
        border-right: none;
        border-bottom: 1px solid rgba(242, 101, 34, 0.2);
        padding-right: 0;
        padding-bottom: 1rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .header-nav {
        gap: 1rem;
    }
    
    .header-nav .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-form-wrapper {
        padding: 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
