* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 120px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-text {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.welcome-text h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.welcome-text p {
    font-size: 16px;
    color: #718096;
}

.login-form {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.input-group {
    margin-bottom: 24px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.input-wrapper.focused {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-icon {
    width: 20px;
    height: 20px;
    color: #a0aec0;
    margin-left: 16px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.input-wrapper.focused .input-icon {
    color: #667eea;
}

.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 16px 16px 12px;
    font-size: 15px;
    color: #2d3748;
    background: transparent;
}

.input-wrapper input::placeholder {
    color: #a0aec0;
}

.toggle-password {
    background: none;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.toggle-password:hover {
    transform: scale(1.1);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    color: #a0aec0;
    transition: color 0.3s ease;
}

.toggle-password:hover svg {
    color: #667eea;
}

.error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 8px;
    margin-left: 4px;
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-alert svg {
    width: 20px;
    height: 20px;
    color: #e53e3e;
    flex-shrink: 0;
}

.error-alert span {
    color: #c53030;
    font-size: 14px;
    flex: 1;
}

.success-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    animation: slideDown 0.4s ease;
}

.success-alert svg {
    width: 20px;
    height: 20px;
    color: #38a169;
    flex-shrink: 0;
}

.success-alert span {
    color: #2f855a;
    font-size: 14px;
    flex: 1;
}

.register-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    margin-right: 10px;
}

.register-link:hover {
    color: #764ba2;
    background: #f7fafc;
}

.register-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.register-link:hover svg {
    transform: scale(1.1);
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-button:active {
    transform: translateY(0);
}

.login-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.login-button:hover svg {
    transform: translateX(4px);
}

.footer-links {
    margin-top: 30px;
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.5s both;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.back-link:hover {
    color: #667eea;
    background: #f7fafc;
}

.back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.back-link:hover svg {
    transform: translateX(-4px);
}

/* Responsive Design */
@media (max-width: 600px) {
    .login-container {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .welcome-text h1 {
        font-size: 26px;
    }

    .welcome-text p {
        font-size: 14px;
    }

    .logo {
        width: 100px;
    }

    .input-wrapper input {
        font-size: 14px;
        padding: 14px 14px 14px 10px;
    }

    .login-button {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    body {
        padding: 15px;
    }

    .login-container {
        padding: 30px 20px;
    }

    .welcome-text h1 {
        font-size: 24px;
    }
}