* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Floating background elements */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

body::before {
    width: 300px;
    height: 300px;
    background: white;
    top: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    width: 200px;
    height: 200px;
    background: white;
    bottom: -50px;
    right: -50px;
    animation: float 8s ease-in-out infinite 2s;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

.login-header i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    animation: slideInRight 0.6s ease-out both;
}

.form-group:nth-child(1) {
    animation-delay: 0.3s;
}

.form-group:nth-child(2) {
    animation-delay: 0.4s;
}

.form-group:nth-child(3) {
    animation-delay: 0.5s;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    transition: color 0.3s;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    animation: slideInLeft 0.6s ease-out 0.5s both;
}

.remember-me input {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
}

.remember-me label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.remember-me:hover label {
    color: #4CAF50;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    animation: slideInRight 0.6s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    animation: fadeIn 0.6s ease-out 0.7s both;
}

.signup-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
}

.signup-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4CAF50;
    transition: width 0.3s;
}

.signup-link a:hover::after {
    width: 100%;
}

.signup-link a:hover {
    letter-spacing: 0.5px;
}

.back-home {
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.6s ease-out 0.8s both;
}

.back-home a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.back-home a:hover {
    gap: 10px;
    transform: translateX(-5px);
}

.back-home a i {
    transition: transform 0.3s;
}

.back-home a:hover i {
    transform: translateX(-3px);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
    animation: pulse 0.5s ease-out;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
    animation: pulse 0.5s ease-out;
}

/* Loading spinner */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 0.6s linear infinite;
}

/* Hide/show forms */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
}