/* Using shared variables from style.css where possible */

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f8fafc;
    /* Specific Light White for Login Page */
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
    background: #fafafa;
    /* Specific Light White for Login Page in Light Mode */
    color: #1e293b;
}

/* Glassmorphism - Light White Background */
.glass {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.auth-card {
    border-radius: 24px;
    padding: 48px 40px;
    animation: slideUp 0.6s ease-out;
    margin-bottom: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section {
    margin-bottom: 24px;
}

.auth-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
    transition: filter 0.3s ease;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-dim);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-link,
.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover,
.terms-link:hover {
    color: var(--primary-hover);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #818cf8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
    position: relative;
    z-index: 1;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5);
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.divider span {
    background: #ffffff;
    padding: 0 16px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    width: 100%;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social svg {
    flex-shrink: 0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-dim);
    font-size: 14px;
}

.toggle-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.toggle-link:hover {
    color: var(--primary-hover);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(129, 140, 248, 0.1));
    animation: float 20s ease-in-out infinite;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.circle-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    75% {
        transform: translate(30px, 50px) scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 20px 0;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 14px;
    }

    .form-input {
        padding: 12px 14px;
    }

    .btn-submit,
    .btn-social {
        padding: 14px;
        font-size: 15px;
    }
}

/* Loading State */
.btn-submit:disabled,
.btn-social:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error Messages */
.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.form-group.error .form-input {
    border-color: var(--error-color);
}

.form-group.error .error-message {
    display: block;
}

/* Success Messages */
.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}