:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --accent: #0ea5e9;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
    --status-bar-height: 56px;
    --bottom-nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overscroll-behavior-y: contain;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-lighter);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-alt);
}

/* Safe Area Support for iOS */
@supports (padding-top: env(safe-area-inset-top)) {
    .status-bar {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--status-bar-height) + env(safe-area-inset-top));
    }

    .app-shell {
        padding-top: calc(var(--status-bar-height) + env(safe-area-inset-top));
    }

    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }

    .app-shell {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

/* Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--status-bar-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.status-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="60" r="1.5" fill="white" opacity="0.1"/><circle cx="50" cy="80" r="1" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.status-bar-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.brand-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* App Shell */
.app-shell {
    padding-top: var(--status-bar-height);
    padding-bottom: var(--bottom-nav-height);
    min-height: 100vh;
}

/* Main Content */
.main-content {
    padding: 16px;
    margin-bottom: 16px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}

.bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 24px;
    position: relative;
}

.bottom-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 100px 100px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-btn .nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.bottom-nav-btn.active::before {
    transform: translateX(-50%) scale(1);
}

.bottom-nav-btn.active {
    color: var(--primary);
}

.bottom-nav-btn.active .iconify {
    transform: scale(1.1);
}

.bottom-nav-btn:active {
    transform: scale(0.95);
}

/* Panel */
.panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.panel:active {
    transform: translateY(1px);
}

.panel.compact {
    padding: 12px;
}

.panel h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
}

/* Search */
.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-input::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-input:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input:focus-within::before {
    opacity: 1;
}

#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
    color: var(--text);
    position: relative;
    z-index: 1;
}

#searchInput::placeholder {
    color: var(--text-lighter);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    min-width: 48px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:active::before {
    opacity: 1;
}

.btn-primary .iconify {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

.btn-primary span:last-child {
    position: relative;
    z-index: 1;
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.search-options {
    display: flex;
    gap: 4px;
    background: var(--bg-alt);
    border-radius: 100px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.search-options.segmented {
    background: var(--bg-alt);
}

.radio-label {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label span {
    display: block;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-label input[type="radio"]:checked + span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: scale(1.02);
}

/* Loading */
.loading {
    text-align: center;
    padding: 32px 16px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 12px;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--accent);
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Search Info */
.search-info {
    padding: 12px 14px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--success);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text);
}

.search-info.translated {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: var(--warning);
}

.search-info.no-results {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--error);
}

/* Results */
.results-container {
    display: grid;
    gap: 10px;
}

.food-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    overflow: hidden;
}

.food-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.food-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.food-card:active::before {
    transform: scaleX(1);
}

.food-header {
    margin-bottom: 12px;
}

.food-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
}

.food-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-source {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-category {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.nutrients-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.nutrient-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-alt);
    border-radius: 8px;
    font-size: 0.8rem;
}

.nutrient-name {
    color: var(--text-light);
    font-weight: 500;
}

.nutrient-value {
    font-weight: 700;
    color: var(--text);
}

/* About & Info Sections */
.feature-grid {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.feature-card {
    background: var(--surface);
    padding: 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-card:active::before {
    opacity: 1;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.category-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: all 0.3s ease;
}

.tag:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);
}

/* Accordion */
.accordion {
    margin-top: 16px;
}

.accordion-item {
    margin-bottom: 8px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-alt);
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    transition: all 0.2s ease;
}

.accordion-header:active {
    background: var(--border);
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-content p {
    padding: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--surface);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: none;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUpModal {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

.modal-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 100px;
    margin: 12px auto 16px;
}

.modal-scroll-content {
    padding: 0 20px 20px;
}

.close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    z-index: 10;
}

.close:active {
    background: var(--border);
    transform: scale(0.95);
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-title {
    font-size: 1.35rem;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.3;
}

.modal-desc {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.modal-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-alt);
    padding: 4px;
    border-radius: 100px;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.modal-tab {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.modal-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transform: scale(1.02);
}

.modal-tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

.modal-tab-content.active {
    display: block;
}

.section-title {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 700;
}

.nutrients-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.nutrient-card {
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--surface) 100%);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.2s ease;
}

.nutrient-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.nutrient-card-name {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.nutrient-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.nutrient-card-unit {
    font-size: 0.7rem;
    color: var(--text-lighter);
}

.btn-secondary {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:active {
    transform: scale(0.96);
    background: var(--bg-alt);
    border-color: var(--primary);
}

.btn-primary-alt {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary-alt:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ing-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ing-preview-container {
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--surface) 100%);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    border: 1px solid rgba(226, 232, 240, 0.6);
    min-height: 300px;
    position: relative;
}

.ing-preview {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.ing-preview svg {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: white;
}

.ing-preview.loaded {
    display: block;
}

.ing-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    width: 100%;
}

.ing-empty-state .iconify {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

.ing-empty-state p {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 700;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.empty-state ul {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
    margin-top: 16px;
}

.empty-state li {
    padding: 6px 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.empty-state li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: bold;
    margin-right: 6px;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--error);
    padding: 14px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    color: var(--error);
    font-size: 0.9rem;
}

/* Responsive Design - Tablet */
@media (min-width: 640px) {
    .main-content {
        padding: 20px;
    }

    .panel {
        padding: 20px;
    }

    .btn-primary {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .results-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .modal-content {
        width: 85%;
        max-width: 600px;
    }

    .modal-tabs {
        gap: 6px;
    }

    .modal-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .nutrients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    :root {
        --status-bar-height: 0;
        --bottom-nav-height: 0;
    }

    .status-bar {
        display: none;
    }

    .bottom-nav {
        display: none;
    }

    .app-shell {
        max-width: 1200px;
        margin: 0 auto;
        padding: 32px 24px;
    }

    .main-content {
        padding: 0;
    }

    /* Desktop Header */
    .app-shell::before {
        content: '';
        display: block;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        height: 72px;
        margin: -32px -24px 24px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .tab-content.active::before {
        content: 'Nutrisi';
        display: block;
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 8px;
    }

    #search-tab.active::before {
        content: 'Pencarian Nutrisi';
    }

    #about-tab.active::before {
        content: 'Tentang Aplikasi';
    }

    #info-tab.active::before {
        content: 'Informasi Gizi';
    }

    /* Desktop Tabs */
    .main-content::after {
        content: '';
        display: flex;
        gap: 12px;
        position: fixed;
        top: 48px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 101;
    }

    .results-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .nutrients-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-content {
        width: 80%;
        max-width: 800px;
        padding: 32px;
        margin: 5% auto;
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        border-radius: var(--radius);
        border: 1px solid rgba(226, 232, 240, 0.8);
        animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes slideUpBounce {
        0% { transform: translateY(50px) scale(0.95); opacity: 0; }
        100% { transform: translateY(0) scale(1); opacity: 1; }
    }

    .modal-drag-handle {
        display: none;
    }

    .modal-scroll-content {
        padding: 0;
    }

    .search-row {
        max-width: 600px;
    }
}
