/* ============================================
   AI Food Checker — uses Second Serve's brand tokens
   ============================================ */

:root {
    --primary-color: #2e7d32;
    --primary-light: #66bb6a;
    --primary-dark: #1b5e20;
    --primary-gradient: linear-gradient(135deg, #2e7d32 0%, #43a047 50%, #66bb6a 100%);
    --accent-color: #ffca28;
    --accent-dark: #ffa000;
    --accent-gradient: linear-gradient(135deg, #ffca28, #ffa000);
    --text-dark: #1a1a2e;
    --text-medium: #374151;
    --text-light: #6b7280;
    --bg-light: #f0f4f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.13);
    --shadow-green: 0 4px 20px rgba(46, 125, 50, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --danger-color: #e53935;
    --danger-bg: #fdecea;
    --warn-color: #ef6c00;
    --warn-bg: #fff3e0;
    --good-bg: #e8f5e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

/* ===== Navbar ===== */
.fc-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md);
}

.fc-navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fc-logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.fc-home-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.fc-home-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* ===== Layout ===== */
.fc-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.fc-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.fc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--good-bg);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.9rem;
}

.fc-hero h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

.fc-hero p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto;
}

/* ===== Cards ===== */
.fc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.1rem;
}

/* ===== Dropzone ===== */
.fc-dropzone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
}

.fc-dropzone.fc-drag-over {
    border-color: var(--primary-color);
    background: var(--good-bg);
}

.fc-dropzone-empty {
    text-align: center;
    color: var(--text-light);
    padding: 1.5rem;
}

.fc-dropzone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.fc-dropzone-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.fc-dropzone-sub {
    font-size: 0.85rem;
}

.fc-preview-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    
}

.fc-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.65);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.fc-remove-btn:hover {
    background: var(--danger-color);
}

/* ===== Buttons ===== */
.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.fc-btn-outline {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
}

.fc-btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.fc-btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: var(--shadow-green);
    width: 100%;
}

.fc-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(46, 125, 50, 0.35);
}

.fc-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.fc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.1rem 0;
}

.fc-analyze-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
}

.fc-another-btn {
    width: 100%;
}

.fc-error-msg {
    margin-top: 0.9rem;
    color: var(--danger-color);
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
}

/* ===== Loading ===== */
.fc-loading-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.fc-spinner {
    width: 40px;
    height: 40px;
    border: 3.5px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: fc-spin 0.8s linear infinite;
}

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

.fc-loading-card p {
    font-weight: 600;
    color: var(--text-dark);
    animation: fc-text-pulse 3.2s ease-in-out infinite;
}

.fc-loading-sub {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    animation: fc-text-pulse 3.2s ease-in-out infinite;
}

@keyframes fc-text-pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.65;
        transform: translateY(-2px);
    }
}

/* ===== Results: verdict ===== */
.fc-verdict-card {
    text-align: center;
}

.fc-verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.7rem;
}

.fc-verdict-badge.fc-good {
    background: var(--good-bg);
    color: var(--primary-dark);
}

.fc-verdict-badge.fc-caution {
    background: var(--warn-bg);
    color: var(--warn-color);
}

.fc-verdict-badge.fc-bad {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.fc-food-name {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: capitalize;
    margin-bottom: 1.1rem;
}

.fc-score-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fc-score-track {
    flex: 1;
    height: 10px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.fc-score-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.fc-score-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.fc-check-summary {
    margin-top: 0.5rem;
    color: var(--text-medium);
    font-size: 0.92rem;
    font-weight: 600;
}

.fc-summary {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

/* ===== Checklist ===== */
.fc-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.fc-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.fc-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.92rem;
    color: var(--text-medium);
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
}

.fc-checklist i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.fc-checklist .fc-pass i {
    color: var(--primary-color);
}

.fc-checklist .fc-fail i {
    color: var(--danger-color);
}

.fc-checklist .fc-check-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== Issues ===== */
.fc-issues-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.fc-issues-list li {
    display: flex;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--text-medium);
    background: var(--warn-bg);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
}

.fc-issues-list i {
    color: var(--warn-color);
    margin-top: 0.15rem;
}

/* ===== Recommendation ===== */
.fc-recommend-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.6rem;
}

.fc-confidence {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .fc-hero h1 {
        font-size: 1.55rem;
    }

    .fc-navbar-container {
        padding: 0.5rem 1rem;
    }

    .fc-home-btn span {
        display: none;
    }

    .fc-home-btn {
        padding: 0.6rem;
    }
}
