/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #fff5f0 0%, #fed7aa 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

.lowercase {
    text-transform: lowercase;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Page System */
.page {
    display: none;
    min-height: 100vh;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

/* Questionnaire specific padding */
#questionnaire {
    padding-bottom: 120px; /* Space for fixed navigation */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 32px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly minimum */
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: #ff6600;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.btn-secondary {
    background: white;
    color: #ff6600;
    border: 2px solid #ff6600;
}

.btn-secondary:hover:not(:disabled) {
    background: #ff6600;
    color: white;
    transform: translateY(-2px);
}

/* Landing Page */
#landing {
    background-image: url('landing.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* CSS Stars */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 1.2s infinite ease-in-out;
    pointer-events: none;
}

.star::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 1.5s infinite ease-in-out reverse;
}

.star:nth-child(odd) {
    animation-duration: 0.8s;
}

.star:nth-child(even) {
    animation-duration: 1.4s;
}

.star:nth-child(3n) {
    animation-duration: 1.1s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.6);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
    75% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.landing-content {
    text-align: left;
    padding: 4rem 2rem;
    max-width: 500px;
    margin: 0;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(3px);
    margin-left: 2rem;
    margin-top: 2rem;
}

.landing-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ff6600;
    margin-bottom: 1rem;
    text-transform: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.landing-subtitle {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.landing-description {
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 3rem;
    line-height: 1.7;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.landing-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.test-btn {
    font-size: 0.9rem;
    opacity: 0.8;
    border-color: rgba(255, 102, 0, 0.6);
    color: rgba(255, 102, 0, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

/* Progress Bar */
.progress-container {
    position: sticky;
    top: 0;
    padding: 1rem;
    margin-bottom: 2rem;
    z-index: 50;
}

.progress-container.fixed-nav {
    position: sticky;
    top: 0;
    padding: 0.75rem 1rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(226, 232, 240, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6600, #ff8533);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    display: none; /* Hide progress counter text */
}

/* Question Container - Mobile First */
.question-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem 120px; /* Space for fixed navigation */
}

/* Slightly wider on tablets and desktop, but still mobile-first */
@media (min-width: 768px) {
    .question-container {
        max-width: 600px;
        padding: 0 1.5rem 120px;
    }
}

@media (min-width: 1024px) {
    .question-container {
        max-width: 700px;
        padding: 0 2rem 120px;
    }
}

.question {
    margin-bottom: 2rem;
}

.question-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #2d3748;
    text-align: center;
    margin-bottom: 2.5rem;
    text-transform: lowercase;
    font-weight: 500;
    line-height: 1.2;
}

/* Answer Container */
.answer-container {
    margin-top: 1.5rem;
}

.answer-label {
    display: block;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: lowercase;
}

.answer-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2d3748;
    background: white;
    resize: vertical;
    transition: all 0.2s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}

.answer-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Desktop enhancements for answer input */
@media (min-width: 768px) {
    .answer-container {
        margin-top: 2rem;
    }
    
    .answer-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .answer-input {
        min-height: 100px;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 16px;
    }
}



/* Chip Grid - Mobile First */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
    align-content: flex-start;
    flex-direction: row;
    /* Ensure consistent spacing with gap property */
    row-gap: 0.75rem;
    column-gap: 0.75rem;
}

/* Desktop spacing */
@media (min-width: 768px) {
    .chip-grid {
        gap: 1rem;
        row-gap: 1rem;
        column-gap: 1rem;
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
}

/* Mobile spacing */
@media (max-width: 767px) {
    .chip-grid {
        gap: 0.75rem;
        row-gap: 0.75rem;
        column-gap: 0.75rem;
        padding: 1rem;
        max-height: 40vh;
    }
}

.chip-grid::-webkit-scrollbar {
    width: 6px;
}

.chip-grid::-webkit-scrollbar-track {
    background: rgba(255, 102, 0, 0.1);
    border-radius: 3px;
}

.chip-grid::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 3px;
}

/* Chips - Mobile First with Keyboard Support */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: lowercase;
    min-height: 44px; /* Touch-friendly */
    position: relative;
    overflow: hidden;
    width: auto;
    flex: 0 0 auto; /* Prevent growing/shrinking */
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 0 !important; /* Ensure no margin interference with grid gap */
    
    /* Keyboard navigation */
    outline: none;
}

/* Desktop enhancements */
@media (min-width: 768px) {
    .chip {
        gap: 0.6rem;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 48px;
        border-radius: 26px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
}

.chip:hover,
.chip:focus {
    transform: translateY(-1px);
    border-color: #ff6600;
    background: rgba(255, 102, 0, 0.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chip:focus {
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chip.selected {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
    transform: translateY(-1px);
}

.chip.selected:hover,
.chip.selected:focus {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 3px 12px rgba(255, 102, 0, 0.3);
}

.chip.selected:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 3px 12px rgba(255, 102, 0, 0.3);
}

.chip.selected .chip-icon {
    color: white;
}

/* Desktop enhancements for chips */
@media (min-width: 768px) {
    .chip:hover,
    .chip:focus {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .chip:focus {
        box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .chip.selected {
        box-shadow: 0 4px 16px rgba(255, 102, 0, 0.3);
    }
    
    .chip.selected:hover,
    .chip.selected:focus {
        box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
    }
    
    .chip.selected:focus {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 6px 20px rgba(255, 102, 0, 0.4);
    }
}

.chip-icon {
    font-size: 1.2rem;
    color: #ff6600;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.chip-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Allow text to shrink */
}

/* Answer Input */
.answer-container {
    margin-bottom: 2rem;
}

.answer-label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.answer-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: white;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}



/* Navigation */
.navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.navigation-content {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Progress bar in fixed navigation */
.progress-container.fixed-nav .progress-bar {
    height: 6px;
}

.progress-container.fixed-nav .progress-text {
    display: none; /* Hide progress counter text in fixed nav */
}

/* Results Page */
#results {
    padding: 1rem 0;
    min-height: 100vh;
}

#results.active {
    display: flex;
    flex-direction: column;
}

.results-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1rem 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.02) 0%, rgba(255, 102, 0, 0.05) 100%);
    border-radius: 20px;
    margin: 0 1rem 2.5rem 1rem;
}

.results-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: #ff6600;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.results-subtitle {
    font-size: 1rem;
    color: #4a5568;
    text-transform: lowercase;
}

/* Modern Gift Cards Grid */
.gift-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mobile responsive grid */
@media (max-width: 768px) {
    .gift-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gift-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .gift-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Gift Box Reveal System - Mobile First */
.gift-card > * {
    padding: 0 0.75rem;
}

.gift-card .gift-image-container {
    padding: 0;
    margin: 0;
}

/* Gift Image Styles */
.gift-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    border-radius: 0; /* Remove inner border radius as container handles it */
    /* Ensure consistent loading state */
    background: #f7fafc;
}

.gift-image.loaded {
    opacity: 1;
}

.gift-image:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Loading animation for images */
.gift-image:not(.loaded) {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Error state for broken images */
.gift-image-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Phosphor';
    font-size: 2rem;
    color: rgba(255, 102, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Remove old error handling styles - no longer needed */

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

/* Gift Price Styling */
.gift-price {
    display: none;
}

/* Gift Actions */
.gift-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
    padding: 0.6rem 0.75rem 0.75rem;
    flex-shrink: 0;
}

/* Amazon Button */
.amazon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ff6600, #ff8533);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: lowercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
    min-height: 40px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.amazon-btn:hover {
    background: linear-gradient(135deg, #e55a00, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.3);
    text-decoration: none;
    color: white;
}

.amazon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.2);
}

.amazon-btn:focus {
    outline: 2px solid #ff6600;
    outline-offset: 2px;
}

.amazon-btn:focus:not(:focus-visible) {
    outline: none;
}

.amazon-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.amazon-btn:hover i {
    transform: translateX(2px);
}

/* Amazon Affiliate Disclosure - Hidden */
.affiliate-disclosure {
    display: none;
}

/* Modern Gift Card Layout */
.gift-card-modern {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 102, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gift-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 102, 0, 0.2);
}

/* Gift Image Wrapper */
.gift-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
}

.gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gift-card-modern:hover .gift-image {
    transform: scale(1.05);
}

.gift-category-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 102, 0, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(10px);
}

.gift-category-tag i {
    font-size: 0.8rem;
}

/* Gift Content Wrapper */
.gift-content-wrapper {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gift-title {
    color: #2d3748;
    font-size: 1.4rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gift Content Sections */
.gift-description, .gift-reaction, .gift-presentation {
    margin-bottom: 1.5rem;
}

.gift-description h4, .gift-reaction h4, .gift-presentation h4 {
    color: #ff6600;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gift-description h4 i, .gift-reaction h4 i, .gift-presentation h4 i {
    font-size: 1rem;
}

.gift-description p, .gift-reaction p, .gift-presentation p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Shop Button */
.gift-cta {
    margin-top: auto;
}

.shop-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #ff6600, #ff8533);
    color: white;
    text-decoration: none;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.25);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.shop-btn:hover {
    background: linear-gradient(135deg, #e55a00, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 102, 0, 0.35);
    text-decoration: none;
    color: white;
}

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

.shop-btn i {
    font-size: 1.1rem;
}

/* Card entrance animation */
.gift-card-modern {
    animation: fadeInUp 0.5s ease-out forwards;
}

.gift-card-modern:nth-child(2) {
    animation-delay: 0.1s;
}

.gift-card-modern:nth-child(3) {
    animation-delay: 0.2s;
}

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

.gift-box-img {
    width: clamp(120px, 15vw, 200px);
    height: auto;
    transition: all 0.5s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.gift-box-img.hidden {
    opacity: 0;
    transform: scale(0.9);
}

.gift-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gift-cards::-webkit-scrollbar {
    height: 6px;
}

.gift-cards::-webkit-scrollbar-track {
    background: rgba(255, 102, 0, 0.05);
    border-radius: 3px;
}

.gift-cards::-webkit-scrollbar-thumb {
    background: rgba(255, 102, 0, 0.3);
    border-radius: 3px;
}

.gift-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 102, 0, 0.5);
}

.gift-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 600;
    color: #ff6600;
    margin: 0.5rem 0 0.4rem;
    line-height: 1.3;
    text-transform: lowercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-description {
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    font-size: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-starter, .gift-reaction {
    background: rgba(255, 102, 0, 0.05);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin: 0 0.15rem 0.4rem;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-starter strong, .gift-reaction strong {
    color: #ff6600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.25rem;
}



/* Desktop enhancements are now handled by CSS Grid */

/* Reveal All Button */
.reveal-all-btn {
    background: linear-gradient(135deg, #ff6600, #ff8533);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 32px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: lowercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    margin-bottom: 1rem;
}

.reveal-all-btn:hover {
    background: linear-gradient(135deg, #e55a00, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

/* Mobile Responsive for Gift Boxes */
@media (max-width: 768px) {
    .gift-box {
        padding: 1rem;
        height: auto;
        min-height: auto;
    }
    
    .gift-box-img {
        width: clamp(100px, 12vw, 140px);
    }
    
    .gift-cards {
        gap: 1rem;
        margin-bottom: 2rem;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .gift-content {
        padding: 1.5rem;
        min-height: auto;
        gap: 0.75rem;
        overflow-y: visible;
    }
    
    .gift-image-container {
        height: 150px;
        margin-bottom: 0;
    }
    
    .gift-title {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
        min-height: 2.4rem; /* Adjust for mobile font size */
        max-height: 2.4rem;
    }
    
    .gift-description {
        font-size: 0.9rem;
        max-height: 5.8rem; /* 4 lines * 1.45 effective line-height */
    }
    
    .gift-price {
        font-size: 1rem;
        margin: 0;
        padding: 0.6rem 0.8rem;
    }
    
    .gift-actions {
        gap: 0.75rem;
        margin-top: 0;
        padding-top: 0.75rem;
    }
    
    .amazon-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    .gift-starter, .gift-reaction {
        padding: 0.75rem;
        font-size: 0.85rem;
        margin-bottom: 0;
        max-height: 4rem; /* Adjust for smaller font */
    }
    
    .reveal-all-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

.gift-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gift-card-title {
    font-size: 1.5rem;
    color: #ff6600;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.gift-card-description {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.gift-card-starter,
.gift-card-reaction {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 102, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.gift-card-starter strong,
.gift-card-reaction strong {
    color: #ff6600;
    display: block;
    margin-bottom: 0.25rem;
}

.gift-card-price {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

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

.loading-video {
    min-width: 500px;
    max-width: min(80vw, 600px);
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    display: block;
    /* Ensure no controls are visible */
    outline: none;
    border: none;
}

.loading-video::-webkit-media-controls {
    display: none !important;
}

.loading-video::-webkit-media-controls-panel {
    display: none !important;
}

.loading-video::-webkit-media-controls-play-button {
    display: none !important;
}

.loading-video::-webkit-media-controls-timeline {
    display: none !important;
}

.loading-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.loading-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.loading-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.loading-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.loading-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: #ff6600;
    font-weight: 500;
    text-transform: lowercase;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
}

.error-message.active {
    display: flex;
}

.error-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-content i {
    font-size: 3rem;
    color: #f56565;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.error-content p {
    color: #718096;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #landing {
        background-position: center center;
        background-size: cover;
        min-height: 100vh;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .page {
        padding: 1rem 0;
    }
    
    .chip-grid {
        max-height: 300px;
        gap: 0.75rem;
        row-gap: 0.75rem;
        column-gap: 0.75rem;
        padding: 1rem;
    }
    
    .chip {
        font-size: 0.8rem;
        padding: 0.65rem 0.9rem;
        min-height: 40px;
    }
    
    .navigation {
        padding: 0.75rem 1rem;
    }
    
    .navigation-content {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .navigation .btn {
        flex: 1;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .question-container {
        padding-bottom: 100px; /* Reduced for mobile */
    }
    
    .progress-container.fixed-nav {
        bottom: 50px;
        left: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .gift-cards {
        grid-template-columns: 1fr;
    }
    
    .landing-content {
        padding: 2rem 1.5rem;
        margin-left: 1rem;
        margin-top: 1rem;
        margin-right: 1rem;
        max-width: calc(100vw - 2rem);
        text-align: center;
    }
    
    .landing-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 0.75rem;
    }
    
    .landing-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .landing-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .landing-buttons {
        justify-content: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .gift-cards {
        gap: 0.75rem;
        grid-template-columns: 1fr;
    }
    
    .gift-box {
        height: auto;
        min-height: auto;
        padding: 0.75rem;
    }
    
    .gift-box-img {
        width: clamp(80px, 10vw, 120px);
    }
    
    .gift-content {
        padding: 1rem;
        min-height: auto;
        gap: 0.5rem;
        overflow-y: visible;
    }
    
    .gift-image-container {
        height: 120px;
        margin-bottom: 0;
    }
    
    .gift-title {
        font-size: clamp(1rem, 4vw, 1.2rem);
        min-height: 2rem; /* Adjust for smaller font */
        max-height: 2rem;
    }
    
    .gift-description {
        font-size: clamp(0.8rem, 3vw, 0.85rem);
        max-height: 5.2rem; /* 4 lines * 1.3 effective line-height */
    }
    
    .gift-price {
        font-size: 0.9rem;
        margin: 0;
        padding: 0.5rem 0.6rem;
    }
    
    .gift-actions {
        gap: 0.5rem;
        margin-top: 0;
        padding-top: 0.5rem;
    }
    
    .amazon-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .gift-starter, .gift-reaction {
        padding: 0.6rem;
        font-size: 0.8rem;
        margin-bottom: 0;
        max-height: 3.6rem; /* Adjust for smaller font */
    }
    
    .landing-content {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        border-radius: 8px;
    }
    
    .landing-title {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
        margin-bottom: 0.5rem;
    }
    
    .landing-subtitle {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .landing-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Hide some stars on mobile for performance */
    .star:nth-child(n+16) {
        display: none;
    }
    
    /* Adjust remaining stars for mobile screens */
    .star {
        width: 3px;
        height: 3px;
        animation-duration: 1.5s !important;
    }
    
    .star::before {
        width: 4px;
        height: 4px;
    }
    
    .loading-video {
        min-width: 300px;
        max-width: min(90vw, 400px);
        margin-bottom: 0;
    }
    .chip-grid {
        gap: 0.6rem;
        row-gap: 0.6rem;
        column-gap: 0.6rem;
        padding: 0.75rem;
    }
    
    .chip {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        min-height: 38px;
    }
    
    .chip-icon {
        font-size: 1rem;
    }
    
    .question-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .navigation {
        padding: 0.5rem 0.75rem;
    }
    
    .navigation-content {
        gap: 0.5rem;
    }
    
    .question-container {
        padding-bottom: 90px;
    }
    
    .progress-container.fixed-nav {
        bottom: 45px;
        padding: 0.4rem 0.6rem;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.65rem 0.65rem 2.2rem;
    }
    
    .search-icon {
        left: 0.65rem;
        font-size: 0.9rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .chip {
        border-width: 3px;
    }
    
    .chip.selected {
        border-width: 3px;
        outline: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-video {
        min-width: 350px;
        max-width: min(75vw, 450px);
    }
}

/* Focus visible for better keyboard navigation */
.chip:focus-visible,
.btn:focus-visible,
.search-input:focus-visible,
.answer-input:focus-visible {
    outline: 2px solid #ff6600;
    outline-offset: 2px;
}

/* Force light mode only - no dark mode support */
body {
    background: linear-gradient(135deg, #fff5f0 0%, #fed7aa 100%) !important;
    color: #2d3748 !important;
}

.chip {
    background: white !important;
    border-color: #e2e8f0 !important;
    color: #2d3748 !important;
}

.chip.selected {
    background: #ff6600 !important;
    color: white !important;
    border-color: #ff6600 !important;
}

.answer-input {
    background: white !important;
    border-color: #e2e8f0 !important;
    color: #2d3748 !important;
}

.gift-card {
    background: white !important;
    border-color: #e2e8f0 !important;
    color: inherit !important;
}

.error-content {
    background: white !important;
    color: #2d3748 !important;
}

.navigation {
    background: white !important;
}