/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Only prevent horizontal scroll, allow vertical */
    overflow-y: auto; /* Allow vertical scrolling */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFE8EC 100%) fixed;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    /* Use dynamic viewport height for better PWA support */
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

.app-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden; /* Only prevent horizontal scroll */
    overflow-y: visible; /* Allow scrolling */
    background: linear-gradient(180deg, #FFF5F7 0%, #FFE8EC 100%);
    /* Add safe area padding for PWA */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar.active {
    opacity: 1;
}

.progress-fill {
    height: 100%;
    background: #FF6B85;
    width: 11.11%;
    transition: width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: scroll; /* Force scroll even if content fits */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFE8EC 100%);
    /* Safe area padding already on body, but add extra bottom padding for content */
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 40px);
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.screen.exit-left {
    transform: translateX(-100%);
}

.screen.exit-right {
    transform: translateX(100%);
}

.screen.from-left {
    transform: translateX(-100%);
}

.screen.from-left.active {
    transform: translateX(0);
}

.content-wrapper {
    width: 100%;
    max-width: 1000px;
    padding: 60px 60px 40px 60px;
    text-align: center;
    flex-shrink: 0; /* Prevent wrapper from shrinking */
}

/* Logo Header */
.logo-header {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 60px;
    width: auto;
    cursor: pointer;
    max-width: 400px;
}

/* Typography */
.title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    margin-bottom: 30px;
}

.subtitle {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.5;
    color: #666;
    margin-bottom: 60px;
}

.screen-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    margin-bottom: 30px;
}

.screen-subtitle {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.5;
    color: #666;
    margin-bottom: 40px;
}

.question {
    font-size: 28px;
    font-weight: 500;
    color: #333;
    margin-bottom: 40px;
}

/* Hero Content */
.hero-content {
    margin-top: 180px;
    position: relative;
    padding-bottom: 20px;
}

.pink-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 133, 0.4) 0%, transparent 70%);
    top: -200px;
    left: -250px;
    filter: blur(80px);
    pointer-events: none;
}

/* Quiz Content */
.quiz-content {
    margin-top: 120px;
    padding-bottom: 20px;
}

/* Light Background Card */
.light-bg-card {
    background: linear-gradient(180deg, #E6F4FF 0%, #D4E9FF 100%);
    border-radius: 30px;
    padding: 80px 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Email Card - Consistent padding */
.email-card {
    padding: 80px 80px !important;
}

/* Buttons */
.btn-primary {
    background: white;
    color: #333;
    border: none;
    padding: 30px 60px;
    font-size: 26px;
    font-weight: 500;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    min-width: 400px;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.arrow {
    font-size: 32px;
    transition: transform 0.3s ease;
}

.btn-primary:hover .arrow {
    transform: translateX(5px);
}

/* Option Buttons */
.options-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn, .option-btn-large {
    background: white;
    border: 3px solid transparent;
    padding: 35px 45px;
    font-size: 24px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn-large {
    padding: 40px 50px;
    font-size: 26px;
    text-align: left;
    justify-content: flex-start;
    min-height: 120px;
}

.option-btn:hover, .option-btn-large:hover {
    background: #FFF0F3;
    border-color: #FF6B85;
    transform: translateY(-2px);
}

.option-btn:active, .option-btn-large:active {
    transform: translateY(0);
}

.option-btn.selected, .option-btn-large.selected {
    background: #FF6B85;
    color: white;
    border-color: #FF6B85;
}

/* Email Form */
.email-input {
    width: 100%;
    max-width: 600px;
    padding: 30px 35px;
    font-size: 26px;
    border: 3px solid #E0E0E0;
    border-radius: 20px;
    margin: 0 auto 30px;
    background: white;
    transition: all 0.3s ease;
    display: block;
}

.email-input:focus {
    outline: none;
    border-color: #FF6B85;
}

.email-input::placeholder {
    color: #999;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 20px;
    color: #666;
}

/* Results Ready Indicator */
.results-ready-indicator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto; /* Reduced from 40px */
    animation: pulseGlow 2s ease-in-out infinite;
}

.results-ready-indicator .checkmark {
    color: white;
    font-size: 72px;
    font-weight: bold;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(76, 175, 80, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
}

/* Email Primary Section */
.email-primary-section {
    margin-top: 30px;
}

.email-value-prop {
    text-align: center;
    margin-bottom: 30px;
}

.email-heading {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.email-subheading {
    font-size: 18px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

.privacy-note {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 15px;
    font-style: italic;
}

.btn-skip {
    margin-top: 25px;
    background: transparent;
    color: #999;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: underline;
}

.btn-skip:hover {
    color: #666;
}

.btn-skip-large {
    font-size: 18px;
    padding: 18px 35px;
    margin-top: 30px;
}

.btn-email-submit {
    margin-top: 25px;
    width: 100%;
    max-width: 500px;
}

/* Redesigned Email Capture Screen */
.email-card-redesigned {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.email-form-redesigned {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-input-group {
    display: flex;
    flex-direction: column; /* Always stack vertically */
    gap: 15px;
    align-items: center; /* Center the form elements */
    max-width: 100%; /* Full width by default */
    margin: 0 auto;
    width: 100%;
}

.email-input-redesigned {
    width: 100%; /* Full width of container */
    max-width: 500px; /* Max width for centering */
    margin: 0;
    font-size: 22px;
    padding: 25px 30px;
}

.btn-email-submit-inline {
    background: #FF6B85;
    color: white;
    border: none;
    padding: 25px 40px;
    font-size: 22px;
    font-weight: 600;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%; /* Full width of container */
    max-width: 500px; /* Match input width */
}

.btn-email-submit-inline:hover {
    background: #FF5575;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 133, 0.4);
}

.checkbox-below {
    margin: 0;
    font-size: 16px;
}

.skip-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-text-link {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    font-weight: 700; /* Bold for better visibility */
    cursor: pointer;
    padding: 10px 20px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-text-link:hover {
    color: #FF6B85;
    transform: translateX(5px);
}

/* Button Variants */
.btn-large {
    padding: 35px 70px;
    font-size: 30px;
    min-width: 450px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: #FF6B85;
    border: 3px solid #FF6B85;
    padding: 28px 50px;
    font-size: 24px;
    font-weight: 500;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 400px;
}

.btn-secondary:hover {
    background: #FF6B85;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 133, 0.3);
}

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

/* LED Fact */
.led-fact {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-size: 20px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.lightning {
    font-size: 28px;
}

/* Results Screen */
.results-content {
    margin-top: 160px;
    padding-bottom: 100px; /* Extra padding to ensure scrollable area */
    min-height: calc(100vh + 200px); /* Force content to be taller than viewport */
}

.results-title {
    font-size: 28px;
    font-weight: 500;
    color: #666;
    margin-bottom: 5px;
}

.mask-name {
    font-size: 52px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

/* Results Layout */
.results-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 35px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.mask-display {
    position: relative;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

.mask-image-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 380px;
    margin: 0 auto 30px;
}

.pink-glow-large {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 133, 0.4) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    pointer-events: none;
}

.mask-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* Wavelength Info */
.wavelength-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    max-width: 400px;
}

.wavelength-badge {
    padding: 18px 30px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.wavelength-red {
    background: rgba(255, 107, 133, 0.3);
    color: #333;
}

.wavelength-infrared {
    background: rgba(255, 150, 150, 0.25);
    color: #333;
}

.wavelength-deep {
    background: rgba(180, 140, 140, 0.25);
    color: #333;
}

.wavelength-blue {
    background: rgba(106, 168, 234, 0.35);
    color: #333;
}

.wavelength-red-secondary {
    background: rgba(255, 180, 190, 0.3);
    color: #333;
}

/* Benefits Section */
.benefits-section {
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.led-count {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

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

.benefits-list li {
    font-size: 20px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.time-commitment {
    font-size: 22px;
    color: #333;
    margin-top: 20px;
}

/* Important Note */
.important-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 200, 150, 0.2);
    padding: 20px 30px;
    border-radius: 15px;
    margin: 0 auto 35px;
    max-width: 750px;
}

.note-icon {
    font-size: 32px;
    font-weight: bold;
    color: #FF6B85;
    flex-shrink: 0;
    line-height: 1;
}

.important-note p {
    font-size: 18px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

.results-description {
    font-size: 22px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Start Again Button */
/* QR Code Section */
.qr-section {
    text-align: center;
    margin: 30px auto 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    max-width: 350px;
}

.qr-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.qr-code {
    width: 180px;
    height: 180px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.btn-start-again {
    background: #FF6B85 !important;
    color: white !important;
}

.btn-start-again:hover {
    background: #FF5570 !important;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #FF6B85;
    color: #FF6B85;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #FF6B85;
    color: white;
    transform: translateX(-2px);
}

.back-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.back-button:hover .back-arrow {
    transform: translateX(-2px);
}


/* Admin Panel */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-panel.active {
    display: flex;
}

.admin-content {
    background: white;
    padding: 60px;
    border-radius: 30px;
    max-width: 600px;
    width: 90%;
}

.admin-content h3 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
}

.admin-content p {
    font-size: 24px;
    margin-bottom: 30px;
    color: #666;
}

.admin-content button {
    display: block;
    width: 100%;
    padding: 25px;
    margin-bottom: 15px;
    background: #FF6B85;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-content button:hover {
    background: #FF5570;
}

.admin-content button:last-child {
    background: #666;
}

.admin-content button:last-child:hover {
    background: #555;
}

/* iPad Specific Styles - Already optimized above for iPad */
@media screen and (min-width: 768px) and (max-width: 1366px) {
    /* Content is already sized appropriately for iPads */
}

/* iPhone/Mobile Responsive Styles */
@media screen and (max-width: 767px) {
    .content-wrapper {
        max-width: 100%;
        padding: 30px 25px 40px 25px;
    }

    .logo {
        height: 35px;
        max-width: 220px;
    }

    .logo-header {
        top: max(20px, env(safe-area-inset-top));
    }

    /* Typography - Mobile */
    .title {
        font-size: 42px;
        margin-bottom: 20px;
    }

    .subtitle {
        font-size: 18px;
        margin-bottom: 40px;
    }

    .screen-title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .screen-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .question {
        font-size: 18px;
        margin-bottom: 30px;
    }

    /* Buttons - Mobile */
    .btn-primary {
        padding: 20px 40px;
        font-size: 18px;
        min-width: 280px;
    }

    .btn-large {
        padding: 22px 45px;
        font-size: 20px;
        min-width: 300px;
    }

    .btn-secondary {
        padding: 18px 35px;
        font-size: 16px;
        min-width: 260px;
    }

    .arrow {
        font-size: 22px;
    }

    /* Option Buttons - Mobile */
    .options-grid-2col {
        gap: 15px;
        margin-top: 30px;
        max-width: 100%;
    }

    .options-list {
        gap: 15px;
        margin-top: 30px;
        max-width: 100%;
    }

    .option-btn, .option-btn-large {
        padding: 20px 30px;
        font-size: 16px;
        min-height: 70px;
        border-radius: 16px;
    }

    .option-btn-large {
        padding: 22px 30px;
        font-size: 17px;
        min-height: 75px;
    }

    /* Content Sections - Mobile */
    .hero-content {
        margin-top: 100px;
        padding-bottom: 20px;
    }

    .quiz-content {
        margin-top: 65px;
        padding-bottom: 20px;
    }

    .pink-glow {
        width: 300px;
        height: 300px;
        top: -150px;
        left: -150px;
    }

    /* Light Card - Mobile */
    .light-bg-card {
        padding: 40px 25px;
        max-width: 100%;
    }

    .email-card {
        padding: 35px 25px 30px 25px !important;
    }

    /* Email Form - Mobile */
    .email-input {
        max-width: 100%;
        padding: 18px 25px;
        font-size: 16px;
        margin-bottom: 20px;
    }

    .checkbox-container input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .checkbox-text {
        font-size: 14px;
    }

    .results-ready-indicator {
        width: 80px;
        height: 80px;
        margin: 15px auto; /* Reduced from 30px */
    }

    .results-ready-indicator .checkmark {
        font-size: 48px;
    }

    .email-primary-section {
        margin-top: 25px;
    }

    .email-heading {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .email-subheading {
        font-size: 15px;
        line-height: 1.4;
        padding: 0 5px;
    }

    .privacy-note {
        font-size: 12px;
        margin-top: 12px;
    }

    .btn-skip {
        margin-top: 20px;
        font-size: 15px;
        padding: 12px 25px;
    }

    .btn-skip-large {
        font-size: 17px;
        padding: 16px 30px;
        margin-top: 25px;
    }

    .btn-email-submit {
        margin-top: 20px;
        font-size: 18px;
    }
    
    /* Email group already stacked vertically in base styles */
    .email-input-group {
        max-width: 100% !important; /* Override desktop 600px for all mobile screens */
    }
    
    .email-input-redesigned {
        width: 100%;
        font-size: 18px;
        padding: 20px 25px;
    }
    
    .btn-email-submit-inline {
        width: 100%;
        font-size: 20px;
        padding: 20px 35px;
    }
    
    .checkbox-below {
        font-size: 14px;
    }
    
    /* Keep skip link readable size */
    .btn-text-link {
        font-size: 18px; /* Keep original size */
        padding: 10px 20px; /* Keep original padding */
    }
    
    .skip-section {
        padding-top: 15px;
    }
    
    .email-card-redesigned {
        gap: 25px;
    }

    /* LED Facts - Mobile */
    .led-fact {
        margin-top: 40px;
        padding: 20px;
        font-size: 14px;
        border-radius: 12px;
        max-width: 100%;
    }

    .lightning {
        font-size: 18px;
    }

    /* Results Screen - Mobile */
    .results-content {
        margin-top: 80px;
        padding-bottom: 40px;
    }

    .results-title {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .mask-name {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .results-layout {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 25px;
    }

    .mask-display {
        width: 240px;
        height: 240px;
    }

    .mask-image-container {
        max-width: 240px;
        height: 240px;
        margin: 0 auto 20px;
    }

    .pink-glow-large {
        width: 300px;
        height: 300px;
    }

    .wavelength-info {
        max-width: 100%;
        gap: 12px;
    }

    .wavelength-badge {
        padding: 14px 25px;
        font-size: 16px;
    }

    .benefits-section {
        margin-bottom: 25px;
    }

    .led-count {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .benefits-list li {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .time-commitment {
        font-size: 18px;
        margin-top: 15px;
    }

    .important-note {
        padding: 15px 20px;
        margin-bottom: 25px;
        gap: 12px;
    }

    .note-icon {
        font-size: 24px;
    }

    .important-note p {
        font-size: 14px;
    }

    .results-description {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 30px;
        max-width: 100%;
    }

    /* QR Section - Mobile */
    .qr-section {
        margin: 20px auto 25px;
        padding: 20px;
        max-width: 90%;
    }
    
    .qr-message {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    /* Start Again Button - Mobile */
    .btn-start-again {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    /* Back Button - Mobile */

    /* Admin Panel - Mobile */
    .admin-content {
        padding: 40px 30px;
        max-width: 90%;
    }

    .admin-content h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .admin-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .admin-content button {
        padding: 18px;
        font-size: 16px;
    }
}

/* iPhone-specific overrides (max-width: 600px) */
@media screen and (max-width: 600px) {
    /* Aggressively reduce email card padding to fit content within viewport */
    .email-card {
        padding: 25px 20px 20px 20px !important;
    }
    
    /* Tighten spacing on redesigned email card */
    .email-card-redesigned {
        gap: 16px !important;
    }
    
    /* Make checkmark indicator smaller */
    .results-ready-indicator {
        width: 70px !important;
        height: 70px !important;
        margin: 10px auto !important; /* Small margin */
    }
    
    .results-ready-indicator .checkmark {
        font-size: 36px !important;
    }
    
    /* Reduce screen title size */
    .screen-title {
        font-size: 28px !important;
        margin-bottom: 12px !important;
    }
    
    /* Reduce form spacing */
    .email-form-redesigned {
        gap: 12px !important;
    }
    
    /* Make email input group tighter and full width on mobile */
    .email-input-group {
        gap: 10px !important;
        max-width: 100% !important; /* Override desktop 600px to prevent overflow on narrow screens */
    }
    
    /* Smaller text on heading */
    .email-heading {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    
    /* Reduce skip section padding */
    .skip-section {
        padding-top: 10px !important;
        margin-top: 0 !important;
    }
    
    /* Smaller privacy note */
    .privacy-note {
        font-size: 11px !important;
        margin-top: 6px !important;
    }
    
    /* Ensure screen has proper scrolling */
    .screen {
        padding-bottom: calc(env(safe-area-inset-bottom, 0) + 20px) !important;
    }
    
    /* REDUCE quiz content spacing (was 65px on mobile, now even less) */
    .quiz-content {
        margin-top: 50px !important;
    }
    
    /* Make email primary section more compact */
    .email-primary-section {
        margin-bottom: 0 !important;
    }
    
    /* Make back button smaller on mobile but keep it scrolling */
    .back-button {
        position: absolute !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    
    .back-arrow {
        font-size: 16px !important;
    }
}

/* iPad Portrait Specific Styles (768px-1100px) */
@media (min-width: 768px) and (max-width: 1100px) {
    /* Reduce overall padding for iPad but don't change positioning */
    .content-wrapper {
        padding: 30px 20px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Keep logo positioned properly */
    .logo-header {
        top: 40px !important; /* Slightly reduce from 50px */
    }
    
    .logo {
        max-width: 260px !important;
        height: 50px !important;
    }
    
    /* Hero content spacing - generous clearance for logo + decorative glow */
    .hero-content {
        margin-top: clamp(160px, 20vh, 200px) !important; /* Responsive clearance ensures no overlap */
        padding: 0 20px !important;
    }
    
    /* Scale down typography */
    .title {
        font-size: 42px !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
    }
    
    .subtitle {
        font-size: 20px !important;
        line-height: 1.4 !important;
        margin-bottom: 30px !important;
    }
    
    .screen-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }
    
    .screen-subtitle {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
    
    /* Reduce card padding significantly */
    .light-bg-card {
        padding: 35px !important;
        max-width: 90% !important;
        margin: 0 auto !important;
    }
    
    /* Fix quiz content spacing - universal clearance for absolutely positioned logo */
    .quiz-content {
        margin-top: 120px !important; /* Logo at 40px + 50px height + 30px spacing = 120px minimum clearance */
        padding: 0 20px !important;
    }
    
    /* Make all buttons responsive */
    .btn-primary {
        min-width: unset !important;
        width: 100% !important;
        max-width: 500px !important;
        padding: 18px 30px !important;
        font-size: 17px !important;
    }
    
    .option-btn {
        min-width: unset !important;
        width: 100% !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
    }
    
    .option-btn-large {
        min-width: unset !important;
        width: 100% !important;
        padding: 18px 25px !important;
        font-size: 16px !important;
    }
    
    /* Fix button grids */
    .options-grid-2col {
        max-width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 !important;
    }
    
    .options-list {
        gap: 15px !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Don't override back button - let it use its original styles */
    
    /* Fix email screen - CRITICAL */
    .email-card-redesigned {
        padding: 30px !important;
        max-width: 90% !important;
    }
    
    /* Email group already stacked in base styles, no override needed */
    
    .email-input-redesigned {
        width: 100% !important;
        max-width: none !important;
        font-size: 16px !important;
        padding: 14px !important;
    }
    
    .btn-email-submit-inline {
        width: 100% !important;
        min-width: unset !important;
        padding: 16px !important;
        font-size: 17px !important;
    }
    
    .checkbox-container {
        margin: 15px 0 !important;
    }
    
    .checkbox-text {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    /* Results screen adjustments - responsive clearance like hero */
    .results-content {
        padding: 20px !important;
        margin-top: clamp(160px, 20vh, 200px) !important; /* Match hero clearance for safety */
    }
    
    .results-title {
        font-size: 24px !important;
        margin-bottom: 8px !important;
    }
    
    .mask-name {
        font-size: 36px !important;
        margin-bottom: 30px !important;
    }
    
    .mask-image {
        max-width: 280px !important;
        height: auto !important;
    }
    
    /* LED facts spacing */
    .led-fact {
        padding: 12px 16px !important;
        font-size: 13px !important;
        margin-top: 25px !important;
    }
    
    /* Reduce all vertical spacing */
    .question {
        margin-bottom: 20px !important;
        font-size: 17px !important;
    }
    
    /* Benefits section */
    .benefits-section {
        padding: 20px !important;
        margin: 20px auto !important;
    }
    
    .benefits-list {
        font-size: 15px !important;
        line-height: 1.8 !important;
    }
    
    /* Skip section */
    .skip-section {
        margin-top: 20px !important;
    }
    
    /* Keep skip link larger */
    .btn-text-link {
        font-size: 18px !important; /* Restored original size */
    }
    
    /* Ensure content fits without scrolling */
    .screen {
        padding-bottom: 20px !important;
    }
    
    /* Progress bar position */
    .progress-bar {
        top: 0 !important;
    }
}

/* Disable text selection for kiosk mode */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Landscape Orientation Warning Overlay */
.orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFE8EC 100%);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.orientation-warning h2 {
    font-size: 32px;
    font-weight: 600;
    color: #FF6B85;
    margin-bottom: 16px;
}

.orientation-warning p {
    font-size: 18px;
    color: #666;
    max-width: 400px;
    line-height: 1.5;
}

/* Show warning only in landscape orientation */
@media (orientation: landscape) and (max-width: 1024px) {
    .orientation-warning {
        display: flex;
    }
    
    /* Hide the main app content when in landscape */
    .app-container {
        display: none;
    }
}
