* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    background-color: #f0ebf8;
    min-height: 100vh;
    padding: 12px;
}

.form-container {
    max-width: 640px;
    margin: 0 auto;
}

/* Header */
.form-header {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
}

.form-header-color {
    height: 10px;
    background: linear-gradient(90deg, #673ab7 0%, #7c4dff 100%);
}

.form-header-content {
    padding: 24px;
}

.form-title {
    font-size: 32px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.25;
}

.form-description {
    font-size: 14px;
    color: #202124;
    line-height: 1.5;
    margin-bottom: 16px;
}

.required-text {
    font-size: 14px;
    color: #202124;
    border-top: 1px solid #dadce0;
    padding-top: 16px;
}

.required {
    color: #d93025;
}

/* Progress Bar */
.progress-container {
    background: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #673ab7 0%, #7c4dff 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 50%;
}

.progress-text {
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
}

/* Question Cards */
.question-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.question-card:focus-within {
    border-color: #673ab7;
    box-shadow: 0 0 0 1px #673ab7;
}

.question-title {
    font-size: 16px;
    color: #202124;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Radio & Checkbox Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
}

.option input[type="radio"],
.option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #5f6368;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.option input[type="radio"]:checked+.radio-custom {
    border-color: #673ab7;
}

.option input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #673ab7;
    border-radius: 50%;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #5f6368;
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.option input[type="checkbox"]:checked+.checkbox-custom {
    background: #673ab7;
    border-color: #673ab7;
}

.option input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-text {
    font-size: 14px;
    color: #202124;
    line-height: 1.5;
}

/* Text Input */
.text-input-container {
    margin-top: 8px;
}

.text-input {
    width: 100%;
    max-width: 300px;
    border: none;
    border-bottom: 1px solid #80868b;
    padding: 8px 0;
    font-size: 14px;
    color: #202124;
    background: transparent;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-bottom: 2px solid #673ab7;
}

.text-input::placeholder {
    color: #80868b;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.form-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.submit-btn,
.next-page-btn {
    background: #673ab7;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.submit-btn:hover,
.next-page-btn:hover {
    background: #5e35a1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.back-btn {
    background: none;
    border: 1px solid #dadce0;
    color: #673ab7;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.back-btn:hover {
    background: rgba(103, 58, 183, 0.04);
    border-color: #673ab7;
}

.clear-btn {
    background: none;
    border: none;
    color: #673ab7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 8px;
}

.clear-btn:hover {
    background: rgba(103, 58, 183, 0.04);
    border-radius: 4px;
}

/* Question card error state */
.question-card.error {
    border-color: #d93025;
    box-shadow: 0 0 0 1px #d93025;
}

/* Footer */
.form-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    color: #70757a;
    line-height: 1.8;
}

.form-footer p {
    margin-bottom: 4px;
}

.form-footer a {
    color: #673ab7;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-footer-report {
    margin-top: 8px;
}

.form-footer-brand {
    margin-top: 16px;
    color: #5f6368;
}

/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.popup-overlay.active {
    display: flex;
}

/* Login Popup */
.login-popup {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.popup-content {
    padding: 48px 40px 36px;
}

.google-logo {
    width: 75px;
    height: auto;
    display: block;
    margin: 0 auto 16px;
}

.popup-content h2 {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    text-align: center;
    margin-bottom: 8px;
}

.popup-subtitle {
    font-size: 16px;
    color: #5f6368;
    text-align: center;
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 24px;
}

.password-group {
    display: none;
}

.password-group.show {
    display: block;
}

.popup-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    color: #202124;
    transition: border-color 0.2s;
}

.popup-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

.popup-input.error {
    border-color: #d93025;
}

.popup-input.error:focus {
    box-shadow: 0 0 0 1px #d93025;
}

.error-message {
    color: #d93025;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

.forgot-link {
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.popup-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 32px;
}

.popup-info p {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.5;
}

.popup-info a {
    color: #1a73e8;
    text-decoration: none;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.create-account-btn {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
}

.create-account-btn:hover {
    text-decoration: underline;
}

.next-btn {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.next-btn:hover {
    background: #1765cc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Warning Overlay */
.warning-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.warning-overlay.active {
    display: flex;
}

.warning-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.warning-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.warning-title {
    color: #d93025;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.warning-text {
    color: #d93025;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 16px;
    background: #fce8e6;
    border-radius: 8px;
    word-break: break-word;
}

.warning-explanation {
    font-size: 16px;
    color: #202124;
    line-height: 1.6;
    margin-bottom: 24px;
}

.warning-tips {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.warning-tips h3 {
    color: #1b5e20;
    font-size: 16px;
    margin-bottom: 12px;
}

.warning-tips ul {
    margin-left: 20px;
}

.warning-tips li {
    font-size: 14px;
    color: #2e7d32;
    margin-bottom: 8px;
    line-height: 1.4;
}

.warning-btn {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.warning-btn:hover {
    background: #1765cc;
}


/* ======================== Confirmation Page ======================== */
.confirmation-overlay {
    display: none;
    min-height: 100vh;
    padding: 12px;
}

.confirmation-overlay.active {
    display: block;
}

.confirmation-container {
    max-width: 640px;
    margin: 0 auto;
}

.confirmation-header {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
}

.confirmation-header-color {
    height: 10px;
    background: linear-gradient(90deg, #673ab7 0%, #7c4dff 100%);
}

.confirmation-header-content {
    padding: 24px;
    text-align: center;
}

.check-icon {
    margin-bottom: 16px;
}

.confirmation-title {
    font-size: 32px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 16px;
    line-height: 1.25;
}

.confirmation-message {
    font-size: 16px;
    color: #202124;
    line-height: 1.5;
}

.confirmation-actions {
    background: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
}

.confirmation-link {
    color: #673ab7;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.confirmation-link:hover {
    text-decoration: underline;
}

.confirmation-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #70757a;
}

.confirmation-footer a {
    color: #673ab7;
    text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 20px;
        background: #f0ebf8;
    }

    .form-container {
        max-width: 100%;
    }

    .form-header {
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .form-header-content {
        padding: 20px 16px;
    }

    .form-title {
        font-size: 24px;
    }

    .progress-container {
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px 16px;
    }

    .question-card {
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 20px 16px;
    }

    .form-actions {
        padding: 16px 0;
        background: transparent;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .form-actions-right {
        width: auto;
        flex-direction: row;
        gap: 16px;
    }

    .back-btn {
        width: auto;
        order: 0;
    }

    .next-page-btn,
    .submit-btn {
        width: auto;
    }

    .clear-btn {
        width: auto;
        text-align: center;
    }

    .form-footer {
        padding: 16px 8px;
    }

    .popup-content {
        padding: 32px 24px 24px;
    }

    .google-logo {
        width: 60px;
    }

    .popup-content h2 {
        font-size: 20px;
    }

    .popup-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .popup-actions {
        flex-direction: column-reverse;
        gap: 16px;
    }

    .next-btn {
        width: 100%;
    }

    /* Confirmation mobile */
    .confirmation-overlay {
        padding: 8px;
        background: #f0ebf8;
    }

    .confirmation-header {
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .confirmation-header-content {
        padding: 20px 16px;
    }

    .confirmation-title {
        font-size: 24px;
    }

    .confirmation-actions {
        border-radius: 8px;
        margin-bottom: 12px;
    }
}
