:root {
    --primary: #c0111d;
    --primary-hover: #a00e18;
    --bg-light: #f1f3f5;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --star-active: #f59e0b;
    --star-inactive: #d1d5db;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background-color: white;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.nav-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1543353071-873f17a7a088?auto=format&fit=crop&q=80&w=1500');
    background-size: cover;
    background-position: center;
    color: white;
    border-bottom: 3px solid var(--primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
}

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

.primary-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.danger-btn {
    background-color: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem !important;
}
.danger-btn:hover {
    background-color: #ef4444;
    color: white;
}

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

.outline-btn:hover {
    background-color: rgba(220, 38, 38, 0.05);
}

/* Main content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.filters {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#searchInput,
#gallerySearch,
#dateFilter {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#searchInput, #gallerySearch {
    flex: 1;
    max-width: 400px;
}

#dateFilter {
    min-width: 200px;
}

#searchInput:focus, #gallerySearch:focus,
#dateFilter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.food-grid {
    /* Container for sections */
}

/* Card */
.food-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.food-img-container {
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.food-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    color: #cbd5e1;
    font-size: 3rem;
}

.food-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.food-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
    line-height: 1.4;
}

.food-rating-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stars {
    color: var(--star-active);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.card-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.6rem;
}

.admin-action {
    display: none;
}

.admin-mode .admin-action {
    display: inline-flex;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 4rem 0;
    gap: 0.5rem;
}

.pagination .btn {
    min-width: 45px;
    justify-content: center;
}

.date-section {
    margin-bottom: 4rem;
}

.date-header {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.date-header i {
    color: var(--primary);
}

.food-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal,
.close-rate-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-rate-modal:hover {
    color: var(--primary);
}

.modal h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.rating-stars {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--star-inactive);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.rating-stars i {
    cursor: pointer;
    transition: all 0.2s;
}

.rating-stars i:hover,
.rating-stars i.hovered {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-stars i.selected {
    color: var(--star-active);
}

.file-input-wrapper {
    margin-bottom: 2rem;
}

.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.25rem;
    grid-column: 1/-1;
}