/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f8fafc;
    overflow-x: hidden;
}

/* Background Elements */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
    animation: float 8s ease-in-out infinite;
}

.bg-element-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -50px;
    animation-delay: 0s;
}

.bg-element-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -100px;
    animation-delay: 2s;
}

.bg-element-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.nav-brand:hover {
    color: #3b82f6;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #1e40af;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 1100px;
    margin: 0 auto;
}

/* Form Section */
.login-form-section {
    padding: 3rem;
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.header-icon i {
    font-size: 2rem;
    color: white;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Alert Styles */
#alertContainer {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

.alert-error {
    background: #fee;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: #3b82f6;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f9fafb;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-error {
    color: #ef4444;
    font-size: 0.85rem;
    display: none;
    padding-left: 0.25rem;
}

.field-error.show {
    display: block;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-login, .btn-signup {
    width: 100%;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    right: 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.form-divider span {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Info Section */
.login-info-section {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    padding: 3rem;
    display: flex;
    align-items: center;
    color: white;
}

.info-content {
    width: 100%;
}

.info-header {
    margin-bottom: 2.5rem;
}

.info-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.info-header p {
    font-size: 1.05rem;
    opacity: 0.9;
}

.security-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.feature-icon i {
    font-size: 1.25rem;
}

.feature-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-content p {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.5;
}

.info-help {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-help h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.info-help p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-info-section {
        order: -1;
        padding: 2rem;
    }

    .security-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .nav-link span {
        display: none;
    }

    .login-form-section {
        padding: 2rem 1.5rem;
    }

    .form-header h1 {
        font-size: 1.5rem;
    }

    .header-icon {
        width: 60px;
        height: 60px;
    }

    .header-icon i {
        font-size: 1.5rem;
    }
}
