/* ============================================================================
   SKELETON-BASED LAYOUT CSS
   ============================================================================
   Modern layout structure matching skeleton.html design
   Poppins font, hero section with video/form, details section with slideshow
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================================================
   BASE STYLES
   ============================================================================ */

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--matte-black);
    margin: 0;
    padding: 0;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--matte-black);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/limitless-bg-dark.png');
    background-repeat: repeat;
    background-position: top center;
    background-size: 600px auto;
    opacity: 0.2;
    z-index: 1;
}



.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-bottom: var(--spacing-2xl);
}

.hero-content-wrapper {
    width: 100%;
}

/* Hero Title Section */
.hero-title-section {
    text-align: center;
    color: var(--white);
}

.hero-sponsor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--light-gray);
    font-size: var(--font-size-sm);
    margin: 0 0 var(--spacing-lg) 0;
}

.hero-sponsor img {
    height: 20px;
    width: auto;
}

.hero-main-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem); /* Responsive scaling from 5xl to 6xl */
    font-weight: var(--font-weight-bold);
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
    color: var(--white);
}

.hero-cash-option {
    font-size: clamp(1.25rem, 4vw, 2rem); /* Smaller than main title */
    font-weight: var(--font-weight-medium);
    color: var(--white);
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    display: none;
}

.hero-highlight {
    color: var(--ford-red);
}

/* Hero Main Content - Video & Form */
.hero-main-content {
    display: flex;
    gap: var(--spacing-2xl);
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--spacing-xl);
}

/* Left Content - Video */
.left-content {
    display: flex;
    flex-direction: column;
    max-width: 380px;
    width: 100%;
}

/* Video Container */
.video-container {
    width: 100%;
    margin: 0 auto;
}

/* Brand Logo */
.brand-logo-container {
    width: 100%;
    text-align: center;
    margin-top: var(--spacing-xl);
}

.brand-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
}

.video-wrapper {
    position: relative;
    background-color: var(--dark-grey);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    aspect-ratio: 9/16; /* Portrait video */
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-grey);
    color: var(--medium-grey);
}

/* Entry Form Container */
.entry-form-container {
    width: 100%;
    max-width: 672px; /* max-w-2xl equivalent */
    margin: 0 auto;
}


.entry-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--spacing-sm);
    width: 100%;
    margin: 0 auto;
}

.entry-form-inner {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Form Header Image */
.form-header-image {
    width: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Promo Section */
.promo-section {
    background: var(--matte-black);
    padding: var(--spacing-md) var(--spacing-sm);
}

.promo-title {
    color: var(--white);
    font-size: clamp(1.25rem, 6vw, 3rem); /* Scales down on smaller viewports */
    font-family: 'Fjalla One', sans-serif;
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

.promo-info-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.promo-text h3 {
    color: var(--white);
    font-family: 'Fjalla One', sans-serif;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    line-height: var(--line-height-tight);
    margin: 0;
}

.promo-text p {
    color: var(--secondary-yellow);
    font-family: 'Fjalla One', sans-serif;
    font-size: var(--font-size-base);
    line-height: var(--line-height-tight);
    margin: 0;
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    gap: var(--spacing-xs);
}

.countdown-box {
    background: var(--matte-black);
    border: 1px solid var(--medium-gray);
    padding: var(--spacing-xs);
    text-align: center;
    border-radius: var(--radius-sm);
    min-width: 40px;
}

.countdown-value {
    color: var(--white);
    font-size: var(--font-size-2xl);
    font-weight: normal;
    font-family: 'Fjalla One', sans-serif;
    display: block;
    line-height: 0.5;
    margin-top: var(--spacing-sm);
}

.countdown-value.highlight {
    color: var(--secondary-yellow);
}

.countdown-label {
    color: var(--white);
    font-size: 8px;
    font-family: 'Fjalla One', sans-serif;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

.countdown-label.highlight {
    color: var(--secondary-yellow);
}

/* Form Content Area */
.form-content {
    padding: var(--spacing-lg) 0 0;
}

.form-content .module-wrapper {
    width: 100%;
}

/* Form Footer */
.form-footer {
    text-align: center;
    padding: 0 var(--spacing-md) var(--spacing-lg);
}

.form-footer-privacy {
    font-size: var(--font-size-xs);
    color: var(--dark-gray);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-sm);
}

.form-footer-links {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

.footer-consent {
    padding-bottom: var(--spacing-md);
}

.form-footer-links a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.form-footer-links a:hover {
    color: var(--dark-gray);
}

/* Enter Now Button */
.enter-now-button {
    background: var(--warning-orange);
    color: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    border: none;
    cursor: pointer;
    width: 100%;
}

.enter-now-button:hover {
    background: var(--warning-orange);
    filter: brightness(1.1);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Responsive breakpoints */

@media (min-width: 768px) {
    .promo-title {
        font-size: var(--font-size-2xl); /* Fixed size on tablet and desktop */
    }
}

@media (min-width: 1024px) {
    .promo-title {
        font-size: var(--font-size-2xl); /* Fixed size on desktop */
    }
    
    .entry-form-container {
        width: auto;
        margin: 0;
    }
    
    .entry-form {
        max-width: 330px;
        margin: 0;
    }
}

@media (max-width: 1024px) {
    .left-content {
        max-width: 450px;
    }
    
    .video-container {
        max-width: 100%;
        width: 100%;
    }
    
    .promo-text h3 {
        font-size: var(--font-size-xl);
    }
    
    .promo-text p {
        font-size: var(--font-size-xl);
    }
}

@media (min-width: 768px) {
    .hero-container {
        padding: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .hero-main-content {
        flex-direction: column;
        align-items: center;
    }
    
    .left-content {
        max-width: 100%;
    }
    
    .entry-form-container {
        width: 100%;
        max-width: 100%;
    }
    
    .entry-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    
    .promo-info-wrapper {
        gap: var(--spacing-sm);
    }
    
    .promo-text {
        flex-shrink: 1;
        min-width: 0;
    }
    
    .promo-text h3 {
        font-size: var(--font-size-base);
    }
    
    .promo-text p {
        font-size: var(--font-size-xs);
    }
    
    .countdown-timer {
        flex-shrink: 0;
    }
}

/* ============================================================================
   MODULE INTEGRATION STYLES
   ============================================================================ */

/* Double red line separator */
.double-red-line {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: var(--spacing-2xl) 0;
}

.double-red-line .red-bar {
    height: 26px;
    background-color: var(--ford-red);
    width: 100%;
    display: block;
}

/* Remove old split-screen layout */
#app-prequiz-v1 .split-screen-layout {
    display: none;
}

/* Ensure modules fit within form container */
#app-prequiz-v1 .module-wrapper {
    max-width: 100%;
    padding: 0;
}

/* Adjust progress bar for new container */
#app-prequiz-v1 .progress-container {
    margin-bottom: var(--spacing-lg);
}

/* Hide tire tread patterns */
.tire-tread-pattern {
    background: none !important;
}

/* Ensure footer displays correctly */
#app-footer-v1 {
    margin-top: 0;
}

/* Quiz container adjustments */
#app-prequiz-v1 .prequiz-container {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* Question content styling */
#app-prequiz-v1 .question-content {
    text-align: center;
}

/* Button styling adjustments */
#app-prequiz-v1 .btn-primary {
    background: var(--warning-orange);
    border: none;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: var(--font-weight-semibold);
}

#app-prequiz-v1 .btn-primary:hover {
    background: var(--warning-orange);
    filter: brightness(1.1);
}

/* Registration form styling */
#app-prequiz-v1 .registration-form input:not([type="checkbox"]) {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    background: var(--light-gray);
}

/* Postquiz container adjustments */
#app-prequiz-v1 .postquiz-container {
    background: transparent;
    padding: 0;
}

/* Thank you container adjustments */
#app-prequiz-v1 .thankyou-container {
    background: transparent;
    padding: 0;
}

/* Footer styling updates */
#app-footer-v1 .footer-wrapper {
    background: var(--dark-grey);
    color: var(--light-gray);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Ensure video container doesn't overflow */
    /* Keep portrait aspect ratio on all screen sizes */
    
    /* Adjust font sizes for mobile */
    .promo-text h3 {
        font-size: var(--font-size-lg);
    }
    
    .promo-text p {
        font-size: var(--font-size-lg);
    }
    
    /* Ensure touch targets are large enough */
    .slide-dot {
        width: 12px;
        height: 12px;
    }
}

/* Ensure smooth module transitions */
.module-wrapper {
    transition: opacity 0.3s ease;
}

/* Fix any z-index issues */
.hero-container {
    position: relative;
    z-index: 10;
}

.entry-form {
    position: relative;
    z-index: 20;
}

/* ============================================================================
   DUPLICATE USER MODAL
   ============================================================================ */

#app-prequiz-v1 #duplicate-user-modal,
#app-prequiz-v1 #active-subscription-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

#app-prequiz-v1 #duplicate-user-modal .modal-container,
#app-prequiz-v1 #active-subscription-modal .modal-container {
    max-width: 400px;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
}

#app-prequiz-v1 #duplicate-user-modal .modal-close,
#app-prequiz-v1 #active-subscription-modal .modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: color var(--transition-fast);
}

#app-prequiz-v1 #duplicate-user-modal .modal-close:hover,
#app-prequiz-v1 #active-subscription-modal .modal-close:hover {
    color: var(--text-primary);
}

#app-prequiz-v1 #duplicate-user-modal .modal-close:focus,
#app-prequiz-v1 #active-subscription-modal .modal-close:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

#app-prequiz-v1 #duplicate-user-modal .modal-content,
#app-prequiz-v1 #active-subscription-modal .modal-content {
    text-align: center;
}

#app-prequiz-v1 #duplicate-user-modal .modal-title,
#app-prequiz-v1 #active-subscription-modal .modal-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md);
}

#app-prequiz-v1 #duplicate-user-modal .modal-text,
#app-prequiz-v1 #active-subscription-modal .modal-text {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin: 0 0 var(--spacing-md);
}

#app-prequiz-v1 #duplicate-user-modal .modal-text:last-of-type,
#app-prequiz-v1 #active-subscription-modal .modal-text:last-of-type {
    margin-bottom: var(--spacing-lg);
}

#app-prequiz-v1 #duplicate-user-modal .modal-login-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

/* Modal footnote */
#app-prequiz-v1 .modal-footnote {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
    line-height: var(--line-height-relaxed);
    font-style: italic;
    text-align: center;
}

/* Active Subscription Modal Specific Styles */
#app-prequiz-v1 #active-subscription-modal .app-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    align-items: center;
}

/* App Store Button Styles */
#app-prequiz-v1 .app-store-btn,
#app-prequiz-v1 .google-play-btn {
    display: inline-block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    width: 200px;
    height: 60px;
}

#app-prequiz-v1 .app-store-btn:hover,
#app-prequiz-v1 .google-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#app-prequiz-v1 .app-store-btn {
    background: #000;
    border: 1px solid #000;
}

#app-prequiz-v1 .google-play-btn {
    background: #000;
    border: 1px solid #000;
}

#app-prequiz-v1 .store-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 16px;
    gap: 12px;
}

#app-prequiz-v1 .store-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

#app-prequiz-v1 .app-store-btn .store-icon {
    color: #fff;
}

#app-prequiz-v1 .google-play-btn .store-icon {
    color: #fff;
}

#app-prequiz-v1 .store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

#app-prequiz-v1 .store-label {
    font-size: 10px;
    color: #fff;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

#app-prequiz-v1 .store-name {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

#app-prequiz-v1 #active-subscription-modal .qr-container {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

#app-prequiz-v1 #active-subscription-modal .qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: block;
}

#app-prequiz-v1 #active-subscription-modal .qr-instruction {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
    text-align: center;
}

/* Mobile/Desktop Visibility */
#app-prequiz-v1 .mobile-only {
    display: none;
}

#app-prequiz-v1 .desktop-only {
    display: block;
}

/* Mobile responsive */
@media (max-width: 480px) {
    /* Show mobile content, hide desktop content */
    #app-prequiz-v1 .mobile-only {
        display: block;
    }

    #app-prequiz-v1 .desktop-only {
        display: none;
    }

    #app-prequiz-v1 #duplicate-user-modal .modal-container,
    #app-prequiz-v1 #active-subscription-modal .modal-container {
        padding: var(--spacing-lg);
    }

    #app-prequiz-v1 #duplicate-user-modal .modal-title,
    #app-prequiz-v1 #active-subscription-modal .modal-title {
        font-size: var(--font-size-xl);
    }
}

/* 2FA Verification Section Styling */
#app-prequiz-v1 .verification-section {
    margin: var(--spacing-lg) 0;
    text-align: center;
}

#app-prequiz-v1 .verification-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

#app-prequiz-v1 .otp-input-container {
    margin-bottom: var(--spacing-md);
}

#app-prequiz-v1 .otp-input {
    width: 100%;
    max-width: 200px;
    padding: var(--spacing-md);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    letter-spacing: 0.5em;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
    background: var(--white);
}

#app-prequiz-v1 .otp-input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

#app-prequiz-v1 .otp-input.error {
    border-color: var(--error-red);
}

#app-prequiz-v1 .otp-error-message {
    color: var(--error-red);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    min-height: 20px;
}

#app-prequiz-v1 .resend-container {
    margin-bottom: var(--spacing-lg);
}

#app-prequiz-v1 .resend-btn {
    background: none;
    border: none;
    color: var(--primary-orange);
    font-size: var(--font-size-sm);
    cursor: pointer;
    text-decoration: underline;
    transition: opacity var(--transition-fast);
    padding: var(--spacing-xs);
}

#app-prequiz-v1 .resend-btn:hover:not(:disabled) {
    opacity: 0.8;
}

#app-prequiz-v1 .resend-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: none;
}

#app-prequiz-v1 .resend-timer {
    margin-left: var(--spacing-xs);
}

/* Modal Spinner */
#app-prequiz-v1 .modal-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) 0;
}

#app-prequiz-v1 .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#app-prequiz-v1 .spinner-text {
    margin-top: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

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

#app-prequiz-v1 .modal-verify-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

/* Coupon Section Styling (keeping for backward compatibility) */
#app-prequiz-v1 .coupon-section {
    margin: var(--spacing-lg) 0;
    text-align: center;
}

#app-prequiz-v1 .coupon-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

#app-prequiz-v1 .coupon-code-box {
    display: inline-flex;
    align-items: center;
    background: var(--light-gray);
    border: 2px dashed var(--primary-orange);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    gap: var(--spacing-md);
    position: relative;
    transition: all var(--transition-fast);
}

#app-prequiz-v1 .coupon-code-box:hover {
    background: var(--off-white);
    transform: scale(1.02);
}

#app-prequiz-v1 .coupon-code {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-orange);
    letter-spacing: 0.1em;
    user-select: all;
}

#app-prequiz-v1 .copy-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--primary-orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#app-prequiz-v1 .copy-btn:hover {
    background: var(--primary-orange-dark);
    transform: translateY(-1px);
}

#app-prequiz-v1 .copy-btn.copied {
    background: var(--success-green);
}

#app-prequiz-v1 .copy-btn.copied .copy-text::before {
    content: "Copied!";
}

#app-prequiz-v1 .copy-btn.copied .copy-text {
    font-size: 0;
}

#app-prequiz-v1 .coupon-offer {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--spacing-sm);
}

/* Tooltip for copy feedback */
#app-prequiz-v1 .copy-tooltip {
    position: absolute;
    bottom: calc(100% + var(--spacing-xs));
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-grey);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

#app-prequiz-v1 .copy-tooltip.show {
    opacity: 1;
}

#app-prequiz-v1 .copy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--dark-grey);
}