/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a; /* Fallback */
    background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    color: #e2e8f0;
}

/* Improved Background with animated particles */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-shapes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(210, 187, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(210, 187, 251, 0.1) 0%, transparent 50%);
    animation: gradientShift 10s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(210, 187, 251, 0.1), rgba(210, 187, 251, 0.05));
    animation: float 10s ease-in-out infinite;
    backdrop-filter: blur(2px);
    box-shadow: 0 0 40px rgba(210, 187, 251, 0.1);
}

.shape-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    top: 20%;
    right: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: -50px;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    33% {
        transform: translateY(-20px) rotate(120deg) scale(1.05);
    }
    66% {
        transform: translateY(20px) rotate(240deg) scale(0.95);
    }
}

/* Enhanced Login Container */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
}

/* Enhanced Login Card */
.login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(210, 187, 251, 0.5), transparent);
}

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

/* Enhanced Login Header */
.login-header {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 42px;
    font-weight: 800;
    color: #d2bbfb;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(210, 187, 251, 0.3);
}

.logo i {
    font-size: 48px;
    color: #d2bbfb;
    filter: drop-shadow(0 0 10px rgba(210, 187, 251, 0.5));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.login-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #94a3b8;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 500;
}

.feature-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(210, 187, 251, 0.1);
    color: #d2bbfb;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid rgba(210, 187, 251, 0.2);
}

/* Enhanced Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-left: 4px;
}

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

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #d2bbfb;
    box-shadow: 0 0 0 4px rgba(210, 187, 251, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
}

.input-wrapper input::placeholder {
    color: #64748b;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    font-size: 16px;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #d2bbfb;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
    padding: 4px;
}

.toggle-password:hover {
    color: #d2bbfb;
}

/* Error Messages */
.error-message {
    font-size: 13px;
    color: #f87171;
    margin-top: 4px;
    margin-left: 4px;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #94a3b8;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #475569;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(15, 23, 42, 0.5);
}

.checkbox-wrapper:hover .checkmark {
    border-color: #64748b;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #d2bbfb;
    border-color: #d2bbfb;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #1e1b4b;
    font-size: 10px;
}

.forgot-password {
    color: #d2bbfb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.forgot-password:hover {
    color: #e9d5ff;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: #d2bbfb;
    color: #1e1b4b;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(210, 187, 251, 0.2);
}

.login-btn:hover {
    background: #e9d5ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(210, 187, 251, 0.3);
}

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

.btn-loader {
    display: none;
}

.login-btn.loading .btn-text {
    visibility: hidden;
}

.login-btn.loading .btn-loader {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.login-divider span {
    background: rgba(30, 41, 59, 0.8); /* Match card bg roughly */
    padding: 0 16px;
    color: #64748b;
    font-size: 14px;
    position: relative;
    border-radius: 4px;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover:not(:disabled) {
    border-color: #d2bbfb;
    background: rgba(210, 187, 251, 0.1);
    color: #fff;
}

.social-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.google-btn i {
    color: #fff;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    color: #64748b;
    font-size: 12px;
}

/* Alert Container */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: alertSlideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert.success {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.alert.error {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

.alert.warning {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
    .login-card {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px;
    }
    
    .login-header {
        text-align: center;
        align-items: center;
    }
    
    .feature-list {
        display: none;
    }
    
    .subtitle {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
}
