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

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --accent-gold: #D4AF37;
    --danger-color: #C41E3A;
    --success-color: #2D5F3F;
    --warning-color: #B8860B;
    --text-dark: #000000;
    --text-light: #666666;
    --bg-light: #FAFAFA;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: #F8F8F8;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    letter-spacing: 0;
    font-weight: 400;
}

/* Removed .container - using section-based layout */

/* Header */
header {
    background: #000000;
    color: white;
    padding: 20px 40px;
    text-align: center;
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 50px;
    width: auto;
    margin: 0;
    display: block;
    transition: height 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 40px;
    background: #FFFFFF;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin: 0 0 20px 0;
    color: var(--text-dark);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0 0 40px 0;
    font-weight: 400;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    padding: 18px 45px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.hero-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Content */
main {
    padding: 0;
}

/* Checker Section */
.checker-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 40px;
}

.input-container {
    background: white;
    padding: 60px;
    border-radius: 0;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 500;
}

textarea {
    width: 100%;
    padding: 20px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    background: #FAFAFA;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.primary-btn,
.secondary-btn {
    padding: 18px 45px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
    letter-spacing: 0;
    text-transform: none;
    font-family: 'Inter', sans-serif;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.primary-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-btn {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.secondary-btn:hover {
    background: var(--text-dark);
    color: white;
}

/* Results */
.results-container {
    margin-top: 60px;
    padding: 60px;
    background: white;
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.results-container h2 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
}

.stat.danger {
    background: #FFF9F9;
    border-color: #FFE5E5;
}

.stat.success {
    background: #F9FFF9;
    border-color: #E5F5E5;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat.danger .stat-number {
    color: var(--danger-color);
}

.stat.success .stat-number {
    color: var(--success-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Flagged Ingredients */
.flagged-list {
    margin-top: 20px;
}

.flagged-item {
    padding: 25px 30px;
    margin-bottom: 15px;
    background: #FFFBFB;
    border-radius: 12px;
    border: 1px solid #FFE8E8;
    border-left: 3px solid var(--danger-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ingredient-name {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.ingredient-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ingredient-category {
    font-size: 0.85rem;
    color: var(--text-light);
    background: #F8F8F8;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #E8E8E8;
}

.no-flagged {
    text-align: center;
    padding: 40px;
    color: var(--success-color);
    font-size: 1.1rem;
}

/* Content Sections */
.content-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #F0F0F0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 40px;
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.content-section h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-section ul,
.content-section ol {
    margin-left: 20px;
    color: var(--text-light);
}

.content-section li {
    margin-bottom: 10px;
}

/* How To List */
.how-to-list {
    background: white;
    padding: 40px 45px;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
}

.how-to-list li {
    padding-left: 10px;
}

/* Rating Guide */
.rating-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

.rating-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.rating-badge {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 60px;
    text-align: center;
    border: 1px solid currentColor;
}

.rating-badge.rating-0 {
    background: #F5F8F6;
    color: var(--success-color);
}

.rating-badge.rating-1 {
    background: #F5F7FA;
    color: #4A5568;
}

.rating-badge.rating-3 {
    background: #FFFBF0;
    color: var(--warning-color);
}

.rating-badge.rating-4 {
    background: #FFF5F5;
    color: var(--danger-color);
}

/* Common Ingredients */
.common-ingredients {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ingredient-card {
    padding: 35px;
    background: white;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

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

.ingredient-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ingredient-card p {
    font-size: 0.9rem;
    margin-top: 10px;
}

/* FAQ */
.faq-item {
    margin-bottom: 25px;
}

.faq-item h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* About Section */
.about ul {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
    margin-top: 20px;
}

/* Feedback Section */
.feedback-section {
    background: transparent;
}

.feedback-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1rem;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

/* Honeypot - hidden from humans, visible to bots */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

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

.form-row input,
.feedback-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-bottom: 1px solid #E0E0E0;
    border-radius: 0;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: transparent;
}

.form-row input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.feedback-form textarea {
    margin-bottom: 8px;
    resize: vertical;
}

.form-note {
    font-size: 0.75rem;
    color: #999;
    margin: 5px 0 20px 0;
    text-align: left;
    opacity: 0.8;
}

#feedback-submit {
    width: 100%;
    margin-top: 0;
    font-size: 1rem;
    padding: 16px;
    margin-right: 0;
}

#feedback-submit:disabled {
    background: #E0E0E0;
    border-color: #E0E0E0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

#feedback-submit:disabled:hover {
    background: #E0E0E0;
    border-color: #E0E0E0;
    transform: none;
}

.feedback-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 0;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
    text-align: center;
}

.success-message {
    background: transparent;
    border: none;
    border-left: 3px solid var(--success-color);
    color: var(--success-color);
}

.error-message {
    background: transparent;
    border: none;
    border-left: 3px solid var(--danger-color);
    color: var(--danger-color);
}

/* Custom Notification */
.custom-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.notification-content {
    background: white;
    padding: 40px 50px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.notification-content p {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.notification-btn {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 12px 40px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    border-radius: 50px;
}

.notification-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Footer */
footer {
    background: #000000;
    padding: 60px 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    letter-spacing: 0;
    width: 100%;
    margin: 0;
    margin-top: 80px;
}

footer p {
    margin-bottom: 8px;
    font-weight: 400;
}

.disclaimer {
    font-size: 0.85rem;
    font-style: normal;
    margin-top: 15px;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    header {
        padding: 60px 20px;
    }

    .logo {
        height: 50px;
    }

    .hero {
        min-height: auto;
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 1.05rem;
    }

    .checker-section {
        min-height: auto;
        padding: 60px 20px;
    }

    .input-container {
        padding: 30px;
    }

    .content-section {
        min-height: auto;
        padding: 60px 20px;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .results-container {
        padding: 30px;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    .common-ingredients {
        grid-template-columns: 1fr;
    }

    .rating-guide {
        grid-template-columns: 1fr;
    }

    .flagged-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ingredient-details {
        width: 100%;
        justify-content: space-between;
    }

    footer {
        padding: 40px 20px;
        margin-top: 60px;
    }

    /* Feedback Form Mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-row input,
    .feedback-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container {
    animation: fadeIn 0.3s ease-out;
}

.flagged-item {
    animation: fadeIn 0.3s ease-out;
}
