@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary: #db2777;
    --bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1e293b;
    --text-dim: #64748b;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #f1f5f9 0%, #f8fafc 100%);
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    filter: blur(60px);
    border-radius: 50%;
    opacity: 0.08;
    animation: move 20s infinite alternate;
}

@media (min-width: 768px) {
    .blob {
        width: 500px;
        height: 500px;
        filter: blur(80px);
    }
}

.blob-1 { top: -100px; left: -100px; animation-delay: 0s; }
.blob-2 { bottom: -100px; right: -100px; animation-delay: -5s; width: 600px; height: 600px; }
.blob-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation: moveCenter 25s infinite alternate; opacity: 0.1; }

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(100px, 100px) rotate(360deg); }
}

@keyframes moveCenter {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-40%, -60%) scale(1.1); }
    100% { transform: translate(-60%, -40%) scale(0.9); }
}

/* Login Container */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--card-shadow);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

@media (min-width: 640px) {
    .login-card {
        padding: 40px;
    }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    display: inline-block;
}

.login-card h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-dim);
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px 12px 48px;
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.form-group input:focus + i {
    color: var(--primary);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.error-msg {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 24px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.footer-links {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
