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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #f5f5f7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    caret-color: transparent;
}

body:focus {
    outline: none;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Card Carousel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    margin-bottom: 40px;
    position: relative;
    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: 30px;
    animation: scroll 60s linear infinite;
    width: fit-content;
}

.carousel-track img {
    height: 140px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    user-select: none;
    pointer-events: none;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.welcome-screen.active {
    opacity: 1;
    visibility: visible;
}

.welcome-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    animation: fadeInUp 1s cubic-bezier(0.4, 0.0, 0.2, 1) 0.3s both;
}

.welcome-title {
    font-size: 64px;
    font-weight: 700;
    color: #f5f5f7;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    font-size: 24px;
    color: #a1a1a6;
    margin-bottom: 60px;
    line-height: 1.4;
    font-weight: 400;
}

.start-survey-btn {
    background: #6c6c6c;
    color: white;
    border: none;
    padding: 20px 48px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(108, 108, 108, 0.3);
}

.start-survey-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(108, 108, 108, 0.4);
    background: #7a7a7a;
}

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

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #a1a1a6;
    font-size: 16px;
    font-weight: 500;
}

.openai-logo {
    height: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Hide main content initially */
.content-wrapper {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.content-wrapper.active {
    opacity: 1;
    visibility: visible;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #00c7be);
    width: 8.33%;
    transition: width 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px 140px;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

/* Question Steps */
#creditCardSurvey {
    width: 100%;
    position: relative;
    min-height: 400px;
}

.question-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.question-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.question-step.exiting {
    opacity: 0;
    transform: translateX(-100px);
}

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

.question-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #f5f5f7;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

/* Options Grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.option-button {
    position: relative;
    display: block;
    cursor: pointer;
}

.option-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.option-button:hover .option-label {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.option-button input[type="radio"]:checked ~ .option-label {
    background: rgba(0, 113, 227, 0.15);
    border-color: #0071e3;
    box-shadow: 0 0 0 1px #0071e3 inset;
}

.option-main {
    font-size: 17px;
    font-weight: 500;
    color: #f5f5f7;
    letter-spacing: -0.01em;
}

.option-sub {
    font-size: 14px;
    color: #86868b;
    margin-top: 4px;
}

/* Navigation */
.navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    z-index: 50;
}

.nav-button {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: none;
    font-family: inherit;
}

.nav-back {
    background: transparent;
    color: #0071e3;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-back:active {
    transform: scale(0.96);
}

.nav-back.hidden {
    opacity: 0;
    pointer-events: none;
}

.nav-next {
    background: #0071e3;
    color: #ffffff;
}

.nav-next:hover:not(:disabled) {
    background: #0077ed;
}

.nav-next:active:not(:disabled) {
    transform: scale(0.96);
}

.nav-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-indicator {
    font-size: 14px;
    font-weight: 500;
    color: #86868b;
    letter-spacing: 0.01em;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.loading-state * {
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    outline: none;
}

.loading-state *:focus {
    outline: none;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    animation: bounce 1s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.loading-spinner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

.loading-text {
    font-size: 21px;
    font-weight: 500;
    color: #f5f5f7;
    letter-spacing: -0.01em;
    user-select: none;
    -webkit-user-select: none;
}

/* Results */
.results-container {
    width: 100%;
    max-width: 1200px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.results-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #f5f5f7;
    letter-spacing: -0.02em;
}

.cards-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    perspective: 1000px;
    padding: 40px 20px;
    min-height: 600px;
    position: relative;
}

/* Card Flip Container - Stacked Horizontally */
.card-flip-container {
    position: absolute;
    width: 340px;
    height: 500px;
    cursor: pointer;
    perspective: 1000px;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                z-index 0s linear 0.25s;
    z-index: 1;
}

/* Calculate positions for stacked cards - centered stack */
.card-flip-container:nth-child(1) { left: calc(50% - 540px); z-index: 10; }
.card-flip-container:nth-child(2) { left: calc(50% - 420px); z-index: 9; }
.card-flip-container:nth-child(3) { left: calc(50% - 300px); z-index: 8; }
.card-flip-container:nth-child(4) { left: calc(50% - 180px); z-index: 7; }
.card-flip-container:nth-child(5) { left: calc(50% - 60px); z-index: 6; }
.card-flip-container:nth-child(6) { left: calc(50% + 60px); z-index: 5; }
.card-flip-container:nth-child(7) { left: calc(50% + 180px); z-index: 4; }
.card-flip-container:nth-child(8) { left: calc(50% + 300px); z-index: 3; }
.card-flip-container:nth-child(9) { left: calc(50% + 420px); z-index: 2; }
.card-flip-container:nth-child(10) { left: calc(50% + 540px); z-index: 1; }

/* Spread cards apart when hovering - controlled by JavaScript */
.card-flip-container.spread-left {
    transform: translateX(-200px) !important;
}

.card-flip-container.spread-right {
    transform: translateX(200px) !important;
}

/* Hover effect - pop out the card */
.card-flip-container:hover {
    transform: translateY(-40px) scale(1.08) !important;
    z-index: 100 !important;
    filter: drop-shadow(0 30px 80px rgba(0, 113, 227, 0.6));
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                z-index 0s linear 0s;
}

/* Make background more solid when hovering to prevent text overlap */
.card-flip-container:hover .card-front {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* Flipped card styling */
.card-flip-container.flipped {
    transform: translateY(-30px) scale(1.12) !important;
    z-index: 101 !important;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                z-index 0s linear 0s;
}

.card-flip-container.flipped:hover {
    transform: translateY(-30px) scale(1.12) !important;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 500px;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-flip-container.flipped .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 500px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    overflow: hidden;
}

.card-back {
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.15) 0%, rgba(0, 199, 190, 0.1) 100%);
    border: 1px solid rgba(0, 113, 227, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: rotateY(180deg);
    padding: 28px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* Solid background when card is flipped */
.card-flip-container.flipped .card-back {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 1px solid rgba(0, 113, 227, 0.5);
}

/* Card Front - Custom Credit Card Design */
.card-image-wrapper {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
    perspective: 1000px;
    flex-shrink: 0;
    border: none;
    outline: none;
    background: transparent;
}

/* Real Card Image */
.real-card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Discover cards use standard sizing */
.real-card-image[alt*="Discover"] {
    /* Use standard sizing - no special treatment needed */
}

.credit-card {
    width: 100%;
    height: 200px; /* Fixed height to match real card images */
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
}

/* Default card gradient */
.credit-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

/* Issuer-specific card colors */
.credit-card[data-issuer="Chase"] {
    background: linear-gradient(135deg, #003d82 0%, #001f42 100%);
}

.credit-card[data-issuer="American Express"],
.credit-card[data-issuer="Amex"] {
    background: linear-gradient(135deg, #006fcf 0%, #003d82 100%);
}

.credit-card[data-issuer="Capital One"] {
    background: linear-gradient(135deg, #d4002a 0%, #8b0019 100%);
}

.credit-card[data-issuer="Discover"] {
    background: linear-gradient(135deg, #ff6000 0%, #cc4d00 100%);
}

.credit-card[data-issuer="Citi"],
.credit-card[data-issuer="Citibank"] {
    background: linear-gradient(135deg, #056dae 0%, #003d6b 100%);
}

.credit-card[data-issuer="Wells Fargo"] {
    background: linear-gradient(135deg, #d71e28 0%, #8b1419 100%);
}

.credit-card[data-issuer="Bank of America"] {
    background: linear-gradient(135deg, #e31837 0%, #941022 100%);
}

.credit-card[data-issuer="Petal"] {
    background: linear-gradient(135deg, #4a90e2 0%, #2e5a8a 100%);
}

/* Card shine effect */
.credit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    pointer-events: none;
}

/* Card logo */
.card-logo {
    position: absolute;
    top: 18px;
    right: 20px;
    height: 42px;
    max-width: 90px;
    object-fit: contain;
    /* Show original logo colors with subtle effects */
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) brightness(1.1) saturate(0.9);
    opacity: 0.92;
    /* Use multiply blend to help hide white backgrounds on dark cards */
    mix-blend-mode: multiply;
    background: transparent;
    /* Rounded corners for a softer, more premium look */
    border-radius: 6px;
}

.card-logo.no-logo {
    display: none;
}

/* Card Network Logo (Visa/Mastercard in top left) */
.card-network-logo {
    width: 50px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.card-network-logo.hidden {
    display: none;
}

/* Card number - ensure consistent positioning */
.card-number {
    font-size: 17px;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 14px;
    font-weight: 400;
    white-space: nowrap;
    overflow: visible;
    /* Default for Discover/Amex (no network logo) - position lower */
    margin-top: 60px;
}

/* Less spacing for Visa/Mastercard since they have network logo above */
.card-network-logo + .card-number {
    margin-top: 12px;
}

/* Card details row */
.card-details-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder,
.card-expiry {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    white-space: nowrap;
}

.card-holder-name,
.card-expiry-date {
    font-size: 12px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* Network text removed - Discover/Amex cards show issuer logo only */

.card-front h3 {
    font-size: 22px;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -0.01em;
    line-height: 1.2;
    max-height: 52px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-front .card-issuer {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 12px;
}

.card-front .card-summary {
    font-size: 15px;
    color: #f5f5f7;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 20px;
    max-height: 64px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.flip-hint {
    font-size: 12px;
    color: #0071e3;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
}

.flip-hint::after {
    content: "↻";
    font-size: 16px;
}

/* Card Back - Details Side */
.card-back h3 {
    font-size: 20px;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.card-detail-section {
    margin-bottom: 14px;
}

.card-detail-section:last-of-type {
    margin-bottom: 0;
}

.card-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #0071e3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.card-detail-content {
    font-size: 13px;
    line-height: 1.5;
    color: #f5f5f7;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    font-size: 13px;
    line-height: 1.5;
    color: #f5f5f7;
    padding-left: 18px;
    position: relative;
    margin-bottom: 6px;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0071e3;
    font-weight: 700;
}

/* Apply Button on Card Back */
.apply-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-top: 8px;
    background: linear-gradient(135deg, #0071e3 0%, #00c7be 100%);
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.apply-button:hover {
    background: linear-gradient(135deg, #0077ed 0%, #00d4cd 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.apply-button:active {
    transform: translateY(0);
}

.restart-button {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 500;
    background: transparent;
    color: #0071e3;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: inherit;
}

.restart-button:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #0071e3;
}

.restart-button:active {
    transform: scale(0.98);
}

/* Error Messages */
.error-message {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 14px;
    padding: 20px;
    color: #ff453a;
}

.error-message h3 {
    color: #ff453a !important;
    margin-bottom: 10px;
}

.error-message p {
    color: #f5f5f7 !important;
}

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

/* Responsive Design */
@media (max-width: 1600px) {
    /* Adjust stacked card positions for medium screens */
    .card-flip-container:nth-child(1) { left: calc(50% - 470px); }
    .card-flip-container:nth-child(2) { left: calc(50% - 370px); }
    .card-flip-container:nth-child(3) { left: calc(50% - 270px); }
    .card-flip-container:nth-child(4) { left: calc(50% - 170px); }
    .card-flip-container:nth-child(5) { left: calc(50% - 70px); }
    .card-flip-container:nth-child(6) { left: calc(50% + 30px); }
    .card-flip-container:nth-child(7) { left: calc(50% + 130px); }
    .card-flip-container:nth-child(8) { left: calc(50% + 230px); }
    .card-flip-container:nth-child(9) { left: calc(50% + 330px); }
    .card-flip-container:nth-child(10) { left: calc(50% + 430px); }
}

@media (max-width: 768px) {
    /* Carousel - Move to bottom and make smaller */
    .carousel-container {
        order: 3; /* Move to bottom */
        padding: 30px 0 20px;
        margin-bottom: 0;
        margin-top: 30px;
    }
    
    .carousel-track img {
        height: 80px; /* Smaller on mobile */
    }
    
    .welcome-screen {
        display: flex;
        flex-direction: column;
    }
    
    .welcome-content {
        order: 1;
        padding: 40px 20px;
    }
    
    .welcome-title {
        font-size: 36px;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .welcome-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .start-survey-btn {
        padding: 16px 32px;
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .powered-by {
        margin-top: 20px;
        font-size: 13px;
    }
    
    .openai-logo {
        height: 18px;
    }

    .content-wrapper {
        padding: 60px 20px 140px;
        width: 100%;
    }
    
    .question-step {
        padding: 0 10px;
    }
    
    .question-content {
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .question-title {
        font-size: 28px;
        margin-bottom: 30px;
        line-height: 1.3;
        text-align: center;
        padding: 0 10px;
    }

    .results-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .options-grid {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0 10px;
    }

    .option-label {
        padding: 14px 18px;
        text-align: center;
    }

    .option-main {
        font-size: 14px;
    }

    /* Stack cards vertically on mobile */
    .cards-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px;
        padding: 20px;
        min-height: auto;
        position: relative !important;
    }

    .card-flip-container {
        position: relative !important;
        left: 0 !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 320px;
        margin: 0 auto !important;
        height: 420px;
    }
    
    /* Remove all nth-child positioning on mobile */
    .card-flip-container:nth-child(1),
    .card-flip-container:nth-child(2),
    .card-flip-container:nth-child(3),
    .card-flip-container:nth-child(4),
    .card-flip-container:nth-child(5),
    .card-flip-container:nth-child(6),
    .card-flip-container:nth-child(7),
    .card-flip-container:nth-child(8),
    .card-flip-container:nth-child(9),
    .card-flip-container:nth-child(10) {
        position: relative !important;
        left: 0 !important;
        top: auto !important;
    }

    .card-flip-container:hover {
        transform: none; /* Disable hover on mobile */
    }
    
    .card-flip-container.spread-left,
    .card-flip-container.spread-right {
        transform: none !important; /* Disable spread on mobile */
    }

    .card-flip-container.flipped {
        transform: none;
    }

    .card-front,
    .card-back {
        min-height: 400px;
        padding: 20px;
    }

    .card-front h3 {
        font-size: 18px;
        margin-top: 15px;
    }
    
    .card-issuer {
        font-size: 13px;
    }
    
    .card-summary {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .flip-hint {
        font-size: 12px;
    }

    .card-back h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .card-detail-label {
        font-size: 11px;
    }
    
    .card-detail-content {
        font-size: 13px;
    }
    
    .benefits-list li {
        font-size: 13px;
    }
    
    .apply-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .real-card-image {
        height: 180px;
        object-fit: contain !important;
        background: transparent;
        padding: 10px 0;
    }
    
    .credit-card {
        height: 180px;
    }

    .navigation {
        padding: 16px;
        gap: 12px;
    }

    .nav-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .step-indicator {
        font-size: 13px;
    }
    
    .restart-button {
        margin-top: 40px;
        margin-bottom: 40px;
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .start-survey-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .carousel-track img {
        height: 70px; /* Even smaller on tiny screens */
    }

    .question-title {
        font-size: 24px;
        margin-bottom: 25px;
        text-align: center;
        padding: 0 15px;
    }

    .results-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .content-wrapper {
        padding: 30px 15px 120px;
        width: 100%;
    }
    
    .question-step {
        padding: 0 5px;
    }
    
    .options-grid {
        max-width: 100%;
        padding: 0 5px;
    }

    .cards-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 15px;
        gap: 20px;
        position: relative !important;
    }

    .card-flip-container {
        position: relative !important;
        left: 0 !important;
        top: auto !important;
        transform: none !important;
        max-width: 300px;
        height: 380px;
        margin: 0 auto !important;
    }
    
    /* Remove all nth-child positioning on small mobile */
    .card-flip-container:nth-child(1),
    .card-flip-container:nth-child(2),
    .card-flip-container:nth-child(3),
    .card-flip-container:nth-child(4),
    .card-flip-container:nth-child(5),
    .card-flip-container:nth-child(6),
    .card-flip-container:nth-child(7),
    .card-flip-container:nth-child(8),
    .card-flip-container:nth-child(9),
    .card-flip-container:nth-child(10) {
        position: relative !important;
        left: 0 !important;
        top: auto !important;
        transform: none !important;
    }

    .card-front h3 {
        font-size: 16px;
        margin-top: 12px;
    }
    
    .card-issuer {
        font-size: 12px;
    }
    
    .card-summary {
        font-size: 12px;
    }

    .card-front,
    .card-back {
        min-height: 360px;
        padding: 18px;
    }

    .card-back h3 {
        font-size: 16px;
    }
    
    .card-detail-content {
        font-size: 12px;
    }
    
    .benefits-list li {
        font-size: 12px;
    }
    
    .real-card-image {
        height: 160px;
        object-fit: contain !important;
        background: transparent;
        padding: 10px 0;
    }
    
    .credit-card {
        height: 160px;
    }
    
    .nav-button {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .option-main {
        font-size: 13px;
    }
    
    .option-label {
        padding: 12px 16px;
    }
    
    .restart-button {
        margin-top: 50px;
        margin-bottom: 50px;
        padding: 14px;
        font-size: 14px;
    }
}
