/* Login Page Styles */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Animated Particles Background */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particles-bg::before,
.particles-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.particles-bg::before {
    background: radial-gradient(circle, #667eea, transparent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.particles-bg::after {
    background: radial-gradient(circle, #f093fb, transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -100px) scale(1.1); }
    66% { transform: translate(-100px, 100px) scale(0.9); }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    perspective: 1000px;
}

/* Login Card with 3D Effect */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 48px 40px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardEntry 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(-15deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.login-card:hover {
    transform: translateY(-5px);
}

/* Logo Animation */
.logo-container {
    text-align: center;
    margin-bottom: 32px;
    animation: logoEntry 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

@keyframes logoEntry {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.login-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Title */
.login-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.login-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 14px;
    animation: fadeInUp 0.6s ease 0.5s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form */
.login-form {
    animation: fadeInUp 0.6s ease 0.6s backwards;
}

/* Floating Label Input */
.input-group {
    position: relative;
    margin-bottom: 28px;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-bottom-color: #fff;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -8px;
    font-size: 12px;
    color: white;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
}

.input-group input:focus ~ .input-line {
    width: 100%;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn .btn-text {
    position: relative;
    z-index: 1;
}

.login-btn .btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.login-btn.loading .btn-loader {
    display: block;
}

.login-btn.loading .btn-text {
    opacity: 0.7;
}

/* Error Message */
.error-message {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px;
        width: 95vw;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
}
