:root {
    --bg-color: #fff8e7; /* Cream/light yellow */
    --primary-color: #d12a2f; /* Junina Red */
    --secondary-color: #ff9800; /* Orange */
    --accent-color: #2e7d32; /* Green */
    --text-color: #3e2723; /* Dark brown */
    --card-bg: #ffffff;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: radial-gradient(#ffcc80 1px, transparent 1px);
    background-size: 20px 20px;
    padding-bottom: 2rem;
}

header {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-bottom: 5px dashed var(--secondary-color);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
    text-shadow: 2px 2px 0px var(--text-color);
}

header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    text-shadow: 1px 1px 0px var(--text-color);
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid white;
}

.stat-box span {
    font-size: 1.5rem;
    font-weight: bold;
}

.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dish-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.dish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.dish-card.reserved {
    border-top-color: var(--text-color);
    opacity: 0.8;
}

.dish-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.status-available {
    background-color: #e8f5e9;
    color: var(--accent-color);
}

.status-reserved {
    background-color: #efebe9;
    color: var(--text-color);
}

.reserved-by {
    font-size: 0.95rem;
    color: var(--text-color);
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: all 0.2s;
}

.btn-take {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem;
    width: 100%;
    font-size: 1rem;
    margin-top: auto;
}

.btn-take:hover {
    background-color: #1b5e20;
    transform: scale(1.02);
}

/* Add custom dish */
.add-custom-dish {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 2rem;
    text-align: center;
}

.add-custom-dish h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.custom-dish-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--card-bg);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-top: 5px solid var(--secondary-color);
    max-width: 800px;
    margin: 0 auto;
}

.custom-dish-form input {
    width: 100%;
    padding: 1.2rem 1rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1.2rem;
}

.custom-dish-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

.custom-dish-form button {
    width: 100%;
    padding: 1.2rem 1.5rem;
    white-space: nowrap;
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    .custom-dish-form {
        flex-direction: row;
        align-items: stretch;
        padding: 1.5rem;
    }
    
    .custom-dish-form input {
        flex: 1;
        width: auto;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .custom-dish-form button {
        width: auto;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Reserved List */
.reserved-list-section {
    max-width: 800px;
    margin: 3rem auto 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-top: 5px solid var(--accent-color);
}

.reserved-list-section h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.reserved-list {
    list-style: none;
    padding: 0;
}

.reserved-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #ccc;
    font-size: 1.1rem;
}

.reserved-list li:last-child {
    border-bottom: none;
}

.reserved-list .dish-name-list {
    font-weight: bold;
    color: var(--primary-color);
}

.reserved-list .person-name-list {
    font-style: italic;
    color: var(--text-color);
}

/* Modal */
.modal {
    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;
    backdrop-filter: blur(3px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-top: 5px solid var(--primary-color);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.modal-content input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions button {
    flex: 1;
    padding: 0.8rem;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #333;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
}

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

.btn-confirm:hover {
    background-color: #b71c1c;
}
