@font-face {
    font-family: 'Andrade Pro';
    src: url('Andrade Pro.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #ded5c6;
    color: #d48166;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ded5c6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader-logo {
    width: 200px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background-color: rgba(212, 129, 102, 0.3);
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: #d48166;
    transition: width 0.4s ease;
}

.qr-count-message {
    text-align: center;
    color: #d48166;
    font-size: 1.2em;
    margin-top: 20px;
    padding: 0 20px;
    line-height: 1.5;
    font-weight: 600;
    max-width: 80%;
    animation: fadeIn 1s ease-out;
}

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

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ded5c6;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

h1, h2 {
    font-family: 'Andrade Pro', sans-serif;
    font-weight: normal;
    color: #d48166;
}

h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-size: 2.5em;
    margin-top: 30px;
    margin-bottom: 20px;
    border-bottom: 2px solid #d48166;
    padding-bottom: 10px;
}

.menu-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    background-color: rgba(212, 129, 102, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.menu-nav a {
    color: #d48166;
    text-decoration: none;
    padding: 10px 15px;
    margin: 5px;
    border: 2px solid #d48166;
    border-radius: 25px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.menu-nav a:hover {
    background-color: #d48166;
    color: #ded5c6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.menu-section {
    margin-bottom: 50px;
}

.menu-section ul {
    list-style-type: none;
    padding: 0;
}

.menu-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid rgba(212, 129, 102, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(212, 129, 102, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.item-details {
    flex-grow: 1;
}

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

.item-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #d48166;
}

.price {
    font-weight: 600;
    color: #d48166;
}

.item-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calories {
    font-size: 0.8em;
    color: #888;
}

.allergens {
    display: flex;
    gap: 5px;
}

.allergen-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

.allergen-icon.gluten { background-image: url('allergen_icons/gluten.png'); }
.allergen-icon.crustaceans { background-image: url('allergen_icons/crustaceans.png'); }
.allergen-icon.eggs { background-image: url('allergen_icons/eggs.png'); }
.allergen-icon.fish { background-image: url('allergen_icons/fish.png'); }
.allergen-icon.peanuts { background-image: url('allergen_icons/peanuts.png'); }
.allergen-icon.soybeans { background-image: url('allergen_icons/soybeans.png'); }
.allergen-icon.milk { background-image: url('allergen_icons/milk.png'); }
.allergen-icon.nuts { background-image: url('allergen_icons/nuts.png'); }
.allergen-icon.celery { background-image: url('allergen_icons/celery.png'); }
.allergen-icon.mustard { background-image: url('allergen_icons/mustard.png'); }
.allergen-icon.sesame { background-image: url('allergen_icons/sesame.png'); }
.allergen-icon.sulphites { background-image: url('allergen_icons/sulphites.png'); }
.allergen-icon.lupin { background-image: url('allergen_icons/lupin.png'); }
.allergen-icon.molluscs { background-image: url('allergen_icons/molluscs.png'); }

.language-switcher {
    position: fixed;
    left: 10px;
    top: 10px;
    display: flex;
    z-index: 1000;
}

.language-switcher a {
    display: block;
    padding: 5px 10px;
    margin: 0 2px;
    text-decoration: none;
    color: #d48166;
    background-color: rgba(222, 213, 198, 0.8);
    border: 1px solid #d48166;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.language-switcher a.active,
.language-switcher a:hover {
    background-color: #d48166;
    color: #ded5c6;
}

.announcement-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 80%;
    text-align: center;
}

.announcement-popup .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
}

.announcement-popup h2 {
    color: #d48166;
    margin-bottom: 10px;
}

/* Admin Panel Styles */
.admin-login {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #ded5c6;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.admin-login .logo {
    text-align: center;
    margin-bottom: 20px;
}

.admin-login .logo img {
    max-width: 150px;
}

.admin-login h1 {
    text-align: center;
    color: #d48166;
    margin-bottom: 20px;
}

.admin-login .error {
    color: #ff4d4d;
    text-align: center;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #d48166;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d48166;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.7);
}

.form-group button {
    width: 100%;
    padding: 10px;
    background-color: #d48166;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-group button:hover {
    background-color: #c26f53;
}

.admin-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.admin-panel header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.admin-panel .logo img {
    max-width: 100px;
    margin-right: 20px;
}

.admin-panel h1, .admin-panel h2 {
    color: #d48166;
    margin: 0;
}

.add-section, .menu-section {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.admin-form input,
.admin-form select,
.admin-form button,
.admin-form textarea {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #d48166;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
}

.admin-form textarea {
    height: 100px;
    resize: vertical;
}

.admin-form button {
    background-color: #d48166;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-form button:hover {
    background-color: #c26f53;
}

.category-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d48166;
}

.category-item h3 {
    color: #d48166;
    margin-bottom: 10px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.inline-form input {
    flex: 1;
    padding: 5px;
    border: 1px solid #d48166;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.7);
}

.inline-form button {
    padding: 5px 10px;
    background-color: #d48166;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.inline-form button:hover {
    background-color: #c26f53;
}

.inline-form .delete-btn {
    background-color: #ff4d4d;
}

.inline-form .delete-btn:hover {
    background-color: #ff3333;
}

.view-menu-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #d48166;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.view-menu-btn:hover {
    background-color: #c26f53;
}

/* Admin Panel Tab Styles */
.admin-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-tab:hover {
    background-color: #e0e0e0;
}

.admin-tab.active {
    background-color: #d48166;
    color: white;
}

.admin-content {
    display: none;
}

.admin-content.active {
    display: block;
}

/* Allergen grid styles */
.allergen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.allergen-item {
    display: flex;
    align-items: center;
}

.allergen-item input {
    margin-right: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    .menu-nav a {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    .admin-panel header {
        flex-direction: column;
        text-align: center;
    }

    .admin-panel .logo img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .inline-form {
        flex-direction: column;
    }

    .inline-form input,
    .inline-form button {
        width: 100%;
    }

    .admin-login,
    .admin-panel {
        padding: 10px;
    }

    .form-group input,
    .admin-form input,
    .admin-form select,
    .admin-form button,
    .admin-form textarea {
        width: 100%;
    }

    .add-section, .menu-section {
        padding: 15px;
    }

    .add-section h2, .menu-section h2 {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        width: 100%;
        text-align: center;
    }

    .allergen-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}