:root {
    /* Color Palette */
    --surface-light: #f9fafb;
    --surface-card: #ffffff;
    --accent-indigo: #4338ca;
    --accent-indigo-hover: #3730a3;
    --success-green: #16a34a;
    --warning-amber: #f59e0b;
    --error-red: #ef4444;
    
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--surface-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

/* Background Image with Overlay */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/495mqv/site/media/69f112fadb5d97.84667885.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.page-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249,250,251,0.95) 0%, rgba(249,250,251,0.85) 100%);
    backdrop-filter: blur(5px);
}

/* Layout */
.main-container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--surface-card);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0,0,0,0.02);
    width: 100%;
    transition: all 0.3s ease;
}

.text-center { text-align: center; }

/* Header Elements */
.brand-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(67, 56, 202, 0.1);
    color: var(--accent-indigo);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.card-header h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.card-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Emoji Scale */
.question-block {
    margin-top: 2rem;
}

.emoji-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.emoji-scale input[type="radio"] {
    display: none;
}

.emoji-label {
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    filter: grayscale(100%) opacity(0.3);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.emoji-label:hover {
    filter: grayscale(20%) opacity(0.8);
    transform: scale(1.15);
    background-color: var(--surface-light);
}

.emoji-scale input[type="radio"]:checked + .emoji-label {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.25);
}

/* Divider */
.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
    width: 100%;
}

/* Follow Up Section */
#follow-up-section {
    animation: fadeInSlideUp 0.4s ease-out forwards;
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 1.5rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Textarea */
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--surface-light);
    transition: all 0.2s ease;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-indigo);
    background-color: var(--surface-card);
    box-shadow: 0 0 0 4px rgba(67, 56, 202, 0.1);
}

textarea::placeholder {
    color: #9ca3af;
}

/* Multi-select Pills */
.pills-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    margin: 0;
    cursor: pointer;
}

.pill input[type="checkbox"] {
    display: none;
}

.pill-text {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    user-select: none;
}

.pill:hover .pill-text {
    border-color: #cbd5e1;
    color: var(--text-main);
}

.pill input[type="checkbox"]:checked + .pill-text {
    background-color: rgba(67, 56, 202, 0.08);
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--accent-indigo);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: var(--accent-indigo-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Progress Indicator */
.progress-indicator {
    position: absolute;
    bottom: -2.5rem;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.3;
}

.dot.active {
    background-color: var(--accent-indigo);
    opacity: 1;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Status & Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Thank You State */
.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

#thank-you-card h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

#thank-you-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Loading Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}
.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s 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; }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Powered By positioning */
#wbx-powered-by-slot {
    margin-top: 3rem;
    width: 100%;
}

/* Media Queries */
@media (max-width: 600px) {
    .card {
        padding: 2rem 1.5rem;
    }
    .emoji-label {
        font-size: 2.5rem;
        width: 50px;
        height: 50px;
    }
    .card-header h1 {
        font-size: 1.8rem;
    }
}
@media (max-width: 360px) {
    .emoji-label {
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }
}
