

body {
    margin: 0;
    padding: 0;
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Google-style auth container */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e5e9;
    padding: 0;
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    text-align: left;
    position: relative;
    transition: box-shadow 0.2s ease;
    display: flex;
    overflow: hidden;
}

.modal-content:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1), 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Left sidebar for account list */
.account-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e1e5e9;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-header {
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 16px;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.sidebar-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.account-list {
    flex: 1;
    overflow-y: auto;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    margin: 0 16px 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    position: relative;
    width: calc(100% - 32px);
    text-align: left;
}

.account-item:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

.account-item.active {
    background: #e8f0fe;
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.account-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    border: 2px solid #e1e5e9;
}

.account-item-info h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.account-item-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.add-account-btn {
    margin: 16px 24px 0 24px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-account-btn:hover {
    background: #f8f9fa;
    border-color: #1557b0;
    color: #1557b0;
}

/* Right content area */
.main-content {
    flex: 1;
    padding: 48px 40px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.main-content.show {
    display: flex;
}

/* Welcome area for when no form is shown */
.welcome-area {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    /* Show by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.03) 0%, rgba(26, 115, 232, 0.08) 100%);
}

.welcome-area.hidden {
    display: none;
}

.welcome-logo {
    margin-bottom: 32px;
    position: relative;
}

.welcome-logo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: drop-shadow(0 8px 16px rgba(26, 115, 232, 0.15));
}

.welcome-logo::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-logo:hover::before {
    opacity: 1;
}

.welcome-logo:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.welcome-content h1 {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.welcome-content p {
    font-size: 16px;
    color: #5f6368;
    margin: 0 0 40px 0;
    line-height: 1.4;
    max-width: 300px;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.btn-welcome {
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-welcome-primary {
    background: #1a73e8;
    border: none;
    color: white;
}

.btn-welcome-primary:hover {
    background: #1557b0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-welcome-secondary {
    background: transparent;
    border: 1px solid #dadce0;
    color: #1a73e8;
}

.btn-welcome-secondary:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.logo-container {
    margin-bottom: 16px;
}

.logo-container img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    box-shadow: none;
    transition: none;
}

.logo-container img:hover {
    transform: none;
}

.main-content h1 {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 16px 0 0 0;
    letter-spacing: 0;
    line-height: 1.3333;
}

.main-content .subtitle {
    font-size: 16px;
    color: #5f6368;
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.3333;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

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

.main-content input {
    width: 100%;
    padding: 16px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #ffffff;
    color: #202124;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.main-content input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.main-content input::placeholder {
    color: #999;
    font-weight: 400;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #1a73e8;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
}

.btn-primary:hover {
    background: #1557b0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-primary:active {
    background: #1557b0;
}

.btn-primary:disabled {
    background: #f1f3f4;
    color: #9aa0a6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    width: 100%;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 12px;
    min-height: 36px;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    color: #1557b0;
}

.security-notice {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 4px;
    padding: 12px;
    margin-top: 24px;
    font-size: 12px;
    color: #5f6368;
    line-height: 1.3333;
    text-align: left;
}

.security-notice .warning-icon {
    color: #ea4335;
    margin-right: 8px;
    font-size: 14px;
}

.profile-section {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    border: 1px solid #e8eaed;
}

.profile-section img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: none;
}

.profile-info h3 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.profile-info p {
    margin: 0;
    font-size: 12px;
    color: #5f6368;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.button-group button {
    flex: 1;
}

/* Loading Spinner Overlay Styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #B399D4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
    }

    .account-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
        padding: 24px 0;
    }

    .main-content {
        padding: 32px 24px 24px 24px;
    }

    .main-content.show {
        display: flex;
    }

    .welcome-area {
        padding: 32px 24px;
    }

    .welcome-content h1 {
        font-size: 24px;
    }

    .welcome-logo img {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 20px 16px;
    }

    .modal-content {
        padding: 0;
        max-width: 100%;
    }

    .main-content h1 {
        font-size: 22px;
    }

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

/* Animation for smooth transitions */
.modal-content * {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus styles for accessibility */
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #B399D4;
    outline-offset: 2px;
}

.modal-content input:focus {
    outline: none;
}