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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --bg-dark: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --error-color: #ef4444;
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Ambient Animated Background Shapes */
.background-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out alternate;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.glow-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 20s;
    animation-delay: -10s;
}

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

/* Container & Glassmorphic Card */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 10;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 30px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-area {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), #ec4899);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.logo-area svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.card-header h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(to right, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Input Fields & Forms */
.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

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

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(95deg, var(--primary-color), var(--primary-hover));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
}

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

/* Loading State */
.btn-submit.loading {
    background: var(--primary-hover);
    pointer-events: none;
}

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

.btn-submit.loading .spinner {
    display: block;
}

.btn-submit.loading .btn-text {
    opacity: 0.8;
}

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

/* Notification/Toast Alert */
.alert-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(17, 24, 39, 0.9);
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.alert-toast.success {
    border-left-color: var(--success-color);
}

.alert-toast.show {
    transform: translateY(0);
}

.toast-icon {
    display: flex;
    align-items: center;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

/* Footer info */
.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}
