* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

header {
    background-color: #ff6b6b;
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-icon, .back-button {
    position: relative;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: white;
    color: #ff6b6b;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

h2 {
    margin: 1rem 0;
    color: #ff6b6b;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 0.5rem;
}

#food-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.food-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.food-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.food-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.food-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.food-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.food-price {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.add-to-cart {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: auto;
}

.add-to-cart:hover {
    background-color: #ff5252;
}

#cart-container {
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#cart-page-container {
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 0.8rem 0;
    align-items: center;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-weight: bold;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-quantity-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.cart-quantity-control .quantity-input {
    width: 50px;
}

.remove-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.remove-btn:hover {
    background-color: #ff5252;
}

#cart-total {
    margin: 1rem 0;
    text-align: right;
    font-weight: bold;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

#clear-cart {
    background-color: #ccc;
    color: #333;
}

#order-btn, #clear-cart {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#order-btn {
    background-color: #4CAF50;
    color: white;
}

#order-btn:hover {
    background-color: #45a049;
}

.continue-shopping {
    text-align: center;
    margin-top: 1rem;
}

.continue-shopping button {
    background-color: #666;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.continue-shopping button:hover {
    background-color: #555;
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: #777;
    font-size: 0.8rem;
}

@media (min-width: 600px) {
    #food-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    #food-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quantity-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-input {
    width: 40%;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.25rem;
    font-size: 0.9rem;
    appearance: textfield; /* Standard property */
    -moz-appearance: textfield; /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.order-note {
    margin: 1rem 0;
    padding: 0.8rem;
    background-color: #f8f8f8;
    border-left: 4px solid #ff6b6b;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Customer information styles */
.customer-info {
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border-left: 4px solid #ff6b6b;
}

.customer-info h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.required {
    color: #ff6b6b;
    font-weight: bold;
}

.customer-info-display {
    background-color: #f8f8f8;
    padding: 0.8rem;
    border-radius: 5px;
    margin: 0.5rem 0 1rem 0;
    border-left: 4px solid #4CAF50;
}

/* Admin styles */
#admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

#login-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#login-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
}

#login-btn:hover {
    background-color: #ff5252;
}

.error-message {
    color: #d9534f;
    margin-top: 0.5rem;
}

#orders-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.order-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.order-id {
    font-weight: bold;
}

.order-date {
    color: #666;
}

.order-items {
    margin-bottom: 0.5rem;
}

.order-items ul {
    list-style-type: none;
    padding-left: 0;
}

.order-items li {
    margin-bottom: 0.3rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.order-total {
    font-weight: bold;
    color: #ff6b6b;
}

.delete-order-btn {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.delete-order-btn:hover {
    background-color: #c9302c;
}

.admin-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.logout-btn {
    background-color: #666;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #555;
}

#setup-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

#setup-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
}

#setup-btn:hover {
    background-color: #ff5252;
}

.reset-btn {
    background-color: #f0ad4e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

.reset-btn:hover {
    background-color: #ec971f;
}

.export-btn, .import-btn {
    background-color: #5bc0de;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

.export-btn:hover, .import-btn:hover {
    background-color: #46b8da;
}

.export-token {
    background-color: #f8f8f8;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid #5bc0de;
}

.export-token textarea {
    width: 100%;
    height: 60px;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}
