.noise {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.quiz-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 60px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.quiz-header {
    margin-bottom: 40px;
}

.quiz-header h1 {
    font-size: 36px;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.quiz-header h1 .highlight {
    background: linear-gradient(135deg, var(--coral), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.progress-bar {
    height: 4px;
    background: var(--bg-subtle);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--coral), var(--rose));
    transition: width 0.3s ease;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.options {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.02);
}

.option input[type="radio"],
.option input[type="checkbox"] {
    accent-color: var(--coral);
    cursor: pointer;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.option label,
.option span {
    flex: 1;
    cursor: pointer;
    font-size: 15px;
}

.multi-select-note {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 40px;
}

button {
    flex: 1;
    padding: 16px 32px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-next {
    background: var(--coral);
    color: var(--bg-deep);
}

.btn-next:hover {
    background: var(--rose);
    transform: translateY(-1px);
}

.btn-back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--bg-subtle);
}

.btn-back:hover {
    border-color: var(--text-dim);
    color: var(--text);
}

.btn-back:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-gate {
    display: none;
}

.email-gate input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.02);
}

.success-message {
    display: none;
    text-align: center;
}

.success-message h2 {
    color: var(--coral);
    margin-bottom: 16px;
}

.success-message p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-generate {
    width: 100%;
    background: linear-gradient(135deg, var(--coral), var(--rose));
    color: var(--bg-deep);
    padding: 16px 32px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.25);
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .quiz-card {
        padding: 40px 24px;
    }

    .quiz-header h1 {
        font-size: 28px;
    }

    .buttons {
        flex-direction: column;
    }

    /* Larger touch targets for options on mobile */
    .option {
        padding: 18px 16px;
        min-height: 56px;
    }

    .option input[type="radio"],
    .option input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .option span {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    /* Button touch targets */
    button {
        min-height: 48px;
        font-size: 16px; /* Prevent iOS zoom */
    }

    .step-title {
        font-size: 18px;
    }
}

/* Small mobile phones (iPhone SE - 375px) */
@media (max-width: 480px) {
    .container {
        padding: 32px 16px;
    }

    .quiz-card {
        padding: 32px 20px;
    }

    .quiz-header h1 {
        font-size: 24px;
    }

    .quiz-header p {
        font-size: 15px;
    }

    .step-title {
        font-size: 17px;
    }

    .option {
        padding: 16px 14px;
    }

    button {
        padding: 14px 24px;
    }
}
