/* Login Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.modal-header {
    padding: 40px 40px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-logo span {
    letter-spacing: -0.5px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 32px 40px 40px;
}

/* Google Login Button */
.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.google-login-btn:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

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

.divider span {
    padding: 0 16px;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

/* Dark Mode Adjustments */
[data-theme="dark"] .google-login-btn {
    background: #2a2a2a;
    border-color: #404040;
    color: #fff;
}

[data-theme="dark"] .google-login-btn:hover {
    background: #333;
    border-color: #555;
}

/* Responsive */
@media (max-width: 500px) {
    .modal-content {
        width: 95%;
        border-radius: 12px;
    }

    .modal-header {
        padding: 32px 24px 20px;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-logo {
        font-size: 24px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .google-login-btn,
    .btn-submit {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* CSS Variables for Theme Support */
:root {
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --hover-bg: #f5f5f5;
    --input-bg: #ffffff;
}

[data-theme="dark"] {
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #404040;
    --hover-bg: #2a2a2a;
    --input-bg: #2a2a2a;
}