:root {
    /* Fallback variables */
    --rqp-text-muted: #9CA3AF;
    --rqp-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

#rqp-form-root {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 750px;
    width: 100%;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.rqp-top-button-wrapper {
    margin-bottom: 24px;
    perspective: 1000px;
}

.rqp-top-button {
    background: var(--rqp-button-bg-color, #8B5CF6);
    color: var(--rqp-button-text-color, white);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUpDown 3s ease-in-out infinite;
    transition: transform 0.2s ease;
}

@keyframes slideUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.rqp-top-button:hover {
    transform: scale(1.05);
}

.rqp-container {
    background: var(--rqp-card-bg-color, #FFFFFF);
    border-radius: 24px;
    box-shadow: var(--rqp-shadow);
    padding: 48px;
    width: 750px;
    max-width: 100%;
    min-height: 400px;
    box-sizing: border-box;
}

.rqp-header {
    margin-bottom: 32px;
}

.rqp-step-info {
    font-size: 14px;
    color: var(--rqp-text-color, #9CA3AF);
    margin-bottom: 12px;
}

.rqp-progress-wrapper {
    display: flex;
    gap: 8px;
    height: 6px;
    width: 100%;
}

.rqp-progress-segment-main,
.rqp-progress-segment-bonus {
    background: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.rqp-progress-segment-main {
    flex: 9;
}

.rqp-progress-segment-bonus {
    flex: 1;
}

.rqp-progress-bar {
    height: 100%;
    background: var(--rqp-option-border-active-color, #8B5CF6);
    width: 0%;
    transition: width 0.4s ease;
}

.rqp-navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    width: 100%;
}

.rqp-btn-primary,
.rqp-btn-secondary,
.rqp-btn-inline {
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rqp-btn-primary,
.rqp-btn-inline {
    background: var(--rqp-button-bg-color, #8B5CF6);
    color: var(--rqp-button-text-color, white);
    border: none;
}

.rqp-btn-secondary {
    background: white;
    color: var(--rqp-text-muted);
    border: 1px solid #E5E7EB;
}

.rqp-btn-primary:hover,
.rqp-btn-inline:hover {
    background: var(--rqp-button-hover-bg-color, #7C3AED);
    color: var(--rqp-button-hover-text-color, white);
}

.rqp-btn-secondary:hover {
    background: var(--rqp-button-hover-bg-color, #7C3AED);
    color: var(--rqp-button-hover-text-color, white);
    border-color: var(--rqp-button-hover-bg-color, #7C3AED);
}

.rqp-btn-inline {
    margin-top: 20px;
    width: auto;
}

.rqp-btn-inline.full-width {
    width: 100%;
}

.rqp-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--rqp-title-color, #374151);
    margin-bottom: 32px;
}

.rqp-options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rqp-option-card {
    border: 1px solid var(--rqp-option-border-color, #E5E7EB);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
    color: var(--rqp-option-text-color, #374151);
    background: var(--rqp-option-bg-color, #F9FAFB);
}

.rqp-option-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: white;
}

.rqp-option-card:hover {
    border-color: var(--rqp-option-border-active-color, #8B5CF6);
}

.rqp-option-card.selected {
    border-color: var(--rqp-option-border-active-color, #8B5CF6);
    background: var(--rqp-option-bg-active-color, #EDE9FE);
}

.rqp-option-card.selected .rqp-option-circle {
    border-color: var(--rqp-option-border-active-color, #8B5CF6);
}

.rqp-option-card.selected .rqp-option-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--rqp-option-border-active-color, #8B5CF6);
    border-radius: 50%;
}

.rqp-input-text {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.rqp-input-text:focus {
    border-color: var(--rqp-option-border-active-color, #8B5CF6);
}

.rqp-input-text.icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px;
    padding-left: 48px;
}

.rqp-input-text.icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235D7b93'%3E%3Cpath d='M12 2C9.243 2 7 4.243 7 7s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3 3 1.346 3 3-1.346 3-3 3zm6.57 6.071c-.722-2.126-2.616-3.704-4.9-4.043l-.935-.138c-.469-.069-.937-.069-1.47 0l-.935.138c-2.284.339-4.178 1.917-4.9 4.043C4.697 18.23 4 19.99 4 22h2c0-1.748.566-3.23 1.488-4.22.997-1.07 2.458-1.78 4.212-1.78h.6c1.754 0 3.215.71 4.212 1.78.922.99 1.488 2.472 1.488 4.22h2c0-2.01-.697-3.77-1.43-5.929z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px;
    padding-left: 48px;
}

.rqp-input-text.icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235D7b93'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px;
    padding-left: 48px;
}

.rqp-input-text.icon-chat {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3Ccircle cx='8' cy='10' r='1'%3E%3C/circle%3E%3Ccircle cx='12' cy='10' r='1'%3E%3C/circle%3E%3Ccircle cx='16' cy='10' r='1'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px 16px;
    background-size: 20px;
    padding-left: 48px;
}

.rqp-custom-input-container,
.rqp-email-container,
.rqp-multi-input-container {
    margin-top: 16px;
}

.rqp-multi-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rqp-multi-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--rqp-text-color, #374151);
    display: block;
}

.rqp-multi-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.rqp-multi-group input:focus {
    border-color: var(--rqp-option-border-active-color, #8B5CF6);
    background: white;
    box-shadow: 0 0 0 4px var(--rqp-option-bg-active-color, #EDE9FE);
}

.rqp-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    font-size: 14px;
    color: var(--rqp-text-color, #374151);
}

.rqp-privacy-text {
    font-size: 13px;
    color: var(--rqp-text-color, #9CA3AF);
    margin-top: 16px;
    line-height: 1.4;
}

.rqp-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 18px;
    color: var(--rqp-text-muted);
}

.rqp-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimization */
@media (max-width: 600px) {
    .rqp-container {
        padding: 24px;
    }

    .rqp-title {
        font-size: 22px;
    }
}