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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #7e8ba3 50%, #2a5298 75%, #1e3c72 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

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

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.login-gif {
    width: 100%;
    height: 200px;
    background: url('https://media.giphy.com/media/v1.Y2lkPTcZm2p4i4j2Rq/giphy.gif') center/cover;
    border-radius: 20px 20px 0 0;
    margin-bottom: 20px;
}

.login-content {
    padding: 40px;
}

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

.logo-section {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out 0.3s both;
}

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

.logo-section img.logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

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

.logo-section img.company-name {
    width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.logo-section img.company-name.full-width {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    display: block;
}

.login-form h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    animation: fadeIn 1s ease-out 0.5s both;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 1s ease-out 0.7s both;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    animation: fadeIn 1s ease-out 0.9s both;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

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

.copyright {
    text-align: center;
    margin-top: 20px;
    padding: 15px 0;
    font-size: 12px;
    color: #666;
    animation: fadeIn 1s ease-out 1.1s both;
}

.copyright a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Enhanced animated nature background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

@keyframes twinkle {
    0% { 
        transform: scale(0); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: scale(0); 
        opacity: 0; 
    }
}

/* Enhanced nature background animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.bg-animation::before {
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(46, 125, 50, 0.1) 0%, rgba(76, 175, 80, 0.05) 50%, transparent 70%);
    animation-delay: 0s;
}

.bg-animation::after {
    bottom: -50%;
    right: -50%;
    background: radial-gradient(circle, rgba(56, 142, 60, 0.1) 0%, rgba(139, 195, 74, 0.05) 50%, transparent 70%);
    animation-delay: 10s;
}

/* Additional nature elements */
.bg-animation .nature-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
}

.bg-animation .leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.6), rgba(139, 195, 74, 0.4));
    border-radius: 0 100% 0 100%;
    animation: fall 10s linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 0;
        margin: 20px;
    }
    
    .login-gif {
        height: 150px;
    }
    
    .login-content {
        padding: 30px 20px;
    }
    
    .logo-section img.logo {
        width: 80px;
        margin-bottom: 15px;
    }
    
    .logo-section img.company-name {
        width: 150px;
        margin-bottom: 20px;
    }
    
    .logo-section img.company-name.full-width {
        width: 100%;
        margin: 10px 0;
    }
}
