@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

:root {
    /* Pollution-Themed Color Palette - Matching main styles */
    --charcoal-deep: #0A0A0A;
    --charcoal-black: #121212;
    --charcoal-dark: #1A1A1A;
    --soot-dark: #2A2A2A;
    --soot-medium: #3A3A3A;
    --iron-grey: #4A4A4A;
    --iron-grey-light: #5A5A5A;
    --rust-orange: #C85A2D;
    --rust-orange-light: #D9734A;
    --rust-orange-dark: #A84A1F;
    --acid-yellow-green: #B8D433;
    --acid-yellow-green-light: #C9E44A;
    --acid-yellow-green-dark: #9FB82A;
    --moss-green: #6B8E5A;
    --moss-green-light: #7FA66B;
    --moss-green-dark: #5A7549;
    --smog-blue: #5A6B7A;
    --smog-blue-light: #6B7C8A;
    --smog-blue-dark: #4A5A6A;
    --text-light: #E8E8E8;
    --text-medium: #B0B0B0;
    --text-dark: #808080;
    --placeholder: #6B7280;
    --input-bg: #2A2A2A;
    --input-text: #E8E8E8;
    --input-border: #3A3A3A;
    
    /* Legacy compatibility */
    --accent-color: var(--smog-blue);
    --accent-color-light: var(--smog-blue-light);
    --accent-color-lighter: var(--smog-blue-light);
    --black: var(--charcoal-black);
    --black-light: var(--charcoal-dark);
    --black-lighter: var(--soot-dark);
    --card-bg: var(--soot-dark);
    --dark-brown: var(--soot-dark);
    --dark-brown-light: var(--soot-medium);
    --dark-brown-lighter: var(--iron-grey);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--black-lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color-light);
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-light);
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior-y: none;
    background: var(--charcoal-deep);
}

/* Animated Background - Industrial Theme */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(
        135deg,
        var(--charcoal-deep) 0%,
        var(--charcoal-black) 20%,
        var(--charcoal-dark) 40%,
        var(--soot-dark) 60%,
        var(--charcoal-dark) 80%,
        var(--charcoal-black) 100%
    );
    background-size: 400% 400%;
    animation: carbonGradientShift 30s ease infinite;
}

/* Smoke Plumes Effect - Enhanced */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 30%, rgba(200, 90, 45, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(90, 107, 122, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(184, 212, 51, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 30% 80%, rgba(42, 42, 42, 0.12) 0%, transparent 55%);
    animation: smokeRise 35s ease-in-out infinite;
    opacity: 0.15;
    filter: blur(2px);
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 0;
    animation: fadeInUp 0.5s ease-out;
}

.login-card {
    background: var(--soot-dark);
    backdrop-filter: blur(12px);
    border: 1px solid var(--iron-grey);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card:hover {
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--iron-grey-light);
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 1.875rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 700;
    display: inline-block;
}

.logo h1 .logo-cal {
    color: var(--text-light);
    text-shadow: 0 0 8px rgba(232, 232, 232, 0.6);
}

.logo h1 .logo-carbo {
    color: var(--accent-color-lighter);
    text-shadow: 0 0 8px rgba(90, 106, 124, 0.6);
}

.logo h1::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    margin-top: 5px;
    opacity: 0.7;
}

.logo p {
    color: var(--text-medium);
    font-size: 0.95em;
    font-weight: 400;
}

.auth-form h2 {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.875rem;
    text-align: center;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--smog-blue);
    box-shadow: 
        0 0 0 3px rgba(90, 107, 122, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    background: var(--soot-medium);
}

.form-group input:hover {
    border-color: var(--iron-grey-light);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--smog-blue) 0%, var(--smog-blue-dark) 100%);
    color: var(--text-light);
    border: 1px solid var(--iron-grey);
    padding: 14px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(90, 107, 122, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, var(--smog-blue-light) 0%, var(--smog-blue) 100%);
    border-color: var(--iron-grey-light);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--soot-medium);
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-medium);
}

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

.divider span {
    padding: 0 15px;
    font-size: 0.9em;
}

.btn-google {
    width: 100%;
    background: var(--input-bg);
    color: var(--input-text);
    border: 2px solid var(--dark-brown-light);
    padding: 14px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Inter', 'Nunito', system-ui, sans-serif;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-medium);
    font-size: 0.95em;
}

.form-footer a {
    color: var(--accent-color-lighter);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--accent-color-light);
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    max-width: 400px;
    border: 1px solid rgba(58, 74, 92, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.4s ease-out;
}

.toast.success {
    background: rgba(34, 197, 94, 0.9);
}

.toast.error {
    background: rgba(244, 67, 54, 0.9);
}

.toast.warning {
    background: rgba(255, 152, 0, 0.9);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: carbonSpin 1s linear infinite;
}

/* Animations */
@keyframes carbonGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes smokeRise {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.15;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes carbonSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.auth-form {
    animation: fadeIn 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 500px) {
    .login-card {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }
}
