/* CSS Reset & Variables */
:root {
    --primary: #EF4444;
    /* Alert Red - Urgency */
    --primary-dark: #DC2626;
    --primary-light: #FEF2F2;
    --secondary: #007AFF;
    /* Apple Blue */
    --secondary-dark: #0056B3;
    --secondary-light: #F2F7FF;
    --background: #F5F5F7;
    /* Apple Gray Background */
    --surface: #FFFFFF;
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --border: #D2D2D7;
    --success: #34C759;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Move content up */
    padding-top: 2px;
    /* Initial top spacing */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
    letter-spacing: -0.022em;
    /* Tighter Apple tracking */
    line-height: 1.1;
    color: #1D1D1F;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.animate-pulse-green {
    animation: pulse-green 2s infinite;
}

.animate-pulse-ring {
    animation: pulse-ring 2.5s infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-bounce {
    animation: bounce 1.5s infinite;
}

.hidden {
    display: none !important;
}

/* Layout & Container */
#app {
    width: 100%;
    display: flex;
    justify-content: center;
}

.main-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 1.5rem;
    margin: 0 auto;
}

/* Quiz Cards - Apple Style */
.card {
    background: #FFFFFF;
    border-radius: 24px;
    /* Soft, layered shadow for depth */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 10px 15px -3px rgba(0, 0, 0, 0.04),
        0 20px 25px -5px rgba(0, 0, 0, 0.02);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    /* Subtle edge definition */
    transition: transform 0.3s ease;
}

/* Buttons */
.btn-primary {
    background: #FF3B30;
    /* Apple System Red */
    color: white;
    padding: 1.1rem 2.5rem;
    border-radius: 980px;
    /* Full Pill */
    font-weight: 600;
    font-size: 1.05rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px 0 rgba(255, 59, 48, 0.39);
    letter-spacing: -0.01em;
    gap: 0.5rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    /* Bouncy feel */
    border: none;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.23);
    filter: brightness(1.05);
    /* Proper highlight */
}

.btn-primary:active {
    transform: scale(0.96);
    /* Satisfying click press */
}

.btn-option {
    background-color: #FFFFFF;
    border: 1px solid #E5E5EA;
    /* iOS separator color */
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    text-align: left;
    width: 100%;
    margin-bottom: 0.85rem;
    font-weight: 500;
    font-size: 1.05rem;
    color: #1D1D1F;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-option:hover {
    background-color: #F5F5F7;
    border-color: #D1D1D6;
    transform: translateY(-1px);
}

.btn-option.selected {
    border-color: #007AFF;
    background-color: #F0F9FF;
    color: #007AFF;
    box-shadow: 0 0 0 1px #007AFF, 0 4px 12px rgba(0, 122, 255, 0.15);
}

/* Custom Checkbox Circle */
.option-circle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    /* Prevent squashing */
    flex-shrink: 0;
    /* Prevent squashing */
    border-radius: 50%;
    border: 2px solid #D1D1D6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-option.selected .option-circle {
    border-color: var(--secondary);
    background-color: var(--secondary);
}

.btn-option.selected .option-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

/* Progress Bar */
.progress-container {
    padding: 0 0.5rem;
    margin-bottom: 2rem;
    max-width: 500px;
    /* Slightly narrower than card for optical balance */
    margin-left: auto;
    margin-right: auto;
    /* Removed large top margin, centering handles spacing */
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: #E5E5EA;
    /* Apple system gray */
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007AFF;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    /* Elegant easing */
    border-radius: 10px;
}

/* Loader Styles */
.loader-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F5F5F7;
}

.loader-item:last-child {
    border-bottom: none;
}

.loader-checkbox {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel Styles */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.carousel-track img {
    height: 160px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Sales Page Specifics */
.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.status-bar {
    background: #FFF;
    color: var(--primary);
    border: 1px solid #FFE5E5;
    text-align: center;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.offer-card {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    margin-top: 2rem;
}

.strike-price {
    text-decoration: line-through;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
    color: #9CA3AF;
    font-size: 1.25rem;
    font-weight: 500;
}

.sale-price {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1D1D1F;
    line-height: 1;
    letter-spacing: -0.03em;
}

.checkout-btn {
    background: #34C759;
    /* Apple Green */
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1.25rem;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
    transition: all 0.2s;
    margin-bottom: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
}

.checkout-btn:hover {
    background: #2DBD4E;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

.checkout-btn:active {
    transform: scale(0.98);
}

/* Stack Section */
.stack-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    text-align: left;
}

.stack-icon {
    font-size: 2rem;
    min-width: 4.5rem;
    height: 4.5rem;
    background: #F3F4F6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-content h4 {
    font-size: 0.95rem;
    /* Slight adjust for mobile legibility */
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.stack-content p {
    font-size: 0.85rem;
    color: #4B5563;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.stack-price {
    font-size: 0.75rem;
    color: #9CA3AF;
    font-weight: 500;
}

.stack-price span {
    text-decoration: line-through;
    color: #EF4444;
    font-weight: 600;
    margin-left: 4px;
}

/* Headline Image Responsive Control */
.headline-image {
    width: 90%;
    max-width: 400px;
    /* Mobile Default: Slightly controlled width */
    margin: 0 auto;
    display: block;
}

@media (min-width: 768px) {
    .headline-image {
        max-width: 380px;
        /* Desktop: Adjusted */
        width: 100%;
    }
}