/* Modern Professional Login Page Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #3b82f6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --error: #ef4444;
    --success: #10b981;
    --border: #475569;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* Animated background effect */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-container h2:first-of-type {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    margin-bottom: 4px;
}

.login-container h2:last-of-type {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

form {
    margin-top: 24px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    margin: 12px 0;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-secondary);
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 
        0 0 0 3px rgba(16, 185, 129, 0.1),
        0 4px 12px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

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;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #047857);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message[style*="color: red"],
.message[style*="color: rgb(219, 38, 38)"] {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5 !important;
}

.message[style*="color: green"] {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7 !important;
}

/* Loading state */
button.loading {
    background: linear-gradient(135deg, var(--secondary-color), #2563eb);
    cursor: wait;
    pointer-events: none;
}

button.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 36px 28px;
        max-width: 90%;
        border-radius: 20px;
    }

    .login-container h2:first-of-type {
        font-size: 24px;
    }

    .login-container h2:last-of-type {
        font-size: 40px;
        margin-bottom: 24px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 12px 16px;
        font-size: 14px;
    }

    button {
        padding: 12px;
        font-size: 15px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .login-container {
        max-width: 440px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}