:root {
    --primary-color: #b39ddb;
    /* Lighter purple for dark mode */
    --primary-light: #311b92;
    --bg-color: #121212;
    /* Very dark grey/black */
    --card-bg: #1e1e1e;
    /* Dark grey card */
    --text-color: #e8eaed;
    /* Off-white text */
    --text-secondary: #9aa0a6;
    /* Muted text */
    --error-color: #f28b82;
    /* Lighter red for dark mode */
    --border-color: #3c4043;
    --focus-color: #b39ddb;
    --timer-bg: #410e0b;
    /* Dark red background for timer */
    --font-stack: 'Roboto', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
    /* Google's standard font size */
}

.main-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 64px;
}

/* Header Card */
.form-header-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #dadce0;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.header-top-band {
    height: 10px;
    background-color: var(--primary-color);
    width: 100%;
}

.header-content {
    padding: 24px;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 400;
    /* Google uses lighter weights for headers usually */
    margin-bottom: 12px;
    line-height: 1.25;
}

.header-content p {
    font-size: 14px;
    color: var(--text-color);
    margin-top: 12px;
}

.user-email-info {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Center align items */
    font-size: 13px;
    color: var(--text-secondary);
}

.timer-display {
    font-weight: 600;
    color: var(--error-color);
    font-size: 16px;
    background-color: var(--timer-bg);
    padding: 4px 12px;
    border-radius: 16px;
}

.user-email-info .switch-account {
    color: #1a73e8;
    /* Google Link Blue */
    text-decoration: none;
}

/* Form Cards */
.form-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-card:focus-within {
    border-left: 6px solid #4285f4;
    /* Blue left border on focus */
    /* Or the primary color */
}

.field-label {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 400;
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

.field-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    margin-top: -4px;
}

.text-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-color);
    /* Underline style */
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    transition: border-bottom-color 0.2s;
    background: transparent;
}

.text-input:focus {
    border-bottom: 2px solid var(--primary-color);
}

.text-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.error-msg {
    display: none;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.error-msg::before {
    content: '!';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 14px;
    font-size: 10px;
    margin-right: 6px;
    font-weight: bold;
}

/* Hide error message by default */
.form-card .error-msg {
    display: none;
}

/* Show error message when parent has 'error' class */
.form-card.error .error-msg {
    display: flex;
}

.form-card.error .text-input {
    border-bottom-color: var(--error-color);
}

/* Steps & Navigation */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-next,
.btn-submit,
.btn-back {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-next:hover,
.btn-submit:hover,
.btn-back:hover {
    background-color: #5e35b1;
    /* Slightly darker purple */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-back {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-back:hover {
    background-color: rgba(103, 58, 183, 0.08);
    /* Light purple highlight */
    box-shadow: none;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-clear:hover {
    color: var(--primary-color);
}

.page-indicator {
    display: none;
    /* Usually only progress bars shown, but image had page count text */
}

/* Footer */
.form-footer {
    padding: 24px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.google-logo {
    margin-top: 16px;
    font-size: 24px;
    color: var(--text-secondary);
    font-family: 'Product Sans', sans-serif;
    /* Fallback if not available */
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .main-container {
        padding: 0;
    }

    .form-header-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .form-card {
        border-radius: 8px;
        /* Keep cards rounded */
        margin-left: 10px;
        margin-right: 10px;
    }

    .form-navigation {
        padding: 0 16px;
    }
}