body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.quiz-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    font-weight: 800;
    font-size: 20px;
    color: #111827;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.progress-bar-container {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    width: 20%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.step-indicator {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.quiz-card {
    background: white;
    padding: 40px 32px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.step {
    display: none;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

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

h2 {
    font-size: 26px;
    color: #111827;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.subtext {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.5;
}

.button-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quiz-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 20px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quiz-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.quiz-btn:active {
    transform: translateY(0);
}

/* Success State */
.success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 24px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.result-text {
    text-align: center;
    color: #4b5563;
    margin-bottom: 32px;
    font-size: 18px;
    line-height: 1.6;
}

.call-btn-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.call-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.5);
}

.call-btn-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.call-btn-large:hover::after {
    opacity: 1;
}

.call-btn-large .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.call-btn-large .text {
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.call-btn-large .sub {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 500;
}

.live-status {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    background: #ecfdf5;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    margin: 24px auto 0;
}

.dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.trust-footer {
    text-align: center;
    margin-top: 32px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ======================================== */

/* Small phones (320px - 374px) - iPhone SE, small Android */
@media (max-width: 374px) {
    .quiz-container {
        padding: 12px;
        max-width: 100%;
    }

    .quiz-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    h2 {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .subtext {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .quiz-btn {
        padding: 16px;
        font-size: 16px;
        min-height: 48px; /* Touch target minimum */
    }

    .call-btn-large {
        padding: 20px 16px;
    }

    .call-btn-large .icon {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .call-btn-large .text {
        font-size: 24px;
    }

    .call-btn-large .sub {
        font-size: 14px;
    }

    .progress-bar-container {
        height: 6px;
    }

    .logo {
        font-size: 18px;
    }

    .step-indicator {
        font-size: 12px;
    }

    .success-icon {
        font-size: 56px;
    }

    .result-text {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .live-status {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Standard phones (375px - 413px) - iPhone 12, most modern phones */
@media (min-width: 375px) and (max-width: 413px) {
    .quiz-container {
        padding: 16px;
    }

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

    h2 {
        font-size: 24px;
    }

    .subtext {
        font-size: 15px;
    }

    .quiz-btn {
        padding: 18px;
        font-size: 17px;
        min-height: 48px;
    }

    .call-btn-large .text {
        font-size: 26px;
    }
}

/* Large phones (414px - 767px) - iPhone Plus, large Android */
@media (min-width: 414px) and (max-width: 767px) {
    .quiz-container {
        padding: 20px;
    }

    .quiz-card {
        padding: 36px 28px;
    }

    h2 {
        font-size: 26px;
    }

    .quiz-btn {
        padding: 20px;
        min-height: 48px;
    }
}

/* Tablets (768px - 1023px) - iPads, landscape phones */
@media (min-width: 768px) and (max-width: 1023px) {
    .quiz-container {
        padding: 24px;
    }

    h2 {
        font-size: 28px;
    }

    .quiz-card {
        padding: 48px 40px;
    }

    .call-btn-large {
        padding: 28px 32px;
    }

    .call-btn-large .text {
        font-size: 30px;
    }
}

/* Desktop (1024px+) - Large screens, monitors */
@media (min-width: 1024px) {
    .quiz-container {
        padding: 28px;
        max-width: 520px; /* Slightly larger on desktop */
    }

    h2 {
        font-size: 30px;
    }

    .quiz-card {
        padding: 52px 44px;
        border-radius: 28px;
    }

    .call-btn-large {
        padding: 30px 36px;
    }

    .call-btn-large .text {
        font-size: 32px;
    }

    .call-btn-large .icon {
        font-size: 36px;
    }
}

/* Ensure touch targets meet accessibility guidelines on all devices */
@media (max-width: 767px) {
    .quiz-btn,
    .call-btn-large {
        min-height: 48px; /* Apple & Google recommendation */
    }

    /* Increase spacing between buttons for fat-finger safety */
    .button-stack {
        gap: 16px;
    }

    /* Make sure footer links are tappable */
    .legal-footer a {
        display: inline-block;
        padding: 8px 4px;
        margin: 4px;
    }
}