/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", Arial, sans-serif;
}

body {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #e3f2fd 25%,
        #29b6f6 75%,
        #0288d1 100%
    );
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
            circle at 20% 80%,
            rgba(255, 255, 255, 0.4) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(41, 182, 246, 0.2) 0%,
            transparent 50%
        );
    z-index: -1;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Logo and Title */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.center-title {
    font-size: 26px;
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(41, 182, 246, 0.15);
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

.login-header {
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 30%, #29b6f6 100%);
    padding: 25px;
}

.login-header h2 {
    color: #0277bd;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.login-body {
    padding: 35px 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.input-container {
    position: relative;
}

input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(41, 182, 246, 0.2);
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

input:focus {
    background: white;
    border-color: #29b6f6;
    box-shadow: 0 0 0 4px rgba(41, 182, 246, 0.1);
    outline: none;
    transform: translateY(-2px);
}

/* Login Button */
.login-button {
    background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(41, 182, 246, 0.4);
}

.login-button:active {
    transform: translateY(-1px);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Messages */
.error-message,
.success-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.4s ease-out;
}

.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.success-message {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Security Info */
.login-footer {
    margin-top: 25px;
    text-align: center;
}

.security-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(41, 182, 246, 0.2);
    color: #0277bd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
}

/* Footer */
.footer {
    margin-top: 30px;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.line-left,
.line-right {
    height: 2px;
    width: 80px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
}

.divider span {
    margin: 0 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

/* Toast Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast-notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastSlideIn 0.4s ease-out;
    border-left: 4px solid;
    min-width: 300px;
}

.toast-notification.toast-success {
    border-left-color: #2e7d32;
}

.toast-notification.toast-error {
    border-left-color: #c62828;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #333;
}

.toast-message {
    font-size: 14px;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: #666;
}

.toast-close:hover {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
    .center-title {
        font-size: 22px;
    }
    .login-body {
        padding: 25px 20px;
    }
    .logo {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .center-title {
        font-size: 18px;
    }
    .login-header h2 {
        font-size: 18px;
    }
    .login-body {
        padding: 20px 15px;
    }
    input,
    .login-button {
        padding: 12px 14px;
        font-size: 14px;
    }
}
