* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    background-color: #fff;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 40px 24px;
}

/* Google G Logo */
.google-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

/* Title */
h1 {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #202124;
    line-height: 1.35;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: center;
}

/* Steps */
.step {
    display: none;
    width: 100%;
    max-width: 320px;
}

.step.active {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Input Field */
.input-container {
    position: relative;
    margin-bottom: 4px;
}

.input-field {
    width: 100%;
    height: 54px;
    padding: 13px 15px;
    padding-top: 22px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    color: #202124;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.1s;
}

.input-field:hover {
    border-color: #bdc1c6;
}

.input-field:focus {
    border-color: #1a73e8;
    border-width: 2px;
    padding: 12px 14px;
    padding-top: 21px;
}

.input-label {
    position: absolute;
    left: 16px;
    top: 17px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    color: #5f6368;
    background: #fff;
    padding: 0 2px;
    pointer-events: none;
    transition: all 0.1s ease-out;
}

.input-field:focus + .input-label,
.input-field.has-value + .input-label {
    top: -8px;
    font-size: 12px;
    color: #1a73e8;
}

.input-field:not(:focus).has-value + .input-label {
    color: #5f6368;
}

/* Error State */
.input-container.error .input-field {
    border-color: #d93025;
    border-width: 2px;
    padding: 12px 14px;
    padding-top: 21px;
}

.input-container.error .input-label,
.input-container.error .input-field:focus + .input-label {
    color: #d93025;
}

.error-message {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    padding-left: 2px;
}

.error-message svg {
    width: 16px;
    height: 16px;
    fill: #d93025;
    flex-shrink: 0;
    margin-top: 1px;
}

.error-message span {
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    color: #d93025;
    line-height: 1.4;
}

.input-container.error + .error-message {
    display: flex;
}

/* Forgot email link */
.forgot-link {
    display: inline-block;
    margin-top: 16px;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
}

.btn {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.25px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.1s, box-shadow 0.1s;
}

.btn-text {
    background: transparent;
    color: #1a73e8;
    padding: 9px 8px;
    margin-left: -8px;
    text-decoration: none;
}

.btn-text:hover {
    background: rgba(26, 115, 232, 0.04);
}

.btn-filled {
    background: #1a73e8;
    color: #fff;
    padding: 9px 24px;
    min-width: 80px;
}

.btn-filled:hover {
    background: #1765cc;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.15);
}

.btn-filled:active {
    background: #1557b0;
}

.btn-outlined {
    background: #fff;
    color: #1a73e8;
    padding: 8px 23px;
    border: 1px solid #dadce0;
}

.btn-outlined:hover {
    background: #f6fafe;
    border-color: #d2e3fc;
}

.btn-full {
    width: 100%;
    padding: 9px 24px;
    margin-bottom: 12px;
}

.btn-full:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid #f1f3f4;
    background: #fff;
}

.lang-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.lang-selector svg {
    width: 18px;
    height: 18px;
    fill: #5f6368;
    flex-shrink: 0;
}

.lang-selector select {
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    color: #5f6368;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    min-width: 150px;
}

.lang-selector select:hover {
    color: #202124;
}

.lang-selector select:focus {
    outline: none;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    color: #5f6368;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Loading */
.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    margin-bottom: 20px;
}

.spinner svg {
    animation: rotate 1.4s linear infinite;
    width: 100%;
    height: 100%;
}

.spinner circle {
    stroke: #1a73e8;
    stroke-linecap: round;
    animation: dash 1.4s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.loading-text {
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #5f6368;
    text-align: center;
}

.loading-email {
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #202124;
    margin-top: 4px;
}

/* Error Screen */
.error-icon {
    width: 64px;
    height: 64px;
    background: #fce8e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.error-icon svg {
    width: 32px;
    height: 32px;
    fill: #d93025;
}

.error-title {
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #d93025;
    margin-bottom: 12px;
    text-align: center;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f3f4;
    padding: 4px 12px 4px 4px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.account-chip .avatar {
    width: 24px;
    height: 24px;
    background: #1a73e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-chip .avatar svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.account-chip span {
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    color: #202124;
}

.error-list {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

.error-list li {
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    color: #5f6368;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.error-list li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: #80868b;
}

.error-code {
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: 11px;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
}

.help-link {
    display: block;
    margin-top: 16px;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
    text-align: center;
}

.help-link:hover {
    text-decoration: underline;
}
