/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

/* Logo styling */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 35px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Language Toggle */
.language-toggle {
    display: flex;
    gap: 8px;
}

.giggles-toggle {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 1px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 1.2rem;
    color: white;
    user-select: none;
}

.joke-character {
    font-weight: 600;
    color: #f59e0b;
    font-style: italic;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 0;
    justify-content: center;
    gap: 4px;
    padding: 6px;
}

.tab-btn {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: none;
    background: #f7fafc;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 10px;
    white-space: nowrap;
    position: relative;
}

.tab-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-bottom-color: #667eea;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.tab-btn.active:hover {
    background: #5568d3;
}

/* Tab Content */
.tab-content {
    background: white;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    min-height: 500px;
}

.tab-panel {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

/* Sections */
section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
}

/* Price check section */
.price-check {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
}

.check-form {
    margin-bottom: 20px;
}

.check-input-group {
    margin-bottom: 16px;
}

.check-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

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

.check-optional {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.optional-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 500;
}

.check-optional-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-field-group {
    display: flex;
    flex-direction: column;
}

.check-field-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.quantity-unit-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}

.quantity-unit-row .check-field-group {
    display: flex;
    flex-direction: column;
}

.quantity-unit-row input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 0;
    width: 100%;
}

.quantity-unit-row select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 80px;
    width: 100%;
}

.price-field-group {
    width: 100%;
}

.price-input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    width: 100%;
}

.check-optional-fields input:focus,
.check-optional-fields select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.price-check-result {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #10b981;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.price-check-joke {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fff9e6;
    border-left: 3px solid #fbbf24;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.9rem;
    text-align: center;
}

.price-history-joke {
    margin-bottom: 20px;
    display: none;
}

.price-history-joke-content {
    padding: 12px 16px;
    background: #fff9e6;
    border-left: 3px solid #fbbf24;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.9rem;
    text-align: center;
}

.pantry-add-joke {
    padding: 8px 12px;
    background: #fff9e6;
    border-left: 3px solid #fbbf24;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.85rem;
}

.best-price-display {
    text-align: center;
}

.best-price-value {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin: 10px 0;
}

.best-price-details {
    color: #6b7280;
    font-size: 1.1rem;
}

.price-history-mini {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.price-history-mini h4 {
    color: #374151;
    margin-bottom: 12px;
    font-size: 1rem;
}

.mini-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.mini-store {
    font-weight: 500;
    color: #374151;
}

.mini-price {
    color: #6b7280;
}

.no-results {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

.price-comparison {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0f2fe;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-label {
    font-weight: 500;
    color: #0c4a6e;
}

.comparison-value {
    font-weight: 600;
    color: #0c4a6e;
}

.comparison-better {
    color: #059669;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.comparison-worse {
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.pagination-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    background: #f7fafc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f7fafc;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-danger {
    background: #e53e3e;
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Price comparison */
.comparison-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid #48bb78;
}

.price-info {
    display: grid;
    gap: 16px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.price-label {
    font-weight: 500;
    color: #4a5568;
}

.price-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.best-price {
    color: #38a169;
}

.current-price {
    color: #2d3748;
}

.percentage {
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.percentage.positive {
    color: #e53e3e;
    background: #fed7d7;
}

.percentage.negative {
    color: #38a169;
    background: #c6f6d5;
}

/* History controls */
.history-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

#searchProduct {
    flex: 1;
    min-width: 200px;
}

/* History list */
.history-list {
    display: grid;
    gap: 12px;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.history-product {
    font-weight: 600;
    color: #2d3748;
}

.history-details {
    font-size: 0.9rem;
    color: #718096;
}

.history-price {
    font-weight: 600;
    color: #4a5568;
}

.delete-btn {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #feb2b2;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    /* Tab navigation for mobile */
    .tab-navigation {
        flex-direction: row;
        border-radius: 16px;
        margin-bottom: 20px;
        padding: 6px;
    }
    
    .tab-btn {
        border-radius: 8px;
        border-bottom: none;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .tab-btn.active {
        border-bottom: none;
    }
    
    .tab-content {
        border-radius: 16px;
        min-height: auto;
    }
    
    .tab-panel {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .form-row .form-group {
        margin-bottom: 0;
    }
    
    .check-optional-fields {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        display: grid !important;
    }
    
    .check-optional-fields input[type="number"] {
        min-width: 0;
        width: 100%;
    }
    
    .check-optional-fields input,
    .check-optional-fields select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 8px;
    }
    
    .check-optional-fields select {
        grid-column: 1 / -1;
        width: 100%;
    }
    
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .history-details {
        grid-column: 1 / -1;
    }
    
    /* Pantry list for mobile */
    .pantry-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Pagination for mobile */
    .pagination {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .pagination-btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Recipe cards for mobile */
    .suggestions-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .suggestion-card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .suggestion-header {
        margin-bottom: 10px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .suggestion-title {
        font-size: 1.05rem;
        min-width: 0;
        flex: 1 1 auto;
    }
    
    .suggestion-recipe-icon {
        flex-shrink: 0;
        min-width: 36px;
        height: 36px;
        font-size: 1rem;
        padding: 5px 7px;
    }
    
    .suggestion-meta {
        margin-top: 10px;
        padding-top: 10px;
        gap: 6px;
    }
    
    .suggestion-time,
    .suggestion-servings {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .suggestion-difficulty {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Tablet specific */
@media (max-width: 1024px) and (min-width: 769px) {
    .tab-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .tab-panel {
        padding: 25px;
    }
    
    .check-optional-fields {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .check-optional-fields select {
        grid-column: 1 / -1;
        width: 100%;
    }
    
    /* Recipe cards for tablet */
    .suggestions-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }
    
    .suggestion-card {
        padding: 14px;
    }
    
    .suggestion-title {
        font-size: 1.1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .tab-panel {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }
    
    .form-row .form-group {
        margin-bottom: 0;
    }
    
    .check-optional-fields {
        grid-template-columns: 1fr 1fr !important;
        display: grid !important;
    }
    
    .check-optional-fields input[type="number"] {
        min-width: 0;
        width: 100%;
    }
    
    .check-optional-fields select {
        grid-column: 1 / -1;
        width: 100%;
    }
    
    .check-optional-fields input,
    .check-optional-fields select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Recipe cards for small mobile */
    .suggestions-list {
        gap: 12px;
    }
    
    .suggestion-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .suggestion-header {
        margin-bottom: 8px;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .suggestion-title {
        font-size: 1rem;
        line-height: 1.3;
        min-width: 0;
        flex: 1 1 auto;
    }
    
    .suggestion-recipe-icon {
        flex-shrink: 0;
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
        padding: 4px 6px;
    }
    
    .suggestion-meta {
        margin-top: 8px;
        padding-top: 8px;
        gap: 5px;
    }
    
    .suggestion-time,
    .suggestion-servings {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .suggestion-difficulty {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .suggestion-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

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

.comparison-card, .history-item {
    animation: fadeIn 0.3s ease;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-best {
    background: #38a169;
}

.status-current {
    background: #667eea;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Confirmation toast */
.confirmation {
    margin-top: 16px;
    padding: 12px 16px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Pantry Styles */
.pantry {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.pantry h2 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 600;
}

.pantry p {
    color: #718096;
    margin-bottom: 25px;
    font-size: 1rem;
}

.pantry-controls {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

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

.pantry-stats:last-child {
    grid-template-columns: auto;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-card.small {
    padding: 12px 20px;
    max-width: 200px;
    margin: 0 auto;
}

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

#pantryCount {
    font-size: 1rem; /* 50% smaller than default stat-number */
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.inline-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-stat .stat-number {
    display: inline;
    margin-bottom: 0;
    font-size: 1rem;
}

.inline-stat .stat-label {
    display: inline;
}

.pantry-categories h3,
.dish-suggestions h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.pantry-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.pantry-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.pantry-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.pantry-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pantry-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pantry-item-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.pantry-item-remove {
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pantry-item-remove:hover {
    background: #feb2b2;
}

.pantry-item-receipt {
    background: #e6fffa;
    color: #319795;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pantry-item-receipt:hover {
    background: #b2f5ea;
    transform: scale(1.05);
}

.pantry-item-recipe {
    background: #fef5e7;
    color: #d69e2e;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pantry-item-recipe:hover {
    background: #fbd38d;
    transform: scale(1.05);
}

.pantry-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.9rem;
    color: #718096;
}

.pantry-item-detail {
    display: flex;
    justify-content: space-between;
}

.pantry-item-detail strong {
    color: #4a5568;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.suggestion-card {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-card:hover::before {
    opacity: 1;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
    min-width: 0;
}

.suggestion-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(72, 187, 120, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.suggestion-card:hover .suggestion-recipe-icon {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.15) rotate(5deg);
}

.suggestion-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0;
    line-height: 1.3;
    flex: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
}

.suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion-time,
.suggestion-servings {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.suggestion-difficulty {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-recipe-icon {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}


.empty-pantry {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 40px 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.empty-joke {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fff9e6;
    border-left: 3px solid #fbbf24;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.9rem;
    font-style: normal;
    text-align: left;
}

.joke-character {
    font-weight: 600;
    color: #f59e0b;
    font-style: italic;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-joke {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 8px 16px;
    max-width: 600px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-joke:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.version {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Receipt Popup Styles */
.receipt-popup {
    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: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.receipt-popup.show {
    opacity: 1;
}

.receipt-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.receipt-popup.show .receipt-content {
    transform: scale(1);
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.receipt-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.receipt-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.receipt-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.receipt-body {
    padding: 20px;
}

.receipt-store {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
}

.receipt-store h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 1.3rem;
}

.receipt-store p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.receipt-item {
    margin-bottom: 15px;
}

.receipt-item-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.receipt-item-details {
    display: flex;
    justify-content: space-between;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.receipt-item-total {
    text-align: right;
    font-size: 1.1rem;
    color: #2d3748;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    color: #718096;
    font-size: 0.9rem;
}

.receipt-id {
    font-family: monospace;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Recipe Popup Styles */
.recipe-popup {
    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: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-popup.show {
    opacity: 1;
}

.recipe-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.recipe-popup.show .recipe-content {
    transform: scale(1);
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.recipe-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.recipe-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recipe-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.recipe-body {
    padding: 20px;
}

.recipe-image {
    text-align: center;
    margin-bottom: 20px;
}

.recipe-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
}

.recipe-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.recipe-time,
.recipe-servings,
.recipe-difficulty {
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.recipe-ingredients,
.recipe-steps,
.recipe-tips {
    margin-bottom: 20px;
}

.recipe-ingredients h4,
.recipe-steps h4,
.recipe-tips h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.recipe-ingredients ul,
.recipe-steps ol {
    margin: 0;
    padding-left: 20px;
}

.recipe-ingredients li,
.recipe-steps li {
    margin-bottom: 5px;
    color: #4a5568;
    line-height: 1.5;
}

.recipe-tips p {
    margin: 0;
    color: #4a5568;
    font-style: italic;
    background: #fef5e7;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #d69e2e;
}
