/* Modern 2025 Design System - LabelEye */

/* ===== Base Reset & Typography ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FAFAFA;
    color: #1a1a3e;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 5rem 2rem 4rem;
    background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1a1a3e 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: rgba(26, 26, 62, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* ===== Modern Cards & Interfaces ===== */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(14, 165, 233, 0.12);
}

.scanner-interface {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(14, 165, 233, 0.1);
}

.scanner-interface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(56, 189, 248, 0.03) 100%);
    border-radius: 24px;
    z-index: -1;
}

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed rgba(14, 165, 233, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: rgba(14, 165, 233, 0.02);
}

.upload-area:hover {
    border-color: #0EA5E9;
    background: rgba(14, 165, 233, 0.05);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: rgba(26, 26, 62, 0.6);
    font-size: 0.875rem;
}

/* ===== Tab Navigation ===== */
.input-tabs {
    display: flex;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 2rem;
    gap: 1rem;
    position: relative;
    background: transparent;
    padding: 0;
}

.tab {
    flex: 1;
    padding: 1rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6B7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
    border-radius: 0;
}

.tab:hover {
    color: #0EA5E9;
    background: rgba(14, 165, 233, 0.03);
}

.tab.active {
    color: #0EA5E9;
    border-bottom-color: #0EA5E9;
    font-weight: 600;
    background: transparent;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    border: none;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    color: white;
    text-decoration: none;
}

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

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    text-transform: none;
    letter-spacing: 0.5px;
    min-width: 180px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #7c8ef0 0%, #8a5db8 100%);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* ===== Badges & Features ===== */
.feature-badge {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0EA5E9;
}

/* ===== Trust Indicators ===== */
.trust-indicators {
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(26, 26, 62, 0.7);
    font-size: 0.875rem;
}

/* ===== Loading States ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}

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

.loading-content {
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(14, 165, 233, 0.2);
    border-top-color: #0EA5E9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-title {
    font-size: 1.5rem;
    color: #0EA5E9;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.loading-message {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* ===== Ingredient Categories ===== */
.ingredient-good {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.ingredient-bad {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
}

.ingredient-neutral {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

.ingredient-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 1px solid rgba(14, 165, 233, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ingredient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.ingredient-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.ingredient-details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(14, 165, 233, 0.1);
    font-size: 0.875rem;
    color: #6b7280;
    display: none;
}

.ingredient-card.expanded .ingredient-details {
    display: block;
}

/* ===== FAQ Cards ===== */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    min-height: calc(100vh - 120px);
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.faq-header p {
    font-size: 1.2rem;
    color: rgba(26, 26, 62, 0.7);
    line-height: 1.5;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.faq-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);
    transition: all 0.3s ease;
}

.faq-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(14, 165, 233, 0.12);
}

.faq-question {
    font-weight: 600;
    font-size: 1.2rem;
    color: #1a1a3e;
    margin-bottom: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #0EA5E9;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: #0EA5E9;
}

.faq-card.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    color: rgba(26, 26, 62, 0.8);
    line-height: 1.7;
    font-size: 1rem;
    display: none;
}

.faq-card.active .faq-answer {
    display: block;
    animation: fadeIn 0.3s ease;
}

.faq-link {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
}

.faq-link:hover {
    color: #38BDF8;
    text-decoration: underline;
}

/* ===== CTA Section ===== */
.cta-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1a3e 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.cta-text {
    color: rgba(26, 26, 62, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    /* General mobile padding for all main containers */
    body {
        padding: 0 0.75rem;
    }
    
    .container,
    main > div,
    .legal-content,
    .search-results,
    .ingredient-card {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .hero {
        min-height: auto;
        padding: 6rem 1.25rem 2rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }
    
    .scanner-interface, .modern-card {
        padding: 1rem;
        margin: 0 0.5rem 2rem 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix tab panels on mobile */
    .tab-panel {
        padding: 0 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix tab buttons on mobile */
    .input-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .input-tabs button.tab {
        min-width: 80px;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Fix barcode input on mobile */
    #barcode-input {
        max-width: 100%;
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }
    
    /* Fix buttons on mobile */
    #scan-barcode-btn, 
    .tab-panel button {
        max-width: 100%;
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .hero-features {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .trust-indicators {
        justify-content: center;
        margin-top: 1.5rem;
    }
    
    .btn-secondary {
        min-width: auto;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .input-tabs {
        margin-bottom: 1.5rem;
    }
    
    .tab {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .btn-primary {
        width: 100% !important;
        padding: 1rem;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    div[style*="display: flex; gap: 1rem"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .btn-secondary {
        flex: none !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .faq-container {
        padding: 0 1rem;
    }
    
    .faq-card, .cta-section {
        padding: 1.5rem;
    }
}

/* ===== Utility Classes ===== */
.mobile-first-layout {
    display: none;
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

/* ===== Contact Page Styles ===== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1a3e 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(26, 26, 62, 0.7);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0EA5E9;
    margin-bottom: 0.5rem;
}

.contact-text {
    color: rgba(26, 26, 62, 0.8);
    margin-bottom: 1rem;
}

.contact-link {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #38BDF8;
}

.contact-form-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

.contact-form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a3e;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a3e;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-submit {
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
}

/* Contact page responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Search Page Styles ===== */
.search-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.search-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1a3e 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.search-header p {
    font-size: 1.125rem;
    color: rgba(26, 26, 62, 0.7);
}

.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #F9FAFB;
}

.search-input:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: white;
}

.search-button {
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.results-header h2 {
    color: #0EA5E9;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.results-header p {
    color: rgba(26, 26, 62, 0.7);
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 180px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.05);
}

.product-card:hover {
    border-color: #0EA5E9;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.15);
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.02) 0%, rgba(56, 189, 248, 0.02) 100%);
}

.product-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 0.5rem;
    border: 1px solid #E5E7EB;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.product-brand {
    color: #0EA5E9;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-categories {
    font-size: 0.85rem;
    color: rgba(26, 26, 62, 0.6);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-food {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(34, 197, 94, 0.15) 100%);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cosmetic {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(244, 114, 182, 0.15) 100%);
    color: #EC4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.nutri-score {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analyze-button {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.analyze-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(56, 189, 248, 0.03) 100%);
    border-radius: 16px;
    border: 2px dashed rgba(14, 165, 233, 0.2);
}

.no-results h3 {
    color: #0EA5E9;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: rgba(26, 26, 62, 0.7);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading-spinner.active {
    display: block;
}

.spinner-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 3rem;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(14, 165, 233, 0.1);
    border-top-color: #0EA5E9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.spinner-container p {
    margin-top: 1.5rem;
    color: rgba(26, 26, 62, 0.7);
    font-size: 1.1rem;
}

/* Search page responsive */
@media (max-width: 768px) {
    .search-container {
        margin: 1rem auto;
        padding: 0 1.25rem;
    }
    
    .search-header h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .search-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .results-section {
        padding: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        padding: 1rem;
        min-height: auto;
    }
    
    .product-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .analyze-button {
        position: static;
        width: 100%;
        margin-top: 1rem;
    }
}

/* ===== Legal Pages (Privacy, Terms) ===== */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    min-height: calc(100vh - 120px);
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.legal-header p {
    font-size: 1.2rem;
    color: rgba(26, 26, 62, 0.7);
    line-height: 1.5;
}

.legal-content {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.legal-content:last-child {
    margin-bottom: 2rem;
}

.legal-header + .legal-content {
    margin-top: 2rem;
}

.legal-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0EA5E9;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(14, 165, 233, 0.1);
}

.legal-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a3e;
    margin: 1.5rem 0 1rem 0;
}

.legal-text p {
    color: rgba(26, 26, 62, 0.8);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-text ul {
    color: rgba(26, 26, 62, 0.8);
    line-height: 1.7;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

.legal-text strong {
    color: #1a1a3e;
    font-weight: 600;
}

.contact-info {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 3rem 1.25rem 2rem;
    }
    
    .legal-header h1 {
        font-size: 2.5rem;
    }
    
    .legal-section {
        padding: 1.5rem;
        border-radius: 16px;
        margin: 0 0.5rem 1.5rem 0.5rem;
    }
}

/* ===== Contact Form Styles ===== */
.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1a1a3e;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(14, 165, 233, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: #1a1a3e;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: rgba(255, 255, 255, 1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(26, 26, 62, 0.5);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    display: block;
    color: #E63E11;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.success-message,
.error-message {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.success-content,
.error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-icon,
.error-icon {
    flex-shrink: 0;
}

.success-icon {
    color: #10b981;
}

.error-icon {
    color: #ef4444;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.contact-method {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-method .contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0EA5E9;
}

.contact-method h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a3e;
    margin-bottom: 0.5rem;
}

.contact-method p {
    margin: 0;
    font-size: 0.9rem;
}

.contact-link {
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #38BDF8;
    text-decoration: underline;
}

/* Results Page Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #0EA5E9;
}

.stat-label {
    color: #6B7280;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.ingredients-grid {
    display: grid;
    gap: 2rem;
}

.category-nav-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    border: 2px solid rgba(14, 165, 233, 0.1);
    border-radius: 50px;
    color: #0EA5E9;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-button:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
    border-color: #0EA5E9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(56, 189, 248, 0.03) 100%);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    border-color: rgba(14, 165, 233, 0.2);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.category-title.safe {
    color: #10B981;
}

.category-title.neutral {
    color: #6B7280;
}

.category-title.caution {
    color: #F59E0B;
}

.category-count {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #6B7280;
}

.category-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.category-ingredients {
    display: grid;
    gap: 1rem;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.category-ingredients.collapsed {
    display: none;
}

.ingredient-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    position: relative;
}

.ingredient-card:hover {
    border-color: #0EA5E9;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

.ingredient-number {
    position: absolute;
    top: -8px;
    left: 1rem;
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ingredient-number:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.ingredient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ingredient-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: #0EA5E9;
    background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: none;
    flex: 1;
    margin-right: 1rem;
    padding: 0.125rem 0;
    display: inline-block;
    min-width: 0;
    max-width: 100%;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-safe {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.badge-neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6B7280;
}

.badge-caution {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.ingredient-description {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ingredient-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6B7280;
}

.allergen-warning {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

.ai-summary {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(56, 189, 248, 0.03) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #0EA5E9;
    line-height: 1.8;
    color: #374151;
}

@media (max-width: 768px) {
    .contact-form {
        margin-top: 1.5rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.65rem 0.85rem;
    }
    
    .contact-method {
        gap: 0.75rem;
    }
    
    .contact-method .contact-icon {
        width: 40px;
        height: 40px;
    }
}