@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --accent: #38bdf8;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-focus: rgba(14, 165, 233, 0.2);
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}

/* Animated Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float 10s infinite alternate ease-in-out;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: rgba(14, 165, 233, 0.3);
    top: -100px;
    left: -100px;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: rgba(56, 189, 248, 0.2);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-30px) scale(1.1);
    }
}

/* Login Container (Glassmorphism) */
.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.login-container:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(14, 165, 233, 0.3);
}

/* Header & Logo */
.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-logo a:hover img {
    transform: scale(1.1) rotate(-3deg);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Form Styles */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.2rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-group input:focus {
    background: var(--input-focus);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.input-group input:focus+.input-icon,
.input-group:focus-within .input-icon {
    color: var(--primary);
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.forgot-pwd {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-pwd:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-login i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-login:hover i {
    transform: translateX(4px);
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Register link */
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    margin-left: 0.25rem;
}

.register-link a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Responsive constraints */
@media (max-width: 480px) {
    .login-container {
        padding: 2.5rem 1.75rem;
        margin: 1rem;
        border-radius: 20px;
    }

    .login-header h2 {
        font-size: 1.75rem;
    }

    .input-group input {
        font-size: 16px;
        /* Prevent iOS zoom */
        padding: 0.9rem 1rem 0.9rem 3rem;
    }
}