:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(17, 25, 40, 0.55);
    --card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Background Glowing Blobs / Wallpaper */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background-size: cover;
    background-position: center;
}

.wallpaper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: rgba(11, 15, 25, 0.75);
    display: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.22;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: 5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* Login Card Wrapper */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    z-index: 10;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(99, 102, 241, 0.05);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(99, 102, 241, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(99, 102, 241, 0.3); }
}

.logo-wrapper i {
    width: 32px;
    height: 32px;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Form Fields */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
    transition: color var(--transition-speed);
}

.password-wrapper input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    transition: all var(--transition-speed);
}

.password-wrapper input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.password-wrapper:focus-within .input-icon {
    color: #818cf8;
}

/* Checkbox Style */
.checkbox-field {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all var(--transition-speed);
}

.checkbox-label:hover input ~ .custom-checkbox {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
}

.checkbox-label input:checked ~ .custom-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.custom-checkbox:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .custom-checkbox:after {
    display: block;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
    font-size: 0.85rem;
    animation: shake 0.4s ease;
}

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

.error-message i {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    transition: all var(--transition-speed);
}

.btn-login:hover {
    background: var(--primary-hover);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

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

.btn-login i {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform var(--transition-speed);
}

.btn-login:hover i {
    transform: translateX(3px);
}
