:root {
    --primary-color: #6a5af9;
    --primary-color-dark: #5b4cde;
    --secondary-color: #f0f2f5;
    --text-color: #333;
    --text-color-light: #666;
    --background-color: #f8f9fa;
    --card-background: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(106, 90, 249, 0.15);
    --success-color: #28a745;
    --error-color: #dc3545;
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/whj2b6/69c06129b35ae5.18440105.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(106, 90, 249, 0.1), transparent 50%),
                radial-gradient(circle at 80% 90%, rgba(249, 90, 190, 0.1), transparent 50%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 550px;
    position: relative;
}

.survey-card {
    background: var(--card-background);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px var(--shadow-color);
    text-align: center;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.survey-card.hidden {
    display: none !important;
}

.title {
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 2.25rem;
    color: var(--text-color);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.description {
    font-size: 1.1rem;
    color: var(--text-color-light);
    margin-bottom: 32px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(106, 90, 249, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(106, 90, 249, 0.5);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
}

.btn-secondary:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
}

#wbx-powered-by-slot {
    margin-top: 24px;
}

/* Survey Form Styles */
#survey-screen {
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.4s ease;
}

#question-container {
    min-height: 220px; /* Adjust as needed */
    display: flex;
    position: relative;
    width: 100%;
}

.question-step {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    transform: translateX(30px);
}

.question-step.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

.question-step.exiting {
    opacity: 0;
    transform: translateX(-30px);
}

.question-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.question-placeholder {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

input[type="email"],
textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-family-body);
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 90, 249, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.rating-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.rating-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.rating-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.rating-btn.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.error-message {
    color: var(--error-color);
    margin-top: 16px;
    font-weight: 600;
}


/* Thank You Screen Styles */
.thank-you-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 0 auto 20px;
    box-shadow: inset 0px 0px 0px var(--success-color);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px var(--success-color); }
}

#thank-you-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

#thank-you-subheading {
    color: var(--text-color-light);
    max-width: 400px;
    margin: 0 auto;
}


.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .survey-card {
        padding: 25px;
    }
    .title {
        font-size: 1.8rem;
    }
    .description {
        font-size: 1rem;
    }
    .rating-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    .rating-group {
        flex-wrap: wrap;
        gap: 5px;
    }
    #question-container {
        min-height: 250px;
    }
}
