* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #87CEEB 0%, #4169E1 50%, #1E90FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.cloud:nth-child(1) {
    width: 100px;
    height: 40px;
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.cloud:nth-child(2) {
    width: 150px;
    height: 60px;
    top: 60%;
    left: -15%;
    animation-delay: -7s;
}

.cloud:nth-child(3) {
    width: 80px;
    height: 30px;
    top: 80%;
    left: -8%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(100vw) translateY(-20px);
    }
    50% {
        transform: translateX(100vw) translateY(0);
    }
    75% {
        transform: translateX(100vw) translateY(20px);
    }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(255, 255, 255, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-title {
    color: #2C5282;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #2C5282, #4169E1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: #64748B;
    font-size: 16px;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
    color: #2D3748;
}

.form-input:focus {
    border-color: #4169E1;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #A0AEC0;
    transition: opacity 0.3s ease;
}

.form-input:focus::placeholder {
    opacity: 0.7;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: #fff;
    border: 2px solid #E2E8F0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: #4169E1;
    transform: scale(1.05);
}

.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #4169E1, #1E90FF);
    border-color: #4169E1;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    color: #4A5568;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    color: #4169E1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #4169E1, #1E90FF);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #1E90FF;
}

.forgot-password:hover::after {
    width: 100%;
}

.login-button {
    background: linear-gradient(135deg, #4169E1 0%, #1E90FF 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-button::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: left 0.5s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(65, 105, 225, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 40px 30px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 28px;
    }

    .form-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .login-button {
        padding: 16px 20px;
        font-size: 15px;
    }

    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-button {
    background: #94A3B8;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.login-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-toggle {
    user-select: none;
    color: #6c757d;
    font-size: 14px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #495057;
}

.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link p {
    color: #666;
    font-size: 14px;
}

.register-button {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.register-button:hover {
    text-decoration: underline;
}

.register-button-alt {
    display: block;
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.register-button-alt:hover {
    background: #007bff;
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .login-message {
        padding: 12px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 8px;
        font-size: 12px;
    }
}