:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --bg-dark: #070b14;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --surface: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
        var(--bg-dark);
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
    animation: float 20s infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* Layout */
.survey-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 60px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.lang-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#language-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

#language-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

#language-select option {
    background: #1e293b;
    color: white;
}

/* Title & Description */
h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #ffffff 30%, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.3;
}

p.description {
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Buttons */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 36px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.btn:hover:not(:disabled) {
    background: #7c3aed;
    transform: translateY(-4px);
    box-shadow: 0 15px 40px -10px var(--primary-glow);
}

.btn:active:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
}

/* Selection Cards */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 2.5rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 20px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
}

.option-card.selected {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.1);
}

.option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    /* Default for checkboxes */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
    pointer-events: none;
    /* Let the parent card handle the click */
}

.screen[id*="single"] .option-indicator,
/* If we add IDs later */
.option-card-single .option-indicator {
    border-radius: 50%;
}

.option-card.selected .option-indicator {
    background: var(--primary);
    border-color: var(--primary);
}

.option-card.selected .option-indicator::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 800;
}

/* Text Input */
.text-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    color: white;
    font-size: 1.125rem;
    outline: none;
    transition: var(--transition-fast);
}

.text-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Progress */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-track {
    height: 8px;
    background: var(--glass-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Animations */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.screen.active {
    display: block;
    animation: screenIn 0.6s var(--transition-slow) forwards;
}

@keyframes screenIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Success Components */
.success-icon-wrap {
    width: 100px;
    height: 100px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    color: var(--success);
}

.disqualify-icon-wrap {
    width: 100px;
    height: 100px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    color: var(--danger);
}

/* Responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 40px 24px;
    }

    h1 {
        font-size: 2.25rem;
    }

    p.description {
        font-size: 1.1rem;
    }
}