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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background: linear-gradient(-45deg, #e3f2fd, #bbdefb, #90caf9, #64b5f6);
    background-size: 400% 400%;
    animation: gradient 12s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 40px 0;
    font-family: 'Segoe UI', sans-serif;
    position: relative;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #6a89cc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a69bd;
}

/* Animated background elements */
.bg-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    bottom: -160px;
    animation: square 25s infinite;
    transition-timing-function: linear;
    border-radius: 50%;
}

.bg-bubbles li:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    width: 80px;
    height: 80px;
}

.bg-bubbles li:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 17s;
    width: 60px;
    height: 60px;
}

.bg-bubbles li:nth-child(3) {
    left: 25%;
    animation-delay: 4s;
}

.bg-bubbles li:nth-child(4) {
    left: 40%;
    animation-delay: 0s;
    animation-duration: 22s;
    width: 70px;
    height: 70px;
}

.bg-bubbles li:nth-child(5) {
    left: 70%;
    animation-delay: 3s;
}

.bg-bubbles li:nth-child(6) {
    left: 80%;
    animation-delay: 2s;
    width: 90px;
    height: 90px;
}

.bg-bubbles li:nth-child(7) {
    left: 32%;
    animation-delay: 6s;
    width: 50px;
    height: 50px;
}

.bg-bubbles li:nth-child(8) {
    left: 55%;
    animation-delay: 8s;
    animation-duration: 18s;
    width: 65px;
    height: 65px;
}

.bg-bubbles li:nth-child(9) {
    left: 25%;
    animation-delay: 9s;
    animation-duration: 20s;
    width: 75px;
    height: 75px;
}

.bg-bubbles li:nth-child(10) {
    left: 90%;
    animation-delay: 11s;
    width: 45px;
    height: 45px;
}

@keyframes square {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 10%;
    }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    max-width: 450px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    background: linear-gradient(to right, #6a89cc, #4a69bd);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(30deg);
    animation: shine 6s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.login-body {
    padding: 30px;
}

.form-control {
    padding: 12px 20px 12px 45px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.2);
    border-color: #4a69bd;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 13px;
    color: #4a69bd;
    transition: all 0.3s ease;
}

.form-control:focus + i {
    color: #1e3799;
    transform: scale(1.1);
}

.btn-login {
    background: linear-gradient(to right, #6a89cc, #4a69bd);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    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: 0.5s;
}

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

.btn-login:hover {
    background: linear-gradient(to right, #5a79bc, #3a59ad);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 105, 189, 0.4);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 30px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.logo i {
    background: white;
    color: #4a69bd;
    border-radius: 50%;
    padding: 10px;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

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

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.facebook {
    background: #3b5998;
}

.google {
    background: #dd4b39;
}

.twitter {
    background: #1da1f2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
        align-items: flex-start;
    }
    
    .login-container {
        margin: 20px auto;
    }
    
    .login-body {
        padding: 20px;
    }
    
    .login-header {
        padding: 20px;
    }
    
    .form-control {
        padding: 10px 15px 10px 40px;
    }
    
    .input-icon i {
        left: 12px;
        top: 11px;
    }
    
    .remember-forgot {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}