:root {
    --primary-color: #333; /* gets overridden */
    --bg-color: #f4f4f4;
    --card-bg: #fff;
}

body {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;

    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: #333;
}

body.page-loaded {
    opacity: 1;
    transform: scale(1);
}

#restaurant-header {
    position: relative;
    background-color: var(--primary-color);
    color: white;
    padding: 40px 20px;
    text-align: center;
    transition: background-color 0.5s ease;
}

.restaurant-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background-color: white;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.header-content {
    position: relative;
    z-index: 2;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;

    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateX(-3px);
}

@media (max-width: 600px) {
    .back-button {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
}

#restaurant-header h1 { margin: 0; font-size: 2.5rem; }
.tagline { font-style: italic; opacity: 0.9; margin-top: 10px; }

#menu-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;

    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 40px;
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: rgba(0,0,0,0.02);
}

.category-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--primary-color);
}

.arrow-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.arrow-icon.collapsed {
    transform: rotate(-90deg);
}

.category-description {
    color: #666;
    margin-bottom: 20px;
    margin-top: 10px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.menu-grid.hidden {
    display: none;
}

.food-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.food-card h3 { margin: 15px 0 0 0; font-size: 1.1rem; }
.food-card p { font-size: 0.9rem; color: #555; flex-grow: 1; }

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-weight: bold;
}

.add-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.add-btn:hover { opacity: 0.9; }

.error-container {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.error-container h1 {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 10px;
}

.error-container p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.error-btn {
    background-color: #333;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.error-btn:hover {
    background-color: black;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #restaurant-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
    }

    .back-button {
        position: static;
        margin-bottom: 20px;
    }

    #rest-logo {
        margin-bottom: 15px;
    }
}