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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1a1a1a;
    color: #e8eaed;
    min-height: 100vh;
}

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: #202124;
    border: 1px solid #3c4043;
    border-radius: 8px;
    padding: 48px 40px 36px;
    width: 100%;
    max-width: 450px;
}

.login-card:has(.picker-layout.active) {
    max-width: 700px;
}

.view {
    display: none;
    animation: fadeIn 0.2s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Typography */
h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 8px;
    color: #e8eaed;
}

.subtitle {
    text-align: center;
    color: #9aa0a6;
    font-size: 16px;
    margin-bottom: 32px;
}

.subtitle span {
    color: #e8eaed;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 13px 15px;
    font-size: 16px;
    border: 1px solid #5f6368;
    border-radius: 4px;
    background: transparent;
    color: #e8eaed;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #8ab4f8;
    border-width: 2px;
    padding: 12px 14px;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s;
    background: #202124;
    padding: 0 4px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #8ab4f8;
}

.input-group input:not(:focus):not(:placeholder-shown) + label {
    color: #9aa0a6;
}

/* Error Message */
.error-message {
    color: #f28b82;
    font-size: 12px;
    margin-top: -16px;
    margin-bottom: 16px;
    display: none;
}

.error-message.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #f28b82;
    color: #202124;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

/* Links */
.forgot-link {
    margin-bottom: 24px;
}

.forgot-link a {
    color: #8ab4f8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link a:hover {
    text-decoration: underline;
}

/* Button Row */
.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
}

.create-account,
.back-link {
    color: #8ab4f8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
}

.create-account:hover,
.back-link:hover {
    text-decoration: underline;
}

.btn-next {
    background: #8ab4f8;
    color: #202124;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-next:hover {
    background: #aecbfa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.btn-next:disabled {
    background: #5f6368;
    cursor: not-allowed;
}

/* Account Picker - Two Column Layout */
.picker-layout {
    display: none;
}

.picker-layout.active {
    display: flex;
    gap: 48px;
}

.picker-left {
    flex: 0 0 200px;
}

.picker-left h1 {
    text-align: left;
    font-size: 22px;
    margin-bottom: 8px;
}

.picker-left .subtitle {
    text-align: left;
    margin-bottom: 0;
}

.picker-left .subtitle span {
    color: #8ab4f8;
    font-weight: 500;
}

.picker-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    border-radius: 8px;
}

.picker-right {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
}

/* Account Picker Items */
.accounts-list {
    margin: 0;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 0 -16px;
    cursor: pointer;
    border-radius: 20px;
    margin: 4px 0;
    transition: background 0.15s;
}

.account-item:hover {
    background: #3c4043;
}

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #f093fb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: white;
    margin-right: 16px;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-size: 14px;
    color: #e8eaed;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 12px;
    color: #9aa0a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 20px;
    margin-top: 8px;
}

.account-option:hover {
    background: #3c4043;
}

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: #9aa0a6;
}

.account-option span {
    font-size: 14px;
    color: #e8eaed;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.language-select {
    background: transparent;
    border: none;
    color: #9aa0a6;
    font-size: 12px;
    cursor: pointer;
    padding: 8px;
}

.language-select:focus {
    outline: none;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #9aa0a6;
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    color: #e8eaed;
}

/* Loading state */
.btn-next.loading {
    position: relative;
    color: transparent;
}

.btn-next.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #202124;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 24px;
        border: none;
        border-radius: 0;
        min-height: auto;
    }

    .footer {
        flex-direction: column;
        gap: 16px;
    }
}
