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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.week-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.week-selector label {
    font-weight: 600;
    color: #555;
}

#week-select {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

#week-select:hover {
    border-color: #3498db;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.menu-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.category {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

.category-header h2 {
    font-size: 1.8em;
    color: #2c3e50;
}

.category-icon {
    font-size: 1.5em;
}

.subcategory {
    margin-bottom: 30px;
    margin-left: 20px;
}

.subcategory-header {
    font-size: 1.2em;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.subcategory-header::before {
    content: '▸';
    margin-right: 8px;
    color: #3498db;
    font-size: 0.9em;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.menu-item {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
}

.menu-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.menu-item.selected {
    background: #e8f5e9;
    border-color: #4caf50;
}

.menu-item.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.menu-item-name {
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.order-summary {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.order-summary h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

#summary-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.week-summary {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.week-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.week-summary-header .remove-week {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.category-summary {
    margin-bottom: 15px;
}

.category-summary-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.subcategory-summary-title {
    font-weight: 500;
    color: #777;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 0.85em;
    padding-left: 12px;
    font-style: italic;
}

.item-list {
    list-style: none;
    padding-left: 15px;
}

.item-list li {
    padding: 5px 0;
    color: #666;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-list li .remove-item {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
}

.empty-summary {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.summary-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .menu-items {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2em;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: white;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#report-content {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background-color: #fafafa;
    color: #333;
    overflow-y: auto;
}

#report-content:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-footer button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-footer .btn-primary {
    background: #3498db;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.modal-footer .btn-secondary {
    background: #95a5a6;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background: #7f8c8d;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 1.4em;
    }

    .modal-body {
        padding: 20px;
    }

    #report-content {
        height: 50vh;
        min-height: 300px;
        font-size: 12px;
        padding: 15px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }
}
